Commit 2c6ea211 authored by Chris Morgan's avatar Chris Morgan Committed by Alexandre Julliard

Rename 'General tab' to 'About', move to the last position.

Make applications tab handle global and per-app winver, dosver and winelook settings, mirroring the Libraries tab. Code copied from Robert van Herk's libraries tab. Move global/app specific function and global to the x11drv tab where it is currently used. Add a couple of property helper functions. Set 3D border around treeview controls. Removed invalid resources from languages other than En.
parent 950808af
......@@ -23,24 +23,15 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
IDD_GENERALCFG DIALOGEX 0, 0, 260, 250
IDD_ABOUTCFG DIALOGEX 0, 0, 260, 250
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
COMBOBOX IDC_WINVER,83,153,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_DOSVER,83,172,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_WINELOOK,83,190,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Wine Version:",IDC_STATIC,119,17,45,8
LTEXT "CVS",IDC_WINEVER,169,17,56,8
LTEXT "Windows Version:",IDC_STATIC,17,155,58,8
LTEXT "Windows Look:",IDC_STATIC,17,193,58,8
LTEXT "DOS Version:",IDC_STATIC,17,173,57,8
CONTROL IDB_WINE,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_REALSIZEIMAGE | WS_BORDER,15,17,157,111, WS_EX_TRANSPARENT
LTEXT "http://www.winehq.org/",IDC_STATIC,119,31,106,8
GROUPBOX "Default Behaviour",IDC_STATIC,8,115,244,97
LTEXT "Wine provides the ability for Windows applications to mimic various Windows versions and styles",
IDC_STATIC,15,128,227,20
GROUPBOX "Information",IDC_STATIC,8,4,244,106
CTEXT "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.",
IDC_STATIC,119,44,124,59
......@@ -50,20 +41,18 @@ IDD_APPCFG DIALOG DISCARDABLE 0, 0, 260, 250
STYLE WS_CHILD | WS_DISABLED
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "Configuring global settings",IDC_EDITING_GLOBAL,
"Button",BS_AUTORADIOBUTTON,8,8,244,10
CONTROL "Configuring application specific setttings",IDC_EDITING_APP,
"Button",BS_AUTORADIOBUTTON,8,18,244,10
LTEXT "Here you can override the default settings on a per-application basis:",
IDC_STATIC,8,35,244,20
LISTBOX IDC_LIST_APPS,8,48,244,176,WS_TABSTOP | WS_VSCROLL
PUSHBUTTON "Add new application...",IDC_ADD_APPDEFAULT,170,226,82,14
PUSHBUTTON "Remove",IDC_REMOVE_APPDEFAULT,130,226,37,14
GROUPBOX "Application Settings",IDC_STATIC, 8,4,244,240
LTEXT "Wine provides the ability for Windows applications to mimic various Windows versions and styles",
IDC_STATIC,15,20,227,20
CONTROL "Applications",IDC_APP_TREEVIEW,"SysTreeView32",WS_BORDER | WS_TABSTOP | TVS_LINESATROOT | TVS_HASLINES | TVS_SHOWSELALWAYS | TVS_HASBUTTONS, 15,40,142,145
PUSHBUTTON "Add application...",IDC_APP_ADDAPP, 163,40,82,60
PUSHBUTTON "Remove application",IDC_APP_REMOVEAPP, 163,125,82,60
LTEXT "Windows Version:",IDC_STATIC,17,192,58,8
LTEXT "DOS Version:",IDC_STATIC,17,211,57,8
LTEXT "Windows Look:",IDC_STATIC,17,229,58,8
COMBOBOX IDC_WINVER,83,190,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_DOSVER,83,208,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_WINELOOK,83,226,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
END
IDD_X11DRVCFG DIALOG DISCARDABLE 0, 0, 260, 250
......@@ -98,7 +87,7 @@ BEGIN
GROUPBOX "DLL Overrides",IDC_STATIC,8,4,244,240
LTEXT "Libraries can be specified individually to be either builtin or native. A DLL entry specified as ""*"" pertains to all DLLs not specified explicitly.\n\nBe careful, wrong settings here have the potential to pretty much kill your setup."
, IDC_STATIC,15,17,228,47
CONTROL "DLL Overrides", IDC_TREE_DLLS, "SysTreeView32", WS_TABSTOP | TVS_LINESATROOT | TVS_HASLINES | TVS_SHOWSELALWAYS | TVS_HASBUTTONS, 15,65,142,172
CONTROL "DLL Overrides", IDC_TREE_DLLS, "SysTreeView32", WS_BORDER | WS_TABSTOP | TVS_LINESATROOT | TVS_HASLINES | TVS_SHOWSELALWAYS | TVS_HASBUTTONS, 15,65,142,172
LTEXT "Load order:",IDC_STATIC,163,65,37,8
CONTROL "Builtin (Wine)",IDC_RAD_BUILTIN,"Button", BS_AUTORADIOBUTTON | WS_GROUP,163,80,57,10
CONTROL "Native (Windows)",IDC_RAD_NATIVE,"Button", BS_AUTORADIOBUTTON,163,95,72,10
......
......@@ -49,11 +49,6 @@ IDD_APPCFG DIALOG DISCARDABLE 0, 0, 260, 250
STYLE WS_CHILD | WS_DISABLED
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List2",IDC_LIST_APPS,"SysListView32",LVS_LIST |
LVS_NOLABELWRAP | WS_BORDER | WS_TABSTOP,16,39,226,108
GROUPBOX "Configuracin especfica de aplicaciones",IDC_STATIC,8,4,244,151
LTEXT "Esta configuracin le permite sobreponerse a la configuracin por defecto de Wine (como est especificada en otras pestaas de configuracin) para aplicaciones concretas.",
IDC_STATIC,15,17,228,20
END
IDD_X11DRVCFG DIALOG DISCARDABLE 0, 0, 260, 250
......
......@@ -48,18 +48,6 @@ IDD_APPCFG DIALOG DISCARDABLE 0, 0, 260, 250
STYLE WS_CHILD | WS_DISABLED
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "Configuraes globais",IDC_EDITING_GLOBAL,
"Button",BS_AUTORADIOBUTTON,8,8,244,10
CONTROL "Configuraes especficas da aplicao",IDC_EDITING_APP,
"Button",BS_AUTORADIOBUTTON,8,18,244,10
LTEXT "Sobreescreva aqui as configuraes padres para cada aplicao:",
IDC_STATIC,8,35,244,20
LISTBOX IDC_LIST_APPS,8,48,244,176,WS_TABSTOP | WS_VSCROLL
PUSHBUTTON "Adionar nova aplicao...",IDC_ADD_APPDEFAULT,170,226,82,14
PUSHBUTTON "Remover",IDC_REMOVE_APPDEFAULT,130,226,37,14
END
IDD_X11DRVCFG DIALOG DISCARDABLE 0, 0, 260, 250
......
......@@ -62,11 +62,6 @@ IDD_APPCFG DIALOG DISCARDABLE 0, 0, 260, 250
STYLE WS_CHILD | WS_DISABLED
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List2",IDC_LIST_APPS,"SysListView32",LVS_LIST |
LVS_NOLABELWRAP | WS_BORDER | WS_TABSTOP,16,39,226,108
GROUPBOX " ",IDC_STATIC,8,4,244,151
LTEXT " Wine ( ) .",
IDC_STATIC,15,17,228,20
END
IDD_X11DRVCFG DIALOG DISCARDABLE 0, 0, 260, 250
......
......@@ -49,11 +49,6 @@ IDD_APPCFG DIALOG DISCARDABLE 0, 0, 260, 250
STYLE WS_CHILD | WS_DISABLED
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List2",IDC_LIST_APPS,"SysListView32",LVS_LIST |
LVS_NOLABELWRAP | WS_BORDER | WS_TABSTOP,16,39,226,108
GROUPBOX "Application Specific Setting",IDC_STATIC,8,4,244,151
LTEXT "These settings allow you to overwrite Wine default settings (as specified in other configuration tabs) on a per-application basis.",
IDC_STATIC,15,17,228,20
END
IDD_X11DRVCFG DIALOG DISCARDABLE 0, 0, 260, 250
......
......@@ -36,10 +36,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
#define versionSection (appSettings == EDITING_GLOBAL ? "Version" : (getSectionForApp("Version")))
#define tweakSection (appSettings == EDITING_GLOBAL ? "Tweak.Layout" : (getSectionForApp("Tweak.Layout")))
void CALLBACK
PropSheetCallback (HWND hWnd, UINT uMsg, LPARAM lParam)
{
......@@ -59,67 +55,8 @@ PropSheetCallback (HWND hWnd, UINT uMsg, LPARAM lParam)
}
}
void
initGeneralDlg (HWND hDlg)
{
int i;
const VERSION_DESC *pVer = NULL;
char *curWinVer = getConfigValue(versionSection, "Windows", "win98");
char *curDOSVer = getConfigValue(versionSection, "DOS", "6.22");
char *curWineLook = getConfigValue(tweakSection, "WineLook", "win95");
/* normalize the version strings */
if (!strcmp(curWinVer, "win2000") || !strcmp(curWinVer, "nt2k") || !strcmp(curWinVer, "nt2000")) {
free(curWinVer);
curWinVer = strdup("win2k");
}
if (!strcmp(curWinVer, "win2k3")) {
free(curWinVer);
curWinVer = strdup("win2003");
}
if ((pVer = getWinVersions ()))
{
for (i = 0; *pVer->szVersion; i++, pVer++)
{
SendDlgItemMessage (hDlg, IDC_WINVER, CB_ADDSTRING,
0, (LPARAM) pVer->szDescription);
if (!strcmp (pVer->szVersion, curWinVer))
SendDlgItemMessage (hDlg, IDC_WINVER, CB_SETCURSEL,
(WPARAM) i, 0);
}
}
if ((pVer = getDOSVersions ()))
{
for (i = 0; *pVer->szVersion; i++, pVer++)
{
SendDlgItemMessage (hDlg, IDC_DOSVER, CB_ADDSTRING,
0, (LPARAM) pVer->szDescription);
if (!strcmp (pVer->szVersion, curDOSVer))
SendDlgItemMessage (hDlg, IDC_DOSVER, CB_SETCURSEL,
(WPARAM) i, 0);
}
}
if ((pVer = getWinelook ()))
{
for (i = 0; *pVer->szVersion; i++, pVer++)
{
SendDlgItemMessage (hDlg, IDC_WINELOOK, CB_ADDSTRING,
0, (LPARAM) pVer->szDescription);
if (!strcmp (pVer->szVersion, curWineLook))
SendDlgItemMessage (hDlg, IDC_WINELOOK, CB_SETCURSEL,
(WPARAM) i, 0);
}
}
free(curWinVer);
free(curDOSVer);
free(curWineLook);
}
INT_PTR CALLBACK
GeneralDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg) {
......@@ -127,47 +64,9 @@ GeneralDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (((LPNMHDR)lParam)->code != PSN_SETACTIVE) break;
/* otherwise fall through, we want to refresh the page as well */
case WM_INITDIALOG:
initGeneralDlg (hDlg);
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_WINVER: if (HIWORD(wParam) == CBN_SELCHANGE) {
/* user changed the wine version combobox */
int selection = SendDlgItemMessage( hDlg, IDC_WINVER, CB_GETCURSEL, 0, 0);
VERSION_DESC *desc = getWinVersions();
while (selection > 0) {
desc++; selection--;
}
addTransaction(versionSection, "Windows", ACTION_SET, desc->szVersion);
}
break;
case IDC_WINELOOK: if (HIWORD(wParam) == CBN_SELCHANGE) {
/* user changed the wine look combo box */
int selection = SendDlgItemMessage( hDlg, IDC_WINELOOK, CB_GETCURSEL, 0, 0);
VERSION_DESC *desc = getWinelook();
while (selection > 0) {
desc++; selection--;
}
addTransaction(tweakSection, "WineLook", ACTION_SET, desc->szVersion);
}
break;
case IDC_DOSVER: if (HIWORD(wParam) == CBN_SELCHANGE) {
/* user changed the dos version combo box */
int selection = SendDlgItemMessage( hDlg, IDC_WINELOOK, CB_GETCURSEL, 0, 0);
VERSION_DESC *desc = getDOSVersions();
while (selection > 0) {
desc++; selection--;
}
addTransaction(versionSection, "DOS", ACTION_SET, desc->szVersion);
}
}
break;
default:
......@@ -184,77 +83,84 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner)
{
PROPSHEETPAGE psp[NUM_PROPERTY_PAGES];
PROPSHEETHEADER psh;
/*
* Fill out the (General) PROPSHEETPAGE data structure
* for the property sheet
*/
psp[0].dwSize = sizeof (PROPSHEETPAGE);
psp[0].dwFlags = PSP_USETITLE;
psp[0].hInstance = hInstance;
psp[0].u.pszTemplate = MAKEINTRESOURCE (IDD_GENERALCFG);
psp[0].u2.pszIcon = NULL;
psp[0].pfnDlgProc = GeneralDlgProc;
psp[0].pszTitle = "General";
psp[0].lParam = 0;
int pg = 0; /* start with page 0 */
/*
* Fill out the (Applications) PROPSHEETPAGE data structure
* for the property sheet
*/
psp[1].dwSize = sizeof (PROPSHEETPAGE);
psp[1].dwFlags = PSP_USETITLE;
psp[1].hInstance = hInstance;
psp[1].u.pszTemplate = MAKEINTRESOURCE (IDD_APPCFG);
psp[1].u2.pszIcon = NULL;
psp[1].pfnDlgProc = AppDlgProc;
psp[1].pszTitle = "Applications";
psp[1].lParam = 0;
psp[pg].dwSize = sizeof (PROPSHEETPAGE);
psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCE (IDD_APPCFG);
psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = AppDlgProc;
psp[pg].pszTitle = "Applications";
psp[pg].lParam = 0;
pg++;
/*
* Fill out the (Libraries) PROPSHEETPAGE data structure
* for the property sheet
*/
psp[2].dwSize = sizeof (PROPSHEETPAGE);
psp[2].dwFlags = PSP_USETITLE;
psp[2].hInstance = hInstance;
psp[2].u.pszTemplate = MAKEINTRESOURCE (IDD_DLLCFG);
psp[2].u2.pszIcon = NULL;
psp[2].pfnDlgProc = LibrariesDlgProc;
psp[2].pszTitle = "Libraries";
psp[2].lParam = 0;
psp[pg].dwSize = sizeof (PROPSHEETPAGE);
psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCE (IDD_DLLCFG);
psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = LibrariesDlgProc;
psp[pg].pszTitle = "Libraries";
psp[pg].lParam = 0;
pg++;
/*
* Fill out the (X11Drv) PROPSHEETPAGE data structure
* for the property sheet
*/
psp[3].dwSize = sizeof (PROPSHEETPAGE);
psp[3].dwFlags = PSP_USETITLE;
psp[3].hInstance = hInstance;
psp[3].u.pszTemplate = MAKEINTRESOURCE (IDD_X11DRVCFG);
psp[3].u2.pszIcon = NULL;
psp[3].pfnDlgProc = X11DrvDlgProc;
psp[3].pszTitle = "X11 Driver";
psp[3].lParam = 0;
psp[pg].dwSize = sizeof (PROPSHEETPAGE);
psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCE (IDD_X11DRVCFG);
psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = X11DrvDlgProc;
psp[pg].pszTitle = "X11 Driver";
psp[pg].lParam = 0;
pg++;
psp[pg].dwSize = sizeof (PROPSHEETPAGE);
psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCE (IDD_DRIVECFG);
psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = DriveDlgProc;
psp[pg].pszTitle = "Drives";
psp[pg].lParam = 0;
pg++;
psp[pg].dwSize = sizeof (PROPSHEETPAGE);
psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCE (IDD_AUDIOCFG);
psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = AudioDlgProc;
psp[pg].pszTitle = "Audio";
psp[pg].lParam = 0;
pg++;
psp[4].dwSize = sizeof (PROPSHEETPAGE);
psp[4].dwFlags = PSP_USETITLE;
psp[4].hInstance = hInstance;
psp[4].u.pszTemplate = MAKEINTRESOURCE (IDD_DRIVECFG);
psp[4].u2.pszIcon = NULL;
psp[4].pfnDlgProc = DriveDlgProc;
psp[4].pszTitle = "Drives";
psp[4].lParam = 0;
/*
* Fill out the (General) PROPSHEETPAGE data structure
* for the property sheet
*/
psp[pg].dwSize = sizeof (PROPSHEETPAGE);
psp[pg].dwFlags = PSP_USETITLE;
psp[pg].hInstance = hInstance;
psp[pg].u.pszTemplate = MAKEINTRESOURCE (IDD_ABOUTCFG);
psp[pg].u2.pszIcon = NULL;
psp[pg].pfnDlgProc = AboutDlgProc;
psp[pg].pszTitle = "About";
psp[pg].lParam = 0;
pg++;
psp[5].dwSize = sizeof (PROPSHEETPAGE);
psp[5].dwFlags = PSP_USETITLE;
psp[5].hInstance = hInstance;
psp[5].u.pszTemplate = MAKEINTRESOURCE (IDD_AUDIOCFG);
psp[5].u2.pszIcon = NULL;
psp[5].pfnDlgProc = AudioDlgProc;
psp[5].pszTitle = "Audio";
psp[5].lParam = 0;
/*
* Fill out the PROPSHEETHEADER
*/
......
......@@ -25,6 +25,7 @@
#include "properties.h"
static VERSION_DESC sWinVersions[] = {
{"", "Use default(Global setting)"},
{"win20", "Windows 2.0"},
{"win30", "Windows 3.0"},
{"win31", "Windows 3.1"},
......@@ -40,11 +41,13 @@ static VERSION_DESC sWinVersions[] = {
};
static VERSION_DESC sDOSVersions[] = {
{"", "Use default(Global setting)"},
{"6.22", "MS-DOS 6.22"},
{"", ""}
};
static VERSION_DESC sWineLook[] = {
{"", "Use default(Global setting)"},
{"win31", "Windows 3.1"},
{"win95", "Windows 95"},
{"win98", "Windows 98"},
......@@ -127,3 +130,27 @@ AUDIO_DRIVER* getAudioDrivers(void)
{
return sAudioDrivers;
}
/* Functions to convert from version to description and back */
char* getVersionFromDescription(VERSION_DESC* pVer, char *desc)
{
for (; *pVer->szVersion; pVer++)
{
if(!strcasecmp(pVer->szDescription, desc))
return pVer->szVersion;
}
return NULL;
}
char* getDescriptionFromVersion(VERSION_DESC* pVer, char *ver)
{
for (; *pVer->szDescription; pVer++)
{
if(!strcasecmp(pVer->szVersion, ver))
return pVer->szDescription;
}
return NULL;
}
......@@ -92,5 +92,7 @@ VERSION_DESC *getDOSVersions(void);
VERSION_DESC *getWinelook(void);
DLL_DESC *getDLLDefaults(void);
AUDIO_DRIVER *getAudioDrivers(void);
char* getVersionFromDescription(VERSION_DESC *pVer, char *desc);
char* getDescriptionFromVersion(VERSION_DESC *pVer, char *ver);
#endif
......@@ -28,7 +28,7 @@
#define IDS_TAB_DRIVES 4
#define IDD_MAINDLG 101
#define IDB_WINE 104
#define IDD_GENERALCFG 107
#define IDD_ABOUTCFG 107
#define IDD_APPCFG 108
#define IDD_AUDIOCFG 109
#define IDD_X11DRVCFG 110
......@@ -116,11 +116,9 @@
#define IDC_DOUBLE_BUFFER 1080
/* applications tab */
#define IDC_LIST_APPS 1021
#define IDC_EDITING_GLOBAL 1081
#define IDC_EDITING_APP 1082
#define IDC_ADD_APPDEFAULT 1083
#define IDC_REMOVE_APPDEFAULT 1084
#define IDC_APP_TREEVIEW 1021
#define IDC_APP_ADDAPP 1081
#define IDC_APP_REMOVEAPP 1082
/* audio tab */
#define IDC_AUDIO_AUTODETECT 1085
......
......@@ -119,7 +119,6 @@ char *getDialogItemText(HWND hDlg, WORD controlID);
#define disable(id) EnableWindow(GetDlgItem(dialog, id), 0);
#define enable(id) EnableWindow(GetDlgItem(dialog, id), 1);
#define WINE_KEY_ROOT "Software\\Wine\\Wine\\Config"
#endif
......@@ -39,6 +39,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
int updatingUI;
int appSettings = EDITING_GLOBAL; /* start by editing global */
char *currentApp; /* the app we are currently editing, or NULL if editing global */
char *getSectionForApp(char *pSection)
{
static char *lastResult = NULL;
if (lastResult) HeapFree(GetProcessHeap(), 0, lastResult);
lastResult = HeapAlloc(GetProcessHeap(), 0, strlen("AppDefaults\\") + strlen(currentApp) + 2 /* \\ */ + strlen(pSection) + 1 /* terminator */);
sprintf(lastResult, "AppDefaults\\%s\\%s", currentApp, pSection);
return lastResult;
}
void updateGUIForDesktopMode(HWND dialog) {
WINE_TRACE("\n");
......
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