Author: mkupfer
Date: Mon Mar 2 01:55:02 2009
New Revision: 39838
URL:
http://svn.reactos.org/svn/reactos?rev=39838&view=rev
Log:
- Show the currently selected color scheme in combo box instead of default "Reactos
Standard".
- The value HKCU\Control Panel\Apperance\(New)Current isn't used yet.
- See issue #4164 for details.
Modified:
trunk/reactos/dll/cpl/desk/appearance.c
trunk/reactos/dll/cpl/desk/appearance.h
Modified: trunk/reactos/dll/cpl/desk/appearance.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/appearance.c?…
==============================================================================
--- trunk/reactos/dll/cpl/desk/appearance.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/desk/appearance.c [iso-8859-1] Mon Mar 2 01:55:02 2009
@@ -131,7 +131,7 @@
static BOOL
-LoadThemeFromReg(GLOBALS* g, INT iPreset)
+LoadThemeFromReg(GLOBALS* g)
{
INT i;
TCHAR strSizeName[20] = {TEXT("Sizes\\0")};
@@ -139,6 +139,7 @@
HKEY hkNewSchemes, hkScheme, hkSize;
DWORD dwType, dwLength;
BOOL Ret = FALSE;
+ INT iPreset = g->Theme.Id;
if(RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Control Panel\\Appearance\\New
Schemes"),
0, KEY_READ, &hkNewSchemes) == ERROR_SUCCESS)
@@ -332,6 +333,14 @@
RegCloseKey(hKey);
}
+ /* Save ThemeId */
+ Result = RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Control Panel\\Appearance\\New
Schemes"), 0, KEY_ALL_ACCESS, &hKey);
+ if (Result == ERROR_SUCCESS)
+ {
+ lstrcpy(clText, g->ThemeTemplates[g->Theme.Id].strKeyName);
+ RegSetValueEx(hKey, TEXT("SelectedStyle"), 0, REG_SZ, (BYTE *)clText,
(lstrlen(clText)+1) * sizeof (TCHAR));
+ RegCloseKey(hKey);
+ }
}
@@ -436,7 +445,7 @@
INT_PTR CALLBACK
AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- INT i, index;
+ INT i;
GLOBALS *g;
LPNMHDR lpnm;
@@ -472,8 +481,8 @@
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
g->Theme.bHasChanged = TRUE;
i = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETCURSEL, 0, 0);
- index = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_GETITEMDATA,
(WPARAM)i, 0);
- LoadThemeFromReg(g, index);
+ g->Theme.Id = SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME,
CB_GETITEMDATA, (WPARAM)i, 0);
+ LoadThemeFromReg(g);
}
break;
Modified: trunk/reactos/dll/cpl/desk/appearance.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/appearance.h?…
==============================================================================
--- trunk/reactos/dll/cpl/desk/appearance.h [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/desk/appearance.h [iso-8859-1] Mon Mar 2 01:55:02 2009
@@ -35,6 +35,7 @@
COLORREF crColor[NUM_COLORS];
LOGFONT lfFont[NUM_FONTS];
UINT64 Size[NUM_SIZES];
+ INT Id;
BOOL bFlatMenus;
BOOL bHasChanged;
BOOL bIsCustom;