mirror of
https://github.com/reactos/reactos.git
synced 2024-07-06 12:45:16 +00:00
[DESK]
- Create a function for updating the currently selected theme id - Call this function before saving theme data to the registry, fixes saving invalid theme indexes - Remove unnecessary header tags See issue #5016 for more details. svn path=/trunk/; revision=46870
This commit is contained in:
parent
cebadab3ab
commit
640fb7d222
|
@ -1,5 +1,4 @@
|
|||
/* $Id$
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Display Control Panel
|
||||
* FILE: lib/cpl/desk/appearance.c
|
||||
|
@ -486,11 +485,17 @@ AppearancePage_OnDestroy(HWND hwndDlg, GLOBALS *g)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
UpdateSelectedThemeId(HWND hwndDlg, GLOBALS *g)
|
||||
{
|
||||
int sel;
|
||||
sel = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETCURSEL, 0, 0);
|
||||
g->Theme.Id = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETITEMDATA, (WPARAM)sel, 0);
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK
|
||||
AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
INT i;
|
||||
GLOBALS *g;
|
||||
LPNMHDR lpnm;
|
||||
|
||||
|
@ -538,8 +543,7 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
||||
g->Theme.bHasChanged = TRUE;
|
||||
i = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETCURSEL, 0, 0);
|
||||
g->Theme.Id = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETITEMDATA, (WPARAM)i, 0);
|
||||
UpdateSelectedThemeId(hwndDlg, g);
|
||||
LoadThemeFromReg(g);
|
||||
//SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, WM_PAINT, 0, 0);
|
||||
}
|
||||
|
@ -557,6 +561,7 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case PSN_APPLY:
|
||||
if (g->Theme.bHasChanged)
|
||||
{
|
||||
UpdateSelectedThemeId(hwndDlg, g);
|
||||
ApplyTheme(g);
|
||||
}
|
||||
return TRUE;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* $Id: effappdlg.c 24836 2007-02-12 03:12:56Z tkreuzer $
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Display Control Panel
|
||||
* FILE: dll/cpl/desk/effappdlg.c
|
||||
|
|
Loading…
Reference in a new issue