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

This commit is contained in:
Mike McCormack 2006-01-31 18:08:45 +01:00 committed by Alexandre Julliard
parent c418226093
commit ee20ca1354
6 changed files with 44 additions and 61 deletions

View File

@ -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."
}

View File

@ -9,7 +9,6 @@ IMPORTS = shell32 comdlg32 comctl32 ole32 mpr version user32 gdi32 advapi32 ke
EXTRALIBS = -luuid
C_SRCS = \
license.c \
splitpath.c \
winefile.c

View File

@ -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

View File

@ -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 */

View File

@ -235,6 +235,22 @@ static void display_network_error(HWND hwnd)
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__

View File

@ -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