summaryrefslogtreecommitdiff
path: root/plugins/YAPP
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-14 15:51:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-14 15:51:34 +0000
commite58823d961a630eb62e60d2ccb443761ba5f1704 (patch)
tree62d071be480d57af2a53f154a1468abe0b9449ff /plugins/YAPP
parent721aea0764451e985d575236205808bbef298244 (diff)
- all MS_CLIST_ADD*ITEM services replaced with Menu_Add*Item stubs.
- massive cleanup of the menu-related code git-svn-id: http://svn.miranda-ng.org/main/trunk@410 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAPP')
-rw-r--r--plugins/YAPP/services.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/plugins/YAPP/services.cpp b/plugins/YAPP/services.cpp
index 751b82387e..12b7110264 100644
--- a/plugins/YAPP/services.cpp
+++ b/plugins/YAPP/services.cpp
@@ -242,11 +242,11 @@ INT_PTR IsSecondLineShown(WPARAM wParam, LPARAM lParam) {
}
void UpdateMenu() {
- CLISTMENUITEM menu = {0};
- menu.cbSize = sizeof(CLISTMENUITEM);
- menu.pszName = (char*)(DBGetContactSettingByte(0, MODULE, "Enabled", 1) == 1 ? LPGEN("Disable Popups") : LPGEN("Enable Popups"));
- menu.flags = CMIM_NAME;// | CMIM_ICON;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuToggleOnOff, (LPARAM)&menu);
+ CLISTMENUITEM mi = {0};
+ mi.cbSize = sizeof(CLISTMENUITEM);
+ mi.pszName = (char*)(DBGetContactSettingByte(0, MODULE, "Enabled", 1) == 1 ? LPGEN("Disable Popups") : LPGEN("Enable Popups"));
+ mi.flags = CMIM_NAME;// | CMIM_ICON;
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuToggleOnOff, (LPARAM)&mi);
}
INT_PTR PopupQuery(WPARAM wParam, LPARAM lParam) {
@@ -485,25 +485,25 @@ void InitServices()
hService[i++] = CreateServiceFunction("YAPP/RegisterClass", RegisterPopupClass);
hService[i++] = CreateServiceFunction("YAPP/ClassInstance", CreateClassPopup);
- CLISTMENUITEM menu = {0};
+ CLISTMENUITEM mi = {0};
- menu.cbSize = sizeof(menu);
- menu.flags = CMIM_ALL;
+ mi.cbSize = sizeof(mi);
+ mi.flags = CMIM_ALL;
- menu.position = 500010000;
- menu.pszPopupName = LPGEN("PopUps");
+ mi.position = 500010000;
+ mi.pszPopupName = LPGEN("PopUps");
hiPopupHistory = LoadIcon(hInst, MAKEINTRESOURCE(IDI_POPUP_HISTORY));
- menu.hIcon = hiPopupHistory;
- menu.pszService= MS_POPUP_SHOWHISTORY;
- menu.pszName = LPGEN("Popup History");
- hMenuShowHistory = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM)&menu);
+ mi.hIcon = hiPopupHistory;
+ mi.pszService= MS_POPUP_SHOWHISTORY;
+ mi.pszName = LPGEN("Popup History");
+ hMenuShowHistory = Menu_AddMainMenuItem(&mi);
- menu.hIcon = NULL;
- menu.pszService = "PopUp/ToggleEnabled";
- menu.pszName = (char*)(DBGetContactSettingByte(0, MODULE, "Enabled", 1) ?
+ mi.hIcon = NULL;
+ mi.pszService = "PopUp/ToggleEnabled";
+ mi.pszName = (char*)(DBGetContactSettingByte(0, MODULE, "Enabled", 1) ?
LPGEN("Disable Popups") : LPGEN("Enable Popups"));
- hMenuToggleOnOff = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM)&menu);
+ hMenuToggleOnOff = Menu_AddMainMenuItem(&mi);
hEventBuildMenu = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildMenu);
}