Commit 33e8e88e authored by Frank Richter's avatar Frank Richter Committed by Alexandre Julliard

Load tab titles and property sheet caption from string resources.

parent 8aa1a919
...@@ -183,11 +183,16 @@ END ...@@ -183,11 +183,16 @@ END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_WINE_VERSION "CVS" IDS_WINE_VERSION "CVS"
IDS_TAB_GENERAL "Allgemein" IDS_TAB_APPLICATIONS "Anwendungen"
IDS_TAB_DLLS "Bibliotheken" IDS_TAB_DLLS "Bibliotheken"
IDS_TAB_DRIVES "Laufwerke" IDS_TAB_DRIVES "Laufwerke"
IDS_CHOOSE_PATH "Bitte whlen Sie ein Unix-Verzeichnis fr das Laufwerk." IDS_CHOOSE_PATH "Bitte whlen Sie ein Unix-Verzeichnis fr das Laufwerk."
IDS_HIDE_ADVANCED "Verstecke Erweitert" IDS_HIDE_ADVANCED "Verstecke Erweitert"
IDS_SHOW_ADVANCED "Zeige Erweitert" IDS_SHOW_ADVANCED "Zeige Erweitert"
IDS_NOTHEME "(Kein Motiv)" IDS_NOTHEME "(Kein Motiv)"
IDS_TAB_GRAPHICS "Grafik"
IDS_TAB_APPEARANCE "Darstellung"
IDS_TAB_AUDIO "Audio"
IDS_TAB_ABOUT "ber"
IDS_WINECFG_TITLE "Wine-Konfiguration"
END END
...@@ -185,13 +185,18 @@ END ...@@ -185,13 +185,18 @@ END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_WINE_VERSION "CVS" IDS_WINE_VERSION "CVS"
IDS_TAB_GENERAL "General" IDS_TAB_APPLICATIONS "Applications"
IDS_TAB_DLLS "Libraries" IDS_TAB_DLLS "Libraries"
IDS_TAB_DRIVES "Drives" IDS_TAB_DRIVES "Drives"
IDS_CHOOSE_PATH "Select the unix directory to be mapped, please." IDS_CHOOSE_PATH "Select the unix directory to be mapped, please."
IDS_HIDE_ADVANCED "Hide Advanced" IDS_HIDE_ADVANCED "Hide Advanced"
IDS_SHOW_ADVANCED "Show Advanced" IDS_SHOW_ADVANCED "Show Advanced"
IDS_NOTHEME "(No Theme)" IDS_NOTHEME "(No Theme)"
IDS_TAB_GRAPHICS "Graphics"
IDS_TAB_APPEARANCE "Appearance"
IDS_TAB_AUDIO "Audio"
IDS_TAB_ABOUT "About"
IDS_WINECFG_TITLE "Wine configuration"
END END
......
...@@ -170,7 +170,6 @@ END ...@@ -170,7 +170,6 @@ END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_WINE_VERSION "CVS" IDS_WINE_VERSION "CVS"
IDS_TAB_GENERAL "Gnral"
IDS_TAB_DLLS "Bibliothques" IDS_TAB_DLLS "Bibliothques"
IDS_TAB_DRIVES "Lecteurs" IDS_TAB_DRIVES "Lecteurs"
IDS_CHOOSE_PATH "Veuillez slectionner le rpertoire unix assigner." IDS_CHOOSE_PATH "Veuillez slectionner le rpertoire unix assigner."
......
...@@ -172,7 +172,6 @@ END ...@@ -172,7 +172,6 @@ END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_WINE_VERSION "CVS" IDS_WINE_VERSION "CVS"
IDS_TAB_GENERAL "全般"
IDS_TAB_DLLS "ライブラリ" IDS_TAB_DLLS "ライブラリ"
IDS_TAB_DRIVES "ドライブ" IDS_TAB_DRIVES "ドライブ"
IDS_CHOOSE_PATH "マッピングするUnixディレクトリーを選んでください" IDS_CHOOSE_PATH "マッピングするUnixディレクトリーを選んでください"
......
...@@ -169,7 +169,6 @@ END ...@@ -169,7 +169,6 @@ END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_WINE_VERSION "CVS" IDS_WINE_VERSION "CVS"
IDS_TAB_GENERAL "Algemeen"
IDS_TAB_DLLS "Bibliotheken" IDS_TAB_DLLS "Bibliotheken"
IDS_TAB_DRIVES "Stations" IDS_TAB_DRIVES "Stations"
IDS_CHOOSE_PATH "Selecteer een unix folder voor dit station." IDS_CHOOSE_PATH "Selecteer een unix folder voor dit station."
......
...@@ -173,7 +173,6 @@ END ...@@ -173,7 +173,6 @@ END
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
BEGIN BEGIN
IDS_WINE_VERSION "CVS" IDS_WINE_VERSION "CVS"
IDS_TAB_GENERAL ""
IDS_TAB_DLLS "" IDS_TAB_DLLS ""
IDS_TAB_DRIVES "" IDS_TAB_DRIVES ""
IDS_CHOOSE_PATH " unix ." IDS_CHOOSE_PATH " unix ."
......
...@@ -86,26 +86,41 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -86,26 +86,41 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
return FALSE; return FALSE;
} }
static WCHAR* load_string (UINT id)
{
WCHAR buf[100];
int len;
WCHAR* newStr;
LoadStringW (GetModuleHandle (NULL), id, buf, sizeof(buf)/sizeof(buf[0]));
len = lstrlenW (buf);
newStr = HeapAlloc (GetProcessHeap(), 0, (len + 1) * sizeof (WCHAR));
memcpy (newStr, buf, len * sizeof (WCHAR));
newStr[len] = 0;
return newStr;
}
#define NUM_PROPERTY_PAGES 7 #define NUM_PROPERTY_PAGES 7
static INT_PTR static INT_PTR
doPropertySheet (HINSTANCE hInstance, HWND hOwner) doPropertySheet (HINSTANCE hInstance, HWND hOwner)
{ {
PROPSHEETPAGE psp[NUM_PROPERTY_PAGES]; PROPSHEETPAGEW psp[NUM_PROPERTY_PAGES];
PROPSHEETHEADER psh; PROPSHEETHEADERW psh;
int pg = 0; /* start with page 0 */ int pg = 0; /* start with page 0 */
/* /*
* Fill out the (Applications) PROPSHEETPAGE data structure * Fill out the (Applications) PROPSHEETPAGE data structure
* for the property sheet * for the property sheet
*/ */
psp[pg].dwSize = sizeof (PROPSHEETPAGE); psp[pg].dwSize = sizeof (PROPSHEETPAGEW);
psp[pg].dwFlags = PSP_USETITLE; psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance; psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCE (IDD_APPCFG); psp[pg].u.pszTemplate = MAKEINTRESOURCEW (IDD_APPCFG);
psp[pg].u2.pszIcon = NULL; psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = AppDlgProc; psp[pg].pfnDlgProc = AppDlgProc;
psp[pg].pszTitle = "Applications"; psp[pg].pszTitle = load_string (IDS_TAB_APPLICATIONS);
psp[pg].lParam = 0; psp[pg].lParam = 0;
pg++; pg++;
...@@ -113,13 +128,13 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner) ...@@ -113,13 +128,13 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner)
* Fill out the (Libraries) PROPSHEETPAGE data structure * Fill out the (Libraries) PROPSHEETPAGE data structure
* for the property sheet * for the property sheet
*/ */
psp[pg].dwSize = sizeof (PROPSHEETPAGE); psp[pg].dwSize = sizeof (PROPSHEETPAGEW);
psp[pg].dwFlags = PSP_USETITLE; psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance; psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCE (IDD_DLLCFG); psp[pg].u.pszTemplate = MAKEINTRESOURCEW (IDD_DLLCFG);
psp[pg].u2.pszIcon = NULL; psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = LibrariesDlgProc; psp[pg].pfnDlgProc = LibrariesDlgProc;
psp[pg].pszTitle = "Libraries"; psp[pg].pszTitle = load_string (IDS_TAB_DLLS);
psp[pg].lParam = 0; psp[pg].lParam = 0;
pg++; pg++;
...@@ -127,43 +142,43 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner) ...@@ -127,43 +142,43 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner)
* Fill out the (X11Drv) PROPSHEETPAGE data structure * Fill out the (X11Drv) PROPSHEETPAGE data structure
* for the property sheet * for the property sheet
*/ */
psp[pg].dwSize = sizeof (PROPSHEETPAGE); psp[pg].dwSize = sizeof (PROPSHEETPAGEW);
psp[pg].dwFlags = PSP_USETITLE; psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance; psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCE (IDD_GRAPHCFG); psp[pg].u.pszTemplate = MAKEINTRESOURCEW (IDD_GRAPHCFG);
psp[pg].u2.pszIcon = NULL; psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = GraphDlgProc; psp[pg].pfnDlgProc = GraphDlgProc;
psp[pg].pszTitle = "Graphics"; psp[pg].pszTitle = load_string (IDS_TAB_GRAPHICS);
psp[pg].lParam = 0; psp[pg].lParam = 0;
pg++; pg++;
psp[pg].dwSize = sizeof (PROPSHEETPAGE); psp[pg].dwSize = sizeof (PROPSHEETPAGEW);
psp[pg].dwFlags = PSP_USETITLE; psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance; psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCE (IDD_APPEARANCE); psp[pg].u.pszTemplate = MAKEINTRESOURCEW (IDD_APPEARANCE);
psp[pg].u2.pszIcon = NULL; psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = ThemeDlgProc; psp[pg].pfnDlgProc = ThemeDlgProc;
psp[pg].pszTitle = "Appearance"; psp[pg].pszTitle = load_string (IDS_TAB_APPEARANCE);
psp[pg].lParam = 0; psp[pg].lParam = 0;
pg++; pg++;
psp[pg].dwSize = sizeof (PROPSHEETPAGE); psp[pg].dwSize = sizeof (PROPSHEETPAGEW);
psp[pg].dwFlags = PSP_USETITLE; psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance; psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCE (IDD_DRIVECFG); psp[pg].u.pszTemplate = MAKEINTRESOURCEW (IDD_DRIVECFG);
psp[pg].u2.pszIcon = NULL; psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = DriveDlgProc; psp[pg].pfnDlgProc = DriveDlgProc;
psp[pg].pszTitle = "Drives"; psp[pg].pszTitle = load_string (IDS_TAB_DRIVES);
psp[pg].lParam = 0; psp[pg].lParam = 0;
pg++; pg++;
psp[pg].dwSize = sizeof (PROPSHEETPAGE); psp[pg].dwSize = sizeof (PROPSHEETPAGEW);
psp[pg].dwFlags = PSP_USETITLE; psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance; psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCE (IDD_AUDIOCFG); psp[pg].u.pszTemplate = MAKEINTRESOURCEW (IDD_AUDIOCFG);
psp[pg].u2.pszIcon = NULL; psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = AudioDlgProc; psp[pg].pfnDlgProc = AudioDlgProc;
psp[pg].pszTitle = "Audio"; psp[pg].pszTitle = load_string (IDS_TAB_AUDIO);
psp[pg].lParam = 0; psp[pg].lParam = 0;
pg++; pg++;
...@@ -171,34 +186,34 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner) ...@@ -171,34 +186,34 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner)
* Fill out the (General) PROPSHEETPAGE data structure * Fill out the (General) PROPSHEETPAGE data structure
* for the property sheet * for the property sheet
*/ */
psp[pg].dwSize = sizeof (PROPSHEETPAGE); psp[pg].dwSize = sizeof (PROPSHEETPAGEW);
psp[pg].dwFlags = PSP_USETITLE; psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance; psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCE (IDD_ABOUTCFG); psp[pg].u.pszTemplate = MAKEINTRESOURCEW (IDD_ABOUTCFG);
psp[pg].u2.pszIcon = NULL; psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = AboutDlgProc; psp[pg].pfnDlgProc = AboutDlgProc;
psp[pg].pszTitle = "About"; psp[pg].pszTitle = load_string (IDS_TAB_ABOUT);
psp[pg].lParam = 0; psp[pg].lParam = 0;
pg++; pg++;
/* /*
* Fill out the PROPSHEETHEADER * Fill out the PROPSHEETHEADER
*/ */
psh.dwSize = sizeof (PROPSHEETHEADER); psh.dwSize = sizeof (PROPSHEETHEADERW);
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_USEICONID | PSH_USECALLBACK; psh.dwFlags = PSH_PROPSHEETPAGE | PSH_USEICONID | PSH_USECALLBACK;
psh.hwndParent = hOwner; psh.hwndParent = hOwner;
psh.hInstance = hInstance; psh.hInstance = hInstance;
psh.u.pszIcon = NULL; psh.u.pszIcon = NULL;
psh.pszCaption = "Wine Configuration"; psh.pszCaption = load_string (IDS_WINECFG_TITLE);
psh.nPages = NUM_PROPERTY_PAGES; psh.nPages = NUM_PROPERTY_PAGES;
psh.u3.ppsp = (LPCPROPSHEETPAGE) & psp; psh.u3.ppsp = (LPCPROPSHEETPAGEW) & psp;
psh.pfnCallback = (PFNPROPSHEETCALLBACK) PropSheetCallback; psh.pfnCallback = (PFNPROPSHEETCALLBACK) PropSheetCallback;
psh.u2.nStartPage = 0; psh.u2.nStartPage = 0;
/* /*
* Display the modal property sheet * Display the modal property sheet
*/ */
return PropertySheet (&psh); return PropertySheetW (&psh);
} }
/****************************************************************************** /******************************************************************************
......
...@@ -25,13 +25,18 @@ ...@@ -25,13 +25,18 @@
#define IDC_STATIC -1 #define IDC_STATIC -1
#define IDS_WINE_VERSION 1 #define IDS_WINE_VERSION 1
#define IDS_TAB_GENERAL 2 #define IDS_TAB_APPLICATIONS 2
#define IDS_TAB_DLLS 3 #define IDS_TAB_DLLS 3
#define IDS_TAB_DRIVES 4 #define IDS_TAB_DRIVES 4
#define IDS_CHOOSE_PATH 5 #define IDS_CHOOSE_PATH 5
#define IDS_SHOW_ADVANCED 6 #define IDS_SHOW_ADVANCED 6
#define IDS_HIDE_ADVANCED 7 #define IDS_HIDE_ADVANCED 7
#define IDS_NOTHEME 8 #define IDS_NOTHEME 8
#define IDS_TAB_GRAPHICS 9
#define IDS_TAB_APPEARANCE 10
#define IDS_TAB_AUDIO 11
#define IDS_TAB_ABOUT 12
#define IDS_WINECFG_TITLE 13
#define IDD_MAINDLG 101 #define IDD_MAINDLG 101
#define IDB_WINE 104 #define IDB_WINE 104
#define IDD_ABOUTCFG 107 #define IDD_ABOUTCFG 107
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment