Mike McCormack : winefile: Move the license and warranty text into the resources.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jan 31 11:23:33 CST 2006


Module: wine
Branch: refs/heads/master
Commit: ee20ca135459124ec617e7851c5cb2697ec20cb0
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=ee20ca135459124ec617e7851c5cb2697ec20cb0

Author: Mike McCormack <mike at codeweavers.com>
Date:   Tue Jan 31 18:08:45 2006 +0100

winefile: Move the license and warranty text into the resources.

---

 programs/winefile/En.rc       |   24 ++++++++++++++++++
 programs/winefile/Makefile.in |    1 -
 programs/winefile/license.c   |   56 -----------------------------------------
 programs/winefile/resource.h  |    4 +++
 programs/winefile/winefile.c  |   16 ++++++++++++
 programs/winefile/winefile.h  |    4 ---
 6 files changed, 44 insertions(+), 61 deletions(-)
 delete mode 100644 programs/winefile/license.c

diff --git a/programs/winefile/En.rc b/programs/winefile/En.rc
index 8afa632..7a305d8 100644
--- a/programs/winefile/En.rc
+++ b/programs/winefile/En.rc
@@ -262,3 +262,27 @@ STRINGTABLE
 
     IDS_FREE_SPACE_FMT      "%s of %s free"
 }
+
+STRINGTABLE
+{
+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/winefile/Makefile.in b/programs/winefile/Makefile.in
index 8bf2251..29e6e79 100644
--- a/programs/winefile/Makefile.in
+++ b/programs/winefile/Makefile.in
@@ -9,7 +9,6 @@ IMPORTS   = shell32 comdlg32 comctl32 ol
 EXTRALIBS = -luuid
 
 C_SRCS = \
-	license.c \
 	splitpath.c \
 	winefile.c
 
diff --git a/programs/winefile/license.c b/programs/winefile/license.c
deleted file mode 100644
index 12193f8..0000000
--- a/programs/winefile/license.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2000 Martin Fuchs
- *
- * 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 "winefile.h"
-
-#ifdef __WINE__
-
-static const CHAR LicenseCaption[] = "LICENSE";
-static const CHAR 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";
-
-static const CHAR NoWarrantyCaption[] = "NO WARRANTY";
-static const CHAR NoWarranty[] =
-"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.";
-
-VOID WineLicense(HWND hwnd)
-{
-  MessageBoxA(hwnd, License, LicenseCaption, MB_ICONINFORMATION|MB_OK);
-}
-
-VOID WineWarranty(HWND hwnd)
-{
-  MessageBoxA(hwnd, NoWarranty, NoWarrantyCaption, MB_ICONEXCLAMATION|MB_OK);
-}
-
-#endif
diff --git a/programs/winefile/resource.h b/programs/winefile/resource.h
index cce4de3..d4d0adc 100644
--- a/programs/winefile/resource.h
+++ b/programs/winefile/resource.h
@@ -135,6 +135,10 @@
 #define IDS_COL_SEC                     1218
 #define IDS_FREE_SPACE_FMT              1219
 
+#define IDS_LICENSE_CAPTION             1300
+#define IDS_LICENSE                     1301
+#define IDS_WARRANTY_CAPTION            1302
+#define IDS_WARRANTY                    1303
 
 /* range for drive bar command ids: 0x9000..0x90FF */
 
diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c
index 8b250d6..387711d 100644
--- a/programs/winefile/winefile.c
+++ b/programs/winefile/winefile.c
@@ -235,6 +235,22 @@ static void display_network_error(HWND h
 		MessageBox(hwnd, msg, RS(b2,IDS_WINEFILE), MB_OK);
 }
 
+static VOID WineLicense(HWND Wnd)
+{
+	TCHAR cap[20], text[1024];
+	LoadString(Globals.hInstance, IDS_LICENSE, text, 1024);
+	LoadString(Globals.hInstance, IDS_LICENSE_CAPTION, cap, 20);
+	MessageBox(Wnd, text, cap, MB_ICONINFORMATION | MB_OK);
+}
+
+static VOID WineWarranty(HWND Wnd)
+{
+	TCHAR cap[20], text[1024];
+	LoadString(Globals.hInstance, IDS_WARRANTY, text, 1024);
+	LoadString(Globals.hInstance, IDS_WARRANTY_CAPTION, cap, 20);
+	MessageBox(Wnd, text, cap, MB_ICONEXCLAMATION | MB_OK);
+}
+
 
 #ifdef __WINE__
 
diff --git a/programs/winefile/winefile.h b/programs/winefile/winefile.h
index c969af7..45d800d 100644
--- a/programs/winefile/winefile.h
+++ b/programs/winefile/winefile.h
@@ -144,10 +144,6 @@ extern WINEFILE_GLOBALS Globals;
 
 #ifdef __WINE__
 
-extern void WineLicense(HWND hwnd);
-extern void WineWarranty(HWND hwnd);
-
-
 #ifdef UNICODE
 extern void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext);
 #define _tsplitpath _wsplitpath




More information about the wine-cvs mailing list