mirror of
https://github.com/reactos/reactos.git
synced 2024-08-05 11:00:55 +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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS Display Control Panel
|
* PROJECT: ReactOS Display Control Panel
|
||||||
* FILE: lib/cpl/desk/appearance.c
|
* FILE: lib/cpl/desk/appearance.c
|
||||||
|
@ -486,11 +485,17 @@ AppearancePage_OnDestroy(HWND hwndDlg, GLOBALS *g)
|
||||||
return TRUE;
|
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
|
INT_PTR CALLBACK
|
||||||
AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
INT i;
|
|
||||||
GLOBALS *g;
|
GLOBALS *g;
|
||||||
LPNMHDR lpnm;
|
LPNMHDR lpnm;
|
||||||
|
|
||||||
|
@ -538,8 +543,7 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
||||||
g->Theme.bHasChanged = TRUE;
|
g->Theme.bHasChanged = TRUE;
|
||||||
i = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETCURSEL, 0, 0);
|
UpdateSelectedThemeId(hwndDlg, g);
|
||||||
g->Theme.Id = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETITEMDATA, (WPARAM)i, 0);
|
|
||||||
LoadThemeFromReg(g);
|
LoadThemeFromReg(g);
|
||||||
//SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, WM_PAINT, 0, 0);
|
//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:
|
case PSN_APPLY:
|
||||||
if (g->Theme.bHasChanged)
|
if (g->Theme.bHasChanged)
|
||||||
{
|
{
|
||||||
|
UpdateSelectedThemeId(hwndDlg, g);
|
||||||
ApplyTheme(g);
|
ApplyTheme(g);
|
||||||
}
|
}
|
||||||
return TRUE;
|
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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS Display Control Panel
|
* PROJECT: ReactOS Display Control Panel
|
||||||
* FILE: dll/cpl/desk/effappdlg.c
|
* FILE: dll/cpl/desk/effappdlg.c
|
||||||
|
|
Loading…
Reference in a new issue