Commit bf6ed90c authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

winecfg: Set buddy window for the size up-down control only once.

Fix the size up-down control becoming smaller every time the apply button is pressed in the Desktop Integration tab. UDM_SETBUDDY always shrinks the buddy window for a up-down control according to tests. And a PSN_SETACTIVE notification is sent every time the apply button is pressed, thus init_dialog() gets called again and sends an extra UDM_SETBUDDY message. Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e9a5cd2e
......@@ -435,6 +435,12 @@ static void enable_size_and_color_controls (HWND dialog, BOOL enable)
static void init_dialog (HWND dialog)
{
SendDlgItemMessageW(dialog, IDC_SYSPARAM_SIZE_UD, UDM_SETBUDDY,
(WPARAM)GetDlgItem(dialog, IDC_SYSPARAM_SIZE), 0);
}
static void update_dialog (HWND dialog)
{
updating_ui = TRUE;
scan_theme_files();
......@@ -452,7 +458,6 @@ static void init_dialog (HWND dialog)
}
theme_dirty = FALSE;
SendDlgItemMessageW(dialog, IDC_SYSPARAM_SIZE_UD, UDM_SETBUDDY, (WPARAM)GetDlgItem(dialog, IDC_SYSPARAM_SIZE), 0);
SendDlgItemMessageW(dialog, IDC_SYSPARAM_SIZE_UD, UDM_SETRANGE, 0, MAKELONG(100, 8));
updating_ui = FALSE;
......@@ -1197,6 +1202,7 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
update_shell_folder_listview(hDlg);
read_sysparams(hDlg);
init_mime_types(hDlg);
init_dialog(hDlg);
break;
case WM_DESTROY:
......@@ -1349,7 +1355,7 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
break;
}
case PSN_SETACTIVE: {
init_dialog (hDlg);
update_dialog(hDlg);
break;
}
}
......
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