(resend) winecfg: Move application selection to listbox outside any tab.
Dmitry Kozliuk
dmitry.kozliuk at gmail.com
Fri Dec 19 03:04:07 CST 2014
Resend (apply failure): rebase onto origin, correct patch formatting.
Original patch & comment: http://source.winehq.org/patches/data/108224
---
programs/winecfg/about.c | 8 ++
programs/winecfg/appdefaults.c | 80 ++++++++++++-----
programs/winecfg/audio.c | 7 +-
programs/winecfg/driveui.c | 7 +-
programs/winecfg/libraries.c | 10 ++-
programs/winecfg/main.c | 189
++++++++++++++++++++++++++++++++++-------
programs/winecfg/resource.h | 6 ++
programs/winecfg/theme.c | 7 +-
programs/winecfg/winecfg.c | 26 ------
programs/winecfg/winecfg.h | 15 +++-
programs/winecfg/winecfg.rc | 34 +++++---
programs/winecfg/x11drvdlg.c | 10 ++-
12 files changed, 302 insertions(+), 97 deletions(-)
-------------- next part --------------
diff --git a/programs/winecfg/about.c b/programs/winecfg/about.c
index 09cc015..0447981 100644
--- a/programs/winecfg/about.c
+++ b/programs/winecfg/about.c
@@ -74,6 +74,10 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
if(wParam == IDC_ABT_WEB_LINK)
ShellExecuteA(NULL, "open", PACKAGE_URL, NULL, NULL, SW_SHOW);
break;
+
+ case PSN_SETACTIVE:
+ current_page = hDlg;
+ break;
}
break;
@@ -174,6 +178,10 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
return (INT_PTR)CreateSolidBrush(GetSysColor(COLOR_WINDOW));
}
break;
+
+ case WM_APPLICATIONCHANGED:
+ set_window_title(NULL);
+ break;
}
return FALSE;
diff --git a/programs/winecfg/appdefaults.c b/programs/winecfg/appdefaults.c
index 66085f4..911de5c 100644
--- a/programs/winecfg/appdefaults.c
+++ b/programs/winecfg/appdefaults.c
@@ -35,6 +35,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
+static HWND compatibility_dialog;
+static HWND application_list_dialog;
+
static const struct
{
const char *szVersion;
@@ -203,7 +206,7 @@ static void add_listview_item(HWND listview, WCHAR *text, void *association)
}
/* Called when the application is initialized (cannot reinit!) */
-static void init_appsheet(HWND dialog)
+static void init_applist(HWND dialog)
{
HWND listview;
LVITEMW item;
@@ -238,8 +241,6 @@ static void init_appsheet(HWND dialog)
RegCloseKey(key);
}
- init_comboboxes(dialog);
-
/* Select the default settings listview item */
item.iItem = 0;
item.iSubItem = 0;
@@ -297,14 +298,10 @@ static void on_selection_change(HWND dialog, HWND listview)
disable(IDC_APP_REMOVEAPP);
}
- /* reset the combo boxes if we changed from/to global/app-specific */
-
- if ((oldapp && !current_app) || (!oldapp && current_app))
- init_comboboxes(dialog);
-
- update_comboboxes(dialog);
-
- set_window_title(dialog);
+ if (current_page)
+ {
+ SendMessageW(current_page, WM_APPLICATIONCHANGED, (WPARAM)0, (LPARAM)oldapp);
+ }
}
static BOOL list_contains_file(HWND listview, WCHAR *filename)
@@ -397,7 +394,7 @@ static void on_remove_app_click(HWND dialog)
SendMessageW(listview, LVM_SETITEMSTATE, 0, (LPARAM)&item);
SetFocus(listview);
- SendMessageW(GetParent(dialog), PSM_CHANGED, (WPARAM) dialog, 0);
+ SendMessageW(GetParent(compatibility_dialog), PSM_CHANGED, (WPARAM)compatibility_dialog, 0);
}
static void on_winver_change(HWND dialog)
@@ -490,25 +487,38 @@ AppDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
switch (uMsg)
{
case WM_INITDIALOG:
- init_appsheet(hDlg);
+ compatibility_dialog = hDlg;
+ init_comboboxes(hDlg);
+ /* force sheet controls update if application list was created first */
+ if (application_list_dialog)
+ {
+ on_selection_change(hDlg, GetDlgItem(hDlg, IDC_APP_LISTVIEW));
+ }
break;
case WM_SHOWWINDOW:
- set_window_title(hDlg);
+ current_page = hDlg;
+ break;
+
+ case WM_APPLICATIONCHANGED:
+ set_window_title(current_app);
+ /* reset the combo boxes if we changed from/to global/app-specific (lParam = old app name) */
+ if ((lParam && !current_app) || (!lParam && current_app))
+ init_comboboxes(hDlg);
+ update_comboboxes(hDlg);
break;
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code)
{
- case LVN_ITEMCHANGED:
- on_selection_change(hDlg, GetDlgItem(hDlg, IDC_APP_LISTVIEW));
- break;
case PSN_APPLY:
apply();
SetWindowLongPtrW(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
break;
+ case PSN_SETACTIVE:
+ current_page = hDlg;
+ break;
}
-
break;
case WM_COMMAND:
@@ -521,6 +531,39 @@ AppDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
on_winver_change(hDlg);
break;
}
+ }
+ break;
+ }
+
+ return 0;
+}
+
+INT_PTR CALLBACK
+AppListDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ application_list_dialog = hDlg;
+ init_applist(hDlg);
+ break;
+
+ case WM_SHOWWINDOW:
+ set_window_title(current_app);
+ break;
+
+ case WM_NOTIFY:
+ switch (((LPNMHDR)lParam)->code)
+ {
+ case LVN_ITEMCHANGED:
+ on_selection_change(hDlg, GetDlgItem(hDlg, IDC_APP_LISTVIEW));
+ break;
+ }
+ break;
+
+ case WM_COMMAND:
+ switch(HIWORD(wParam))
+ {
case BN_CLICKED:
switch(LOWORD(wParam))
{
@@ -533,7 +576,6 @@ AppDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
break;
}
-
break;
}
diff --git a/programs/winecfg/audio.c b/programs/winecfg/audio.c
index 4e3158c..3d19c0b 100644
--- a/programs/winecfg/audio.c
+++ b/programs/winecfg/audio.c
@@ -354,7 +354,7 @@ AudioDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case WM_SHOWWINDOW:
- set_window_title(hDlg);
+ set_window_title(NULL);
break;
case WM_NOTIFY:
@@ -367,12 +367,17 @@ AudioDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
SetWindowLongPtrW(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
break;
case PSN_SETACTIVE:
+ current_page = hDlg;
break;
}
break;
case WM_INITDIALOG:
initAudioDlg(hDlg);
break;
+
+ case WM_APPLICATIONCHANGED:
+ set_window_title(NULL);
+ break;
}
return FALSE;
diff --git a/programs/winecfg/driveui.c b/programs/winecfg/driveui.c
index 98e057b..cf1db0e 100644
--- a/programs/winecfg/driveui.c
+++ b/programs/winecfg/driveui.c
@@ -694,7 +694,7 @@ DriveDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
break;
case WM_SHOWWINDOW:
- set_window_title(dialog);
+ set_window_title(NULL);
break;
case WM_COMMAND:
@@ -793,6 +793,7 @@ DriveDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
SetWindowLongPtrW(dialog, DWLP_MSGRESULT, PSNRET_NOERROR);
break;
case PSN_SETACTIVE:
+ current_page = dialog;
break;
case LVN_ITEMCHANGED:
{
@@ -804,6 +805,10 @@ DriveDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
}
}
break;
+
+ case WM_APPLICATIONCHANGED:
+ set_window_title(NULL);
+ break;
}
return FALSE;
diff --git a/programs/winecfg/libraries.c b/programs/winecfg/libraries.c
index 660737b..c3f09af 100644
--- a/programs/winecfg/libraries.c
+++ b/programs/winecfg/libraries.c
@@ -534,6 +534,7 @@ static INT_PTR CALLBACK loadorder_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam
EndDialog(hwndDlg, wParam);
return TRUE;
}
+ break;
}
return FALSE;
}
@@ -594,11 +595,16 @@ LibrariesDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
init_libsheet(hDlg);
break;
case WM_SHOWWINDOW:
- set_window_title(hDlg);
+ set_window_title(current_app);
break;
- case WM_NOTIFY:
+ case WM_APPLICATIONCHANGED:
+ load_library_settings(hDlg);
+ set_window_title(current_app);
+ break;
+ case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code) {
case PSN_SETACTIVE:
+ current_page = hDlg;
load_library_settings(hDlg);
break;
}
diff --git a/programs/winecfg/main.c b/programs/winecfg/main.c
index 6ac5f89..28c9c12 100644
--- a/programs/winecfg/main.c
+++ b/programs/winecfg/main.c
@@ -36,26 +36,30 @@
WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
+HWND current_page;
+
+static HWND s_main_window;
+
static INT CALLBACK
PropSheetCallback (HWND hWnd, UINT uMsg, LPARAM lParam)
{
switch (uMsg)
{
- /*
- * hWnd = NULL, lParam == dialog resource
- */
- case PSCB_PRECREATE:
- break;
-
- case PSCB_INITIALIZED:
- /* Set the window icon */
- SendMessageW( hWnd, WM_SETICON, ICON_BIG,
- (LPARAM)LoadIconW( (HINSTANCE)GetWindowLongPtrW(hWnd, GWLP_HINSTANCE),
- MAKEINTRESOURCEW(IDI_WINECFG) ));
- break;
-
- default:
- break;
+ /*
+ * hWnd = NULL, lParam == dialog resource
+ */
+ case PSCB_PRECREATE:
+ break;
+
+ case PSCB_INITIALIZED:
+ /* Set the window icon */
+ SendMessageW( hWnd, WM_SETICON, ICON_BIG,
+ (LPARAM)LoadIconW( (HINSTANCE)GetWindowLongPtrW(hWnd, GWLP_HINSTANCE),
+ MAKEINTRESOURCEW(IDI_WINECFG) ));
+ break;
+
+ default:
+ break;
}
return 0;
}
@@ -63,7 +67,7 @@ PropSheetCallback (HWND hWnd, UINT uMsg, LPARAM lParam)
#define NUM_PROPERTY_PAGES 7
static INT_PTR
-doPropertySheet (HINSTANCE hInstance, HWND hOwner)
+create_property_sheet (HINSTANCE hInstance, HWND hOwner)
{
PROPSHEETPAGEW psp[NUM_PROPERTY_PAGES];
PROPSHEETHEADERW psh;
@@ -96,7 +100,7 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner)
psp[pg].pszTitle = load_string (IDS_TAB_DLLS);
psp[pg].lParam = 0;
pg++;
-
+
/*
* Fill out the (X11Drv) PROPSHEETPAGE data structure
* for the property sheet
@@ -159,7 +163,7 @@ doPropertySheet (HINSTANCE hInstance, HWND hOwner)
* Fill out the PROPSHEETHEADER
*/
psh.dwSize = sizeof (PROPSHEETHEADERW);
- psh.dwFlags = PSH_PROPSHEETPAGE | PSH_USEICONID | PSH_USECALLBACK;
+ psh.dwFlags = PSH_MODELESS | PSH_PROPSHEETPAGE | PSH_USEICONID | PSH_USECALLBACK;
psh.hwndParent = hOwner;
psh.hInstance = hInstance;
psh.u.pszIcon = MAKEINTRESOURCEW (IDI_WINECFG);
@@ -190,7 +194,7 @@ static BOOL
ProcessCmdLine(LPSTR lpCmdLine)
{
if ((lpCmdLine[0] == '/' || lpCmdLine[0] == '-') &&
- (lpCmdLine[1] == 'D' || lpCmdLine[1] == 'd'))
+ (lpCmdLine[1] == 'D' || lpCmdLine[1] == 'd'))
{
gui_mode = FALSE;
if (autodetect_drives()) {
@@ -202,6 +206,135 @@ ProcessCmdLine(LPSTR lpCmdLine)
return FALSE;
}
+static BOOL
+perform_control_layout(HWND dialog, HWND application_list_dialog, HWND property_sheet)
+{
+ RECT settings_client_area, dialog_client_area, application_list_area;
+
+ GetClientRect(dialog, &dialog_client_area);
+ GetClientRect(property_sheet, &settings_client_area);
+ GetClientRect(application_list_dialog, &application_list_area);
+
+ SetParent(property_sheet, dialog);
+ SetWindowLongW(property_sheet, GWL_STYLE, WS_CHILD | WS_VISIBLE);
+ SetWindowLongW(property_sheet, GWL_EXSTYLE, 0);
+ SetWindowPos(
+ property_sheet,
+ NULL,
+ dialog_client_area.right - settings_client_area.right,
+ dialog_client_area.top,
+ settings_client_area.right,
+ settings_client_area.bottom,
+ SWP_NOZORDER);
+
+ SetParent(application_list_dialog, dialog);
+ SetWindowPos(
+ application_list_dialog,
+ NULL,
+ 0,
+ 0,
+ application_list_area.right,
+ application_list_area.bottom,
+ SWP_NOZORDER);
+
+ return TRUE;
+}
+
+void set_window_title(LPCWSTR application)
+{
+ WCHAR newtitle[256];
+
+ /* update the window title */
+ if (application)
+ {
+ WCHAR apptitle[256];
+ LoadStringW (GetModuleHandleW(NULL), IDS_WINECFG_TITLE_APP, apptitle,
+ sizeof(apptitle)/sizeof(apptitle[0]));
+ wsprintfW (newtitle, apptitle, application);
+ }
+ else
+ {
+ LoadStringW (GetModuleHandleW(NULL), IDS_WINECFG_TITLE, newtitle,
+ sizeof(newtitle)/sizeof(newtitle[0]));
+ }
+
+ WINE_TRACE("setting title to %s\n", wine_dbgstr_w (newtitle));
+ SetWindowTextW(s_main_window, newtitle);
+}
+
+static BOOL
+on_init_main_window(HWND dialog)
+{
+ HWND property_sheet;
+ HWND application_list_dialog;
+
+ s_main_window = dialog;
+ current_page = NULL;
+ if ((property_sheet = (HWND)create_property_sheet(GetModuleHandleW(NULL), dialog)))
+ {
+ application_list_dialog = CreateDialogW(
+ GetModuleHandleW(NULL),
+ (LPCWSTR)MAKEINTRESOURCE(IDD_APPLIST),
+ dialog,
+ AppListDlgProc);
+ if (!application_list_dialog)
+ {
+ WINE_ERR("failed to create application list frame, error = %d\n", GetLastError());
+ return FALSE;
+ }
+ SetWindowTextW(dialog, load_string(IDS_WINECFG_TITLE));
+ return perform_control_layout(dialog, application_list_dialog, property_sheet);
+ }
+ else
+ {
+ WINE_ERR("failed to create settings property sheet, error = %d\n", GetLastError());
+ return FALSE;
+ }
+}
+
+/*****************************************************************************
+ * Name : MainDialogProc
+ * Description: Main dialog message processing routine.
+ * Parameters : dialog - dialog window handle;
+ * hMessage - message code;
+ * wParam, lParam - optional additional message data.
+ * Returns : TRUE if message was processed successfully, FALSE otherwise.
+ */
+static INT_PTR CALLBACK
+MainDialogProc(HWND dialog, UINT uMessage, WPARAM wParam, LPARAM lParam)
+{
+ switch (uMessage)
+ {
+ case WM_INITDIALOG:
+ if (!on_init_main_window(dialog))
+ {
+ CloseWindow(dialog);
+ return FALSE;
+ }
+ return TRUE;
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam))
+ {
+ case IDCANCEL:
+ DestroyWindow(dialog);
+ return TRUE;
+ }
+ break;
+
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ return TRUE;
+
+ case WM_CLOSE:
+ DestroyWindow(dialog);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+
/*****************************************************************************
* Name : WinMain
* Description: Main windows entry point
@@ -248,20 +381,12 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrev, LPSTR szCmdLine, int nShow)
WINE_ERR("initialization failed, aborting\n");
ExitProcess(1);
}
-
- /*
- * The next 9 lines should be all that is needed
- * for the Wine Configuration property sheet
- */
- InitCommonControls ();
+
+ InitCommonControls();
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
- if (doPropertySheet (hInstance, NULL) > 0) {
- WINE_TRACE("OK\n");
- } else {
- WINE_TRACE("Cancel\n");
- }
- CoUninitialize();
- ExitProcess (0);
+ DialogBoxW(hInstance, (LPCWSTR)MAKEINTRESOURCE(IDD_MAINWINDOW), NULL, MainDialogProc);
+ CoUninitialize();
+ ExitProcess(0);
return 0;
}
diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h
index fffc4da..b1cb289 100644
--- a/programs/winecfg/resource.h
+++ b/programs/winecfg/resource.h
@@ -47,6 +47,12 @@
#define IDS_WINECFG_TITLE_APP 18 /* App specific title */
#define IDI_WINECFG 100
#define IDI_LOGO 102
+
+#define IDD_MAINWINDOW 106
+#define IDG_APPLICATIONS 210
+
+#define IDD_APPLIST 301
+
#define IDD_ABOUTCFG 107
#define IDD_APPCFG 108
#define IDD_AUDIOCFG 109
diff --git a/programs/winecfg/theme.c b/programs/winecfg/theme.c
index 0618974..779e04d 100644
--- a/programs/winecfg/theme.c
+++ b/programs/winecfg/theme.c
@@ -1127,7 +1127,7 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case WM_SHOWWINDOW:
- set_window_title(hDlg);
+ set_window_title(NULL);
break;
case WM_COMMAND:
@@ -1257,6 +1257,7 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
}
case PSN_SETACTIVE: {
+ current_page = hDlg;
init_dialog (hDlg);
break;
}
@@ -1267,6 +1268,10 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
on_draw_item(hDlg, wParam, lParam);
break;
+ case WM_APPLICATIONCHANGED:
+ set_window_title(NULL);
+ break;
+
default:
break;
}
diff --git a/programs/winecfg/winecfg.c b/programs/winecfg/winecfg.c
index 3ed406b..7b55ae9 100644
--- a/programs/winecfg/winecfg.c
+++ b/programs/winecfg/winecfg.c
@@ -49,32 +49,6 @@ HKEY config_key = NULL;
HMENU hPopupMenus = 0;
-/* this is called from the WM_SHOWWINDOW handlers of each tab page.
- *
- * it's a nasty hack, necessary because the property sheet insists on resetting the window title
- * to the title of the tab, which is utterly useless. dropping the property sheet is on the todo list.
- */
-void set_window_title(HWND dialog)
-{
- WCHAR newtitle[256];
-
- /* update the window title */
- if (current_app)
- {
- WCHAR apptitle[256];
- LoadStringW (GetModuleHandleW(NULL), IDS_WINECFG_TITLE_APP, apptitle,
- sizeof(apptitle)/sizeof(apptitle[0]));
- wsprintfW (newtitle, apptitle, current_app);
- }
- else
- {
- LoadStringW (GetModuleHandleW(NULL), IDS_WINECFG_TITLE, newtitle,
- sizeof(newtitle)/sizeof(newtitle[0]));
- }
-
- WINE_TRACE("setting title to %s\n", wine_dbgstr_w (newtitle));
- SendMessageW (GetParent(dialog), PSM_SETTITLEW, 0, (LPARAM) newtitle);
-}
WCHAR* load_string (UINT id)
diff --git a/programs/winecfg/winecfg.h b/programs/winecfg/winecfg.h
index 110856a..521fffd 100644
--- a/programs/winecfg/winecfg.h
+++ b/programs/winecfg/winecfg.h
@@ -40,6 +40,13 @@
extern WCHAR* current_app; /* NULL means editing global settings */
+extern HWND current_page; /* Defined in main.c, set by settings dialogs. */
+
+/* Sent to a settings page to indicate that current application was changed;
+ * wParam is reserved, lParam is previous application name (may be NULL).
+ * */
+#define WM_APPLICATIONCHANGED (WM_USER + 1)
+
/* Use get_reg_key and set_reg_key to alter registry settings. The changes made through
set_reg_key won't be committed to the registry until process_all_settings is called,
however get_reg_key will still return accurate information.
@@ -76,8 +83,11 @@ WCHAR *keypathW(const WCHAR *section);
BOOL initialize(HINSTANCE hInstance);
extern HKEY config_key;
-/* hack for the property sheet control */
-void set_window_title(HWND dialog);
+/* Sets main dialog window title. The `application' can be used to indicate
+ * that currently visible settings are application-specific, otherwise
+ * when `application' is NULL, the title says something like `Wine config'.
+ */
+void set_window_title(LPCWSTR application);
/* Window procedures */
INT_PTR CALLBACK GraphDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
@@ -88,6 +98,7 @@ INT_PTR CALLBACK LibrariesDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
INT_PTR CALLBACK AudioDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK AppListDlgProc(HWND hDialog, UINT uMessage, WPARAM wParam, LPARAM lParam);
/* Drive management */
BOOL load_drives(void);
diff --git a/programs/winecfg/winecfg.rc b/programs/winecfg/winecfg.rc
index 9f763a7..2ce4414 100644
--- a/programs/winecfg/winecfg.rc
+++ b/programs/winecfg/winecfg.rc
@@ -29,7 +29,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
- IDS_TAB_APPLICATIONS "Applications"
+ IDS_TAB_APPLICATIONS "Compatibility"
IDS_TAB_DLLS "Libraries"
IDS_TAB_DRIVES "Drives"
IDS_CHOOSE_PATH "Select the Unix target directory, please."
@@ -57,7 +57,7 @@ BEGIN
IDS_DLL_NATIVE_BUILTIN "native, builtin"
IDS_DLL_BUILTIN_NATIVE "builtin, native"
IDS_DLL_DISABLED "disabled"
- IDS_DEFAULT_SETTINGS "Default Settings"
+ IDS_DEFAULT_SETTINGS "(Default)"
IDS_EXECUTABLE_FILTER "Wine Programs (*.exe; *.exe.so)"
IDS_USE_GLOBAL_SETTINGS "Use global settings"
IDS_SELECT_EXECUTABLE "Select an executable file"
@@ -123,6 +123,24 @@ BEGIN
IDC_SYSPARAMS_MENUBAR "Menu Bar"
END
+IDD_MAINWINDOW DIALOGEX 0, 0, 400, 276
+STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_CENTER
+FONT 8, "MS Shell Dlg"
+CAPTION "Wine configuration"
+BEGIN
+END
+
+IDD_APPLIST DIALOGEX 0, 0, 120, 276
+STYLE WS_CHILD | WS_VISIBLE
+FONT 8, "MS Shell Dlg"
+BEGIN
+ GROUPBOX "Settings for: ", IDG_APPLICATIONS, 4, 4, 116, 247
+ CONTROL "", IDC_APP_LISTVIEW, "SysListView32", WS_BORDER | WS_TABSTOP | LVS_LIST | LVS_SINGLESEL | LVS_SHOWSELALWAYS,
+ 12, 16, 100, 206
+ PUSHBUTTON "&Add...", IDC_APP_ADDAPP, 12, 228, 48, 14
+ PUSHBUTTON "&Remove", IDC_APP_REMOVEAPP, 64, 228, 48, 14
+END
+
IDD_ABOUTCFG DIALOGEX 0, 0, 260, 220
STYLE WS_CHILD
FONT 8, "MS Shell Dlg"
@@ -144,15 +162,9 @@ IDD_APPCFG DIALOG 0, 0, 260, 220
STYLE WS_CHILD | WS_DISABLED
FONT 8, "MS Shell Dlg"
BEGIN
- GROUPBOX "Application settings",IDC_STATIC, 8,4,244,210
- LTEXT "Wine can mimic different Windows versions for each application. This tab is linked to the Libraries and Graphics tabs to allow you to change system-wide or per-application settings in those tabs as well.",
- IDC_STATIC,15,15,227,45
- CONTROL "",IDC_APP_LISTVIEW,"SysListView32",WS_BORDER | WS_TABSTOP | LVS_LIST | LVS_SINGLESEL | LVS_SHOWSELALWAYS,
- 15,60,230,110
- PUSHBUTTON "&Add application...",IDC_APP_ADDAPP, 15,174,112,14
- PUSHBUTTON "&Remove application",IDC_APP_REMOVEAPP, 133,174,112,14
- LTEXT "&Windows Version:",IDC_STATIC,17,196,80,8
- COMBOBOX IDC_WINVER,100,194,145,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "Compatibility settings",IDC_STATIC, 8, 4, 244, 30
+ LTEXT "&Windows Version:", IDC_STATIC, 17, 18, 80, 8
+ COMBOBOX IDC_WINVER, 100, 15, 145, 56, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
END
IDD_GRAPHCFG DIALOG 0, 0, 260, 220
diff --git a/programs/winecfg/x11drvdlg.c b/programs/winecfg/x11drvdlg.c
index 809068e..de9f1db 100644
--- a/programs/winecfg/x11drvdlg.c
+++ b/programs/winecfg/x11drvdlg.c
@@ -350,7 +350,12 @@ GraphDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
case WM_SHOWWINDOW:
- set_window_title(hDlg);
+ set_window_title(current_app);
+ break;
+
+ case WM_APPLICATIONCHANGED:
+ set_window_title(current_app);
+ init_dialog (hDlg);
break;
case WM_TIMER:
@@ -411,7 +416,8 @@ GraphDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
}
case PSN_SETACTIVE: {
- init_dialog (hDlg);
+ current_page = hDlg;
+ init_dialog (hDlg);
break;
}
}
More information about the wine-patches
mailing list