diff --git a/programs/progman/En.rc b/programs/progman/En.rc index 278ece359a4..163e84bce44 100644 --- a/programs/progman/En.rc +++ b/programs/progman/En.rc @@ -219,3 +219,27 @@ IDS_LIBRARIES_DLL, "Libraries (*.dll)" IDS_SYMBOL_FILES, "Icon files" IDS_SYMBOLS_ICO, "Icons (*.ico)" } + +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/progman/License_En.c b/programs/progman/License_En.c deleted file mode 100644 index c4e1bfe99ac..00000000000 --- a/programs/progman/License_En.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "windows.h" -#include "license.h" - -static CHAR LicenseCaption_En[] = "LICENSE"; -static 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 CHAR NoWarrantyCaption_En[] = "NO WARRANTY"; -static 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/progman/Makefile.in b/programs/progman/Makefile.in index d2af88940a1..3ce52d5c1d0 100644 --- a/programs/progman/Makefile.in +++ b/programs/progman/Makefile.in @@ -6,17 +6,13 @@ MODULE = progman.exe APPMODE = -mwindows IMPORTS = shell32 comdlg32 user32 gdi32 kernel32 -LICENSELANG = En - C_SRCS = \ dialog.c \ group.c \ grpfile.c \ - license.c \ main.c \ program.c \ - string.c \ - $(LICENSELANG:%=License_%.c) + string.c RC_SRCS = rsrc.rc diff --git a/programs/progman/license.c b/programs/progman/license.c deleted file mode 100644 index 7ac27172d4a..00000000000 --- a/programs/progman/license.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 1996 Ulrich Schmid - * Copyright 2002 Sylvain Petreolle - * - * 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 - */ - -#include "windows.h" -#include "license.h" - -#if 0 -static LICENSE* SelectLanguage(LPCSTR Language) -{ - if (!lstrcmp(Language, "Cz")) return(&WineLicense_Cz); - if (!lstrcmp(Language, "Da")) return(&WineLicense_Da); - if (!lstrcmp(Language, "De")) return(&WineLicense_De); - if (!lstrcmp(Language, "En")) return(&WineLicense_En); - if (!lstrcmp(Language, "Eo")) return(&WineLicense_Eo); - if (!lstrcmp(Language, "Es")) return(&WineLicense_Es); - if (!lstrcmp(Language, "Fi")) return(&WineLicense_Fi); - if (!lstrcmp(Language, "Fr")) return(&WineLicense_Fr); - if (!lstrcmp(Language, "Hu")) return(&WineLicense_Hu); - if (!lstrcmp(Language, "It")) return(&WineLicense_It); - if (!lstrcmp(Language, "Ko")) return(&WineLicense_Ko); - if (!lstrcmp(Language, "No")) return(&WineLicense_No); - if (!lstrcmp(Language, "Pl")) return(&WineLicense_Pl); - if (!lstrcmp(Language, "Po")) return(&WineLicense_Po); - if (!lstrcmp(Language, "Va")) return(&WineLicense_Va); - return(&WineLicense_En); -} -#endif - -VOID WineLicense(HWND Wnd) -{ -/* LICENSE *License = SelectLanguage(Language); */ -LICENSE *License = &WineLicense_En; - - MessageBox(Wnd, License->License, License->LicenseCaption, - MB_ICONINFORMATION | MB_OK); -} - -VOID WineWarranty(HWND Wnd) -{ -/* LICENSE *License = SelectLanguage(Language); */ -LICENSE *License = &WineLicense_En; - - MessageBox(Wnd, License->Warranty, License->WarrantyCaption, - MB_ICONEXCLAMATION | MB_OK); -} diff --git a/programs/progman/license.h b/programs/progman/license.h deleted file mode 100644 index 4820c9f81a6..00000000000 --- a/programs/progman/license.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 1996 Ulrich Schmid - * Copyright 2002 Sylvain Petreolle - * - * 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_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_Va; diff --git a/programs/progman/main.c b/programs/progman/main.c index 3476bdd369c..d1e2a1ee501 100644 --- a/programs/progman/main.c +++ b/programs/progman/main.c @@ -23,7 +23,6 @@ #include #include "windows.h" #include "windowsx.h" -#include "license.h" #include "progman.h" GLOBALS Globals; @@ -34,6 +33,8 @@ static ATOM MAIN_RegisterMainWinClass(void); static VOID MAIN_CreateMainWindow(void); static VOID MAIN_CreateMDIWindow(void); static VOID MAIN_AutoStart(void); +static VOID WineLicense(HWND Wnd); +static VOID WineWarranty(HWND Wnd); #define BUFFER_SIZE 1000 @@ -475,6 +476,22 @@ VOID MAIN_ReplaceString(HLOCAL *handle, LPSTR replace) else MAIN_MessageBoxIDS(IDS_OUT_OF_MEMORY, IDS_ERROR, MB_OK); } +VOID WineLicense(HWND Wnd) +{ + char cap[20], text[1024]; + LoadString(Globals.hInstance, IDS_LICENSE, text, sizeof text); + LoadString(Globals.hInstance, IDS_LICENSE_CAPTION, cap, sizeof cap); + MessageBox(Wnd, text, cap, MB_ICONINFORMATION | MB_OK); +} + +VOID WineWarranty(HWND Wnd) +{ + char cap[20], text[1024]; + LoadString(Globals.hInstance, IDS_WARRANTY, text, sizeof text); + LoadString(Globals.hInstance, IDS_WARRANTY_CAPTION, cap, sizeof cap); + MessageBox(Wnd, text, cap, MB_ICONEXCLAMATION | MB_OK); +} + /* Local Variables: */ /* c-file-style: "GNU" */ /* End: */ diff --git a/programs/progman/progman.h b/programs/progman/progman.h index 3ebc2492ef5..f8743737470 100644 --- a/programs/progman/progman.h +++ b/programs/progman/progman.h @@ -233,6 +233,11 @@ extern CHAR STRING_EXECUTE[]; #define IDS_SYMBOL_FILES 0x16 #define IDS_SYMBOLS_ICO 0x17 +#define IDS_LICENSE_CAPTION 0x20 +#define IDS_LICENSE 0x21 +#define IDS_WARRANTY_CAPTION 0x22 +#define IDS_WARRANTY 0x23 + /* Menu */ #define MAIN_MENU 0x109