1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

notepad: Move license text to resources.

This commit is contained in:
Mike McCormack 2006-02-07 16:55:01 +01:00 committed by Alexandre Julliard
parent 4f53d5a5b3
commit 5d5695a2cc
7 changed files with 37 additions and 126 deletions

View File

@ -127,3 +127,27 @@ task. \nClose one or more applications to increase the amount of \nfree \
memory."
}
STRINGTABLE DISCARDABLE LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
{
IDS_LICENSE_CAPTION, "LICENSE"
IDS_LICENSE,
"This library is free software; you can redistribute it and/or \
modify it under the terms of the GNU Lesser General Public \
License as published by the Free Software Foundation; either \
version 2.1 of the License, or (at your option) any later version.\n\
This library is distributed in the hope that it will be useful, \
but WITHOUT ANY WARRANTY; without even the implied warranty of \
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU \
Lesser General Public License for more details.\n\
You should have received a copy of the GNU Lesser General Public \
License along with this library; if not, write to the Free Software \
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"
IDS_WARRANTY_CAPTION, "NO WARRANTY"
IDS_WARRANTY,
"This library is distributed in the hope that it will be useful, \
but WITHOUT ANY WARRANTY; without even the implied warranty of \
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU \
Lesser General Public License for more details."
}

View File

@ -1,28 +0,0 @@
#include <windows.h>
#include "license.h"
static const CHAR LicenseCaption_En[] = "LICENSE";
static const CHAR License_En[] =
"This library is free software; you can redistribute it and/or "
"modify it under the terms of the GNU Lesser General Public "
"License as published by the Free Software Foundation; either "
"version 2.1 of the License, or (at your option) any later version.\n"
"This library is distributed in the hope that it will be useful, "
"but WITHOUT ANY WARRANTY; without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU "
"Lesser General Public License for more details.\n"
"You should have received a copy of the GNU Lesser General Public "
"License along with this library; if not, write to the Free Software "
"Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA";
static const CHAR NoWarrantyCaption_En[] = "NO WARRANTY";
static const CHAR NoWarranty_En[] =
"This library is distributed in the hope that it will be useful, "
"but WITHOUT ANY WARRANTY; without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU "
"Lesser General Public License for more details.";
LICENSE WineLicense_En = {License_En, LicenseCaption_En,
NoWarranty_En, NoWarrantyCaption_En};

View File

@ -10,9 +10,7 @@ MODCFLAGS = @BUILTINFLAG@
EXTRADEFS = -DNO_LIBWINE_PORT
C_SRCS = \
License_En.c \
dialog.c \
license.c \
main.c
RC_SRCS = rsrc.rc

View File

@ -28,7 +28,6 @@
#include <commdlg.h>
#include "main.h"
#include "license.h"
#include "dialog.h"
static const WCHAR helpfileW[] = { 'n','o','t','e','p','a','d','.','h','l','p',0 };
@ -684,12 +683,18 @@ VOID DIALOG_HelpHelp(VOID)
VOID DIALOG_HelpLicense(VOID)
{
WineLicense(Globals.hMainWnd);
TCHAR cap[20], text[1024];
LoadString(Globals.hInstance, IDS_LICENSE, text, 1024);
LoadString(Globals.hInstance, IDS_LICENSE_CAPTION, cap, 20);
MessageBox(Globals.hMainWnd, text, cap, MB_ICONINFORMATION | MB_OK);
}
VOID DIALOG_HelpNoWarranty(VOID)
{
WineWarranty(Globals.hMainWnd);
TCHAR cap[20], text[1024];
LoadString(Globals.hInstance, IDS_WARRANTY, text, 1024);
LoadString(Globals.hInstance, IDS_WARRANTY_CAPTION, cap, 20);
MessageBox(Globals.hMainWnd, text, cap, MB_ICONEXCLAMATION | MB_OK);
}
VOID DIALOG_HelpAboutWine(VOID)

View File

@ -1,41 +0,0 @@
/*
* Notepad (license.h)
*
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "license.h"
VOID WineLicense(HWND Wnd)
{
/* FIXME: should load strings from resources */
LICENSE *License = &WineLicense_En;
MessageBox(Wnd, License->License, License->LicenseCaption,
MB_ICONINFORMATION | MB_OK);
}
VOID WineWarranty(HWND Wnd)
{
/* FIXME: should load strings from resources */
LICENSE *License = &WineLicense_En;
MessageBox(Wnd, License->Warranty, License->WarrantyCaption,
MB_ICONEXCLAMATION | MB_OK);
}

View File

@ -1,52 +0,0 @@
/*
* Notepad (license.h)
*
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
VOID WineLicense(HWND hWnd);
VOID WineWarranty(HWND hWnd);
typedef struct
{
LPCSTR License, LicenseCaption;
LPCSTR Warranty, WarrantyCaption;
} LICENSE;
/*
extern LICENSE WineLicense_Ca;
extern LICENSE WineLicense_Cz;
extern LICENSE WineLicense_Da;
extern LICENSE WineLicense_De;
*/
extern LICENSE WineLicense_En;
/*
extern LICENSE WineLicense_Eo;
extern LICENSE WineLicense_Es;
extern LICENSE WineLicense_Fi;
extern LICENSE WineLicense_Fr;
extern LICENSE WineLicense_Hu;
extern LICENSE WineLicense_It;
extern LICENSE WineLicense_Ko;
extern LICENSE WineLicense_No;
extern LICENSE WineLicense_Pl;
extern LICENSE WineLicense_Po;
extern LICENSE WineLicense_Sw;
extern LICENSE WineLicense_Va;
*/

View File

@ -76,3 +76,8 @@
#define STRING_NOTFOUND 0x17B
#define STRING_OUT_OF_MEMORY 0x17C
#define IDS_LICENSE_CAPTION 0x180
#define IDS_LICENSE 0x181
#define IDS_WARRANTY_CAPTION 0x182
#define IDS_WARRANTY 0x183