diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-01-13 15:24:40 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-01-13 15:24:40 +0000 |
commit | 44d565bb91b211f80c6f21fb92804084af37d4db (patch) | |
tree | d10b1024ca960a681691f4d2e2f440f863b9ab36 /plugins/Weather/src/weather_svcs.cpp | |
parent | 1534bf7c811cc1eee460e0e4d89fa99ee585845a (diff) |
added toptoolbar support
fixed autoupdate saving setting
cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@3095 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather/src/weather_svcs.cpp')
-rw-r--r-- | plugins/Weather/src/weather_svcs.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp index ee0948bf4c..d61bdc2a8b 100644 --- a/plugins/Weather/src/weather_svcs.cpp +++ b/plugins/Weather/src/weather_svcs.cpp @@ -225,21 +225,25 @@ void UpdateMenu(BOOL State) {
// update option setting
opt.CAutoUpdate = State;
- db_set_b(NULL, WEATHERPROTONAME, "AutoUpdate", (BYTE)opt.AutoUpdate);
+ db_set_b(NULL, WEATHERPROTONAME, "AutoUpdate", (BYTE)State);
CLISTMENUITEM mi = { sizeof(mi) };
if (State) { // to enable auto-update
mi.pszName = LPGEN("Auto Update Enabled");
mi.icolibItem = GetIconHandle("main");
+ opt.AutoUpdate = 1;
}
else { // to disable auto-update
mi.pszName = LPGEN("Auto Update Disabled");
mi.icolibItem = GetIconHandle("disabled");
+ opt.AutoUpdate = 0;
}
mi.flags = CMIM_ICON | CMIM_NAME | CMIF_ICONFROMICOLIB;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hEnableDisableMenu, (LPARAM)&mi);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTBButton, !State ? TTBST_PUSHED : TTBST_RELEASED);
+
}
void UpdatePopupMenu(BOOL State)
|