diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-22 20:38:56 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-22 20:38:56 +0000 |
commit | 88790eed4ffd9ca555c8f9b73cb014a93b57a34f (patch) | |
tree | b3e5bfe096005a9cac4bc14fdfbe5f6f5acad98a /plugins/NewsAggregator | |
parent | 9ecc2aa50e2183e2c4a11861ca6dede7d2151139 (diff) |
Menu_ModifyItem unbound from CLISTMENUITEM structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@14334 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator')
-rw-r--r-- | plugins/NewsAggregator/Src/Menus.cpp | 8 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Services.cpp | 14 |
2 files changed, 5 insertions, 17 deletions
diff --git a/plugins/NewsAggregator/Src/Menus.cpp b/plugins/NewsAggregator/Src/Menus.cpp index bf40363323..89fd65cdd1 100644 --- a/plugins/NewsAggregator/Src/Menus.cpp +++ b/plugins/NewsAggregator/Src/Menus.cpp @@ -74,11 +74,5 @@ void InitMenu() mi.pszService = MS_NEWSAGGREGATOR_CHANGEFEED;
hService2[6] = Menu_AddContactMenuItem(&mi);
- memset(&mi, 0, sizeof(mi));
- mi.flags = CMIM_ICON;
- if (db_get_b(NULL, MODULE, "AutoUpdate", 1))
- mi.icolibItem = GetIconHandle("enabled");
- else
- mi.icolibItem = GetIconHandle("disabled");
- Menu_ModifyItem(hService2[0], &mi);
+ Menu_ModifyItem(hService2[0], NULL, GetIconHandle(db_get_b(NULL, MODULE, "AutoUpdate", 1) ? "enabled" : "disabled"));
}
\ No newline at end of file diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index 444800f8db..a37fbf5ac0 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -231,17 +231,11 @@ void UpdateMenu(bool State) {
CLISTMENUITEM mi = { 0 };
- if (!State) { // to enable auto-update
- mi.ptszName = LPGENT("Auto Update Enabled");
- mi.icolibItem = GetIconHandle("enabled");
- }
- else { // to disable auto-update
- mi.ptszName = LPGENT("Auto Update Disabled");
- mi.icolibItem = GetIconHandle("disabled");
- }
+ if (!State) // to enable auto-update
+ Menu_ModifyItem(hService2[0], LPGENT("Auto Update Enabled"), GetIconHandle("enabled"));
+ else // to disable auto-update
+ Menu_ModifyItem(hService2[0], LPGENT("Auto Update Disabled"), GetIconHandle("disabled"));
- mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR;
- Menu_ModifyItem(hService2[0], &mi);
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTBButton, State ? TTBST_PUSHED : 0);
db_set_b(NULL, MODULE, "AutoUpdate", !State);
}
|