From 5d5695a2cc9ea04ade937e218bc682ac0a92dc52 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Tue, 7 Feb 2006 16:55:01 +0100 Subject: [PATCH] notepad: Move license text to resources. --- programs/notepad/En.rc | 24 +++++++++++++++++++ programs/notepad/License_En.c | 28 ----------------------- programs/notepad/Makefile.in | 2 -- programs/notepad/dialog.c | 11 ++++++--- programs/notepad/license.c | 41 --------------------------------- programs/notepad/license.h | 52 ------------------------------------------ programs/notepad/notepad_res.h | 5 ++++ 7 files changed, 37 insertions(+), 126 deletions(-) delete mode 100644 programs/notepad/License_En.c delete mode 100644 programs/notepad/license.c delete mode 100644 programs/notepad/license.h diff --git a/programs/notepad/En.rc b/programs/notepad/En.rc index b31e59c83e7..0fd434adae8 100644 --- a/programs/notepad/En.rc +++ b/programs/notepad/En.rc @@ -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." +} diff --git a/programs/notepad/License_En.c b/programs/notepad/License_En.c deleted file mode 100644 index f8ffe140436..00000000000 --- a/programs/notepad/License_En.c +++ /dev/null @@ -1,28 +0,0 @@ -#include -#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}; diff --git a/programs/notepad/Makefile.in b/programs/notepad/Makefile.in index fc43d365e88..67026d36577 100644 --- a/programs/notepad/Makefile.in +++ b/programs/notepad/Makefile.in @@ -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 diff --git a/programs/notepad/dialog.c b/programs/notepad/dialog.c index 28d1b6d11e0..c45a73c5b32 100644 --- a/programs/notepad/dialog.c +++ b/programs/notepad/dialog.c @@ -28,7 +28,6 @@ #include #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) diff --git a/programs/notepad/license.c b/programs/notepad/license.c deleted file mode 100644 index 3c90ca3143f..00000000000 --- a/programs/notepad/license.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Notepad (license.h) - * - * Copyright 1997,98 Marcel Baur - * - * 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 -#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); -} - diff --git a/programs/notepad/license.h b/programs/notepad/license.h deleted file mode 100644 index 418bb66f5c7..00000000000 --- a/programs/notepad/license.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Notepad (license.h) - * - * Copyright 1997,98 Marcel Baur - * - * 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; -*/ diff --git a/programs/notepad/notepad_res.h b/programs/notepad/notepad_res.h index e9ad744f00c..11e7551d745 100644 --- a/programs/notepad/notepad_res.h +++ b/programs/notepad/notepad_res.h @@ -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 -- 2.11.4.GIT