explorer: Moved systray configuration option to a more appropriate place
and make it compatible with the way other options are stored.
This commit is contained in:
parent
f689e3fca4
commit
acdd03add6
|
@ -41,6 +41,9 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(systray);
|
WINE_DEFAULT_DEBUG_CHANNEL(systray);
|
||||||
|
|
||||||
|
#define IS_OPTION_FALSE(ch) \
|
||||||
|
((ch) == 'n' || (ch) == 'N' || (ch) == 'f' || (ch) == 'F' || (ch) == '0')
|
||||||
|
|
||||||
const static WCHAR adaptor_classname[] = /* Adaptor */ {'A','d','a','p','t','o','r',0};
|
const static WCHAR adaptor_classname[] = /* Adaptor */ {'A','d','a','p','t','o','r',0};
|
||||||
|
|
||||||
/* tray state */
|
/* tray state */
|
||||||
|
@ -338,26 +341,23 @@ static LRESULT WINAPI listener_wndproc(HWND window, UINT msg,
|
||||||
|
|
||||||
static BOOL is_systray_hidden(void)
|
static BOOL is_systray_hidden(void)
|
||||||
{
|
{
|
||||||
const WCHAR hide_systray_keyname[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e','\\',
|
const WCHAR show_systray_keyname[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e','\\',
|
||||||
'S','y','s','t','r','a','y',0};
|
'X','1','1',' ','D','r','i','v','e','r',0};
|
||||||
const WCHAR hide_systray_valuename[] = {'H','i','d','d','e','n',0};
|
const WCHAR show_systray_valuename[] = {'S','h','o','w','S','y','s','t','r','a','y',0};
|
||||||
DWORD hidden;
|
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
DWORD size;
|
|
||||||
DWORD type;
|
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
|
|
||||||
/* @@ Wine registry key: HKCU\Software\Wine\Systray */
|
/* @@ Wine registry key: HKCU\Software\Wine\X11 Driver */
|
||||||
if (RegOpenKeyW(HKEY_CURRENT_USER, hide_systray_keyname, &hkey) == ERROR_SUCCESS)
|
if (RegOpenKeyW(HKEY_CURRENT_USER, show_systray_keyname, &hkey) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
size = sizeof(hidden);
|
WCHAR value[10];
|
||||||
if (RegQueryValueExW(hkey, hide_systray_valuename, 0, &type, (LPBYTE)&hidden, &size) == ERROR_SUCCESS && type == REG_DWORD)
|
DWORD type, size = sizeof(value);
|
||||||
|
if (RegQueryValueExW(hkey, show_systray_valuename, 0, &type, (LPBYTE)&value, &size) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
if (hidden != 0) ret = TRUE;
|
ret = IS_OPTION_FALSE(value[0]);
|
||||||
}
|
}
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue