diff --git a/programs/clock/En.rc b/programs/clock/En.rc index ee6738c3217..fe7c5bc5b2c 100644 --- a/programs/clock/En.rc +++ b/programs/clock/En.rc @@ -47,3 +47,27 @@ STRINGTABLE DISCARDABLE { IDS_CLOCK, "Clock" } + +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/clock/License_En.c b/programs/clock/License_En.c deleted file mode 100644 index 654d5234ddd..00000000000 --- a/programs/clock/License_En.c +++ /dev/null @@ -1,29 +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/clock/Makefile.in b/programs/clock/Makefile.in index 91822e5e401..72a2fd843fa 100644 --- a/programs/clock/Makefile.in +++ b/programs/clock/Makefile.in @@ -6,13 +6,9 @@ MODULE = clock.exe APPMODE = -mwindows IMPORTS = comdlg32 shell32 user32 gdi32 kernel32 -LICENSELANG = En - C_SRCS = \ - license.c \ main.c \ - winclock.c \ - $(LICENSELANG:%=License_%.c) + winclock.c RC_SRCS = rsrc.rc diff --git a/programs/clock/clock_res.h b/programs/clock/clock_res.h index 1667f6bf6d8..2c92918a10f 100644 --- a/programs/clock/clock_res.h +++ b/programs/clock/clock_res.h @@ -31,3 +31,8 @@ #define IDM_ONTOP 0x113 #define IDS_CLOCK 0x10C + +#define IDS_LICENSE_CAPTION 0x120 +#define IDS_LICENSE 0x121 +#define IDS_WARRANTY_CAPTION 0x122 +#define IDS_WARRANTY 0x123 diff --git a/programs/clock/license.c b/programs/clock/license.c deleted file mode 100644 index 6de507b238d..00000000000 --- a/programs/clock/license.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Clock (license.c) - * - * Copyright 1998 by Marcel Baur - * Adapted from Program Manager (Original by Ulrich Schmied) - * - * 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" - -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/clock/license.h b/programs/clock/license.h deleted file mode 100644 index 94dd3e8baec..00000000000 --- a/programs/clock/license.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Clock (license.h) - * - * Copyright 1998 by Marcel Baur - * Adapted from Program Manager (Original by Ulrich Schmied) - * - * 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 - */ - - -/* function prototypes */ - -VOID WineLicense(HWND hWnd); -VOID WineWarranty(HWND hWnd); - - -/* typedefs */ - -typedef struct -{ - LPCSTR License, LicenseCaption; - LPCSTR Warranty, WarrantyCaption; -} LICENSE; - - -/* external references */ - -/* -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/clock/main.c b/programs/clock/main.c index 754c1e9e062..cd6a7722b48 100644 --- a/programs/clock/main.c +++ b/programs/clock/main.c @@ -29,7 +29,6 @@ #include "commdlg.h" #include "main.h" -#include "license.h" #include "winclock.h" #define INITIAL_WINDOW_SIZE 200 @@ -37,6 +36,22 @@ CLOCK_GLOBALS Globals; +static 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); +} + +static 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); +} + static VOID CLOCK_UpdateMenuCheckmarks(VOID) { HMENU hPropertiesMenu;