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/StartupSilence | |
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/StartupSilence')
-rw-r--r-- | plugins/StartupSilence/src/main.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index 17bd44b006..3595e1884d 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. HINSTANCE hInst;
int hLangpack;
-HANDLE hSSMenuToggleOnOff;
+HGENMENU hSSMenuToggleOnOff;
HANDLE GetIconHandle(char *szIcon);
HANDLE hOptionsInitialize;
HANDLE hTTBarloaded = NULL;
@@ -284,16 +284,12 @@ static INT_PTR SturtupSilenceEnabled(WPARAM wParam, LPARAM lParam) static INT_PTR SilenceConnection(WPARAM wParam, LPARAM lParam)
{
timer = (BYTE)wParam;
-// if (timer == 2) //commented for now
-// db_set_b(NULL, "Skin", "UseSound", 0);
-// else db_set_b(NULL, "Skin", "UseSound", 1);
return 0;
}
static INT_PTR InitMenu()
{
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_ALL;
mi.position = 100000000;
mi.icolibItem = GetIconHandle(MENU_NAME);
mi.pszPopupName = MENU_NAME;
@@ -305,11 +301,11 @@ static INT_PTR InitMenu() void UpdateMenu()
{
- CLISTMENUITEM mi = { 0 };
- mi.pszName = (Enabled == 1 ? DISABLE_SILENCE : ENABLE_SILENCE);
- mi.flags = CMIM_NAME | CMIM_ALL;
- mi.icolibItem = (Enabled == 1 ? GetIconHandle(DISABLE_SILENCE) : GetIconHandle(ENABLE_SILENCE));
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hSSMenuToggleOnOff, (LPARAM)&mi);
+ if (Enabled == 1)
+ Menu_ModifyItem(hSSMenuToggleOnOff, _T(DISABLE_SILENCE), GetIconHandle(DISABLE_SILENCE));
+ else
+ Menu_ModifyItem(hSSMenuToggleOnOff, _T(ENABLE_SILENCE), GetIconHandle(ENABLE_SILENCE));
+
UpdateTTB();
}
|