summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Actman/ua/i_uaplaces.inc1
-rw-r--r--plugins/AddContactPlus/src/main.cpp2
-rw-r--r--plugins/Alarms/src/frame.cpp4
-rw-r--r--plugins/Alarms/src/options.cpp2
-rw-r--r--plugins/AuthState/src/main.cpp2
-rw-r--r--plugins/AutoShutdown/src/settingsdlg.cpp8
-rw-r--r--plugins/AvatarHistory/src/AvatarDlg.cpp6
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp8
-rw-r--r--plugins/Boltun/src/boltun.cpp8
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp4
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp2
-rw-r--r--plugins/BuddyPounce/src/main.cpp11
-rw-r--r--plugins/CSList/src/cslist.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp4
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp308
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/cluiframes.h6
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp47
-rw-r--r--plugins/Clist_modern/src/hdr/modern_commonheaders.h2
-rw-r--r--plugins/Clist_modern/src/modern_clistmenus.cpp14
-rw-r--r--plugins/Clist_modern/src/modern_clisttray.cpp14
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp12
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp101
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/cluiframes.h1
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp42
-rw-r--r--plugins/Clist_nicer/src/clistmenus.cpp2
-rw-r--r--plugins/Console/src/Console.cpp4
-rw-r--r--plugins/ContactsPlus/src/main.cpp4
-rw-r--r--plugins/CrashDumper/src/crshdmp.cpp16
-rw-r--r--plugins/CyrTranslit/src/MirandaContact.cpp2
-rw-r--r--plugins/Db3x_mmap/src/ui.cpp4
-rw-r--r--plugins/DbEditorPP/src/main.cpp4
-rw-r--r--plugins/Db_autobackups/src/main.cpp4
-rw-r--r--plugins/Dropbox/src/dropbox_menus.cpp2
-rw-r--r--plugins/Exchange/src/hooked_events.cpp14
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp12
-rw-r--r--plugins/FileAsMessage/src/main.cpp4
-rw-r--r--plugins/FloatingContacts/src/main.cpp8
-rw-r--r--plugins/GmailNotifier/src/gmail.h2
-rw-r--r--plugins/GmailNotifier/src/main.cpp50
-rw-r--r--plugins/GmailNotifier/src/notify.cpp16
-rw-r--r--plugins/GmailNotifier/src/options.cpp36
-rw-r--r--plugins/GmailNotifier/src/utility.cpp8
-rw-r--r--plugins/HTTPServer/src/GuiElements.cpp40
-rw-r--r--plugins/HTTPServer/src/main.cpp5
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist.cpp4
-rw-r--r--plugins/HistoryStats/src/mu_common.cpp11
-rw-r--r--plugins/HistoryStats/src/mu_common.h2
-rw-r--r--plugins/IEHistory/src/IEHistory.cpp19
-rw-r--r--plugins/Import/src/main.cpp2
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp8
-rw-r--r--plugins/LotusNotify/src/LotusNotify.cpp4
-rw-r--r--plugins/MenuItemEx/src/main.cpp40
-rw-r--r--plugins/MirLua/src/m_genmenu.cpp4
-rw-r--r--plugins/MirOTR/src/svcs_menu.cpp4
-rwxr-xr-xplugins/Msg_Export/src/main.cpp4
-rw-r--r--plugins/MyDetails/src/frame.cpp4
-rw-r--r--plugins/MyDetails/src/mydetails.cpp10
-rw-r--r--plugins/NewAwaySysMod/src/AwaySys.cpp20
-rw-r--r--plugins/NewEventNotify/src/menuitem.cpp2
-rw-r--r--plugins/New_GPG/src/init.cpp20
-rw-r--r--plugins/NewsAggregator/Src/Menus.cpp22
-rw-r--r--plugins/NoHistory/src/dllmain.cpp8
-rw-r--r--plugins/Non-IM Contact/src/main.cpp16
-rw-r--r--plugins/NotesAndReminders/src/main.cpp16
-rw-r--r--plugins/Nudge/src/main.cpp2
-rw-r--r--plugins/OpenFolder/src/openFolder.cpp2
-rw-r--r--plugins/PackUpdater/Src/PackUpdater.cpp8
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp10
-rw-r--r--plugins/Ping/src/menu.cpp8
-rw-r--r--plugins/Ping/src/pingthread.cpp2
-rw-r--r--plugins/PluginUpdater/src/PluginUpdater.cpp4
-rw-r--r--plugins/Popup/src/main.cpp10
-rw-r--r--plugins/ProfileManager/src/pmanagerEx.cpp2
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp2
-rw-r--r--plugins/Quotes/src/Forex.cpp18
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp4
-rw-r--r--plugins/RemovePersonalSettings/src/rps.cpp4
-rw-r--r--plugins/Restart/src/restart.cpp2
-rw-r--r--plugins/SMS/src/SMS_svc.cpp8
-rw-r--r--plugins/Scriver/src/msgs.cpp20
-rw-r--r--plugins/SecureIM/src/main.cpp6
-rw-r--r--plugins/SeenPlugin/src/menu.cpp11
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp21
-rw-r--r--plugins/Sessions/Src/Main.cpp8
-rw-r--r--plugins/SimpleAR/src/Main.cpp4
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp6
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp2
-rw-r--r--plugins/SmileyAdd/src/main.cpp2
-rw-r--r--plugins/SmileyAdd/src/services.cpp6
-rw-r--r--plugins/StartupSilence/src/main.cpp2
-rw-r--r--plugins/StatusPlugins/StartupStatus/profiles.cpp2
-rwxr-xr-xplugins/StopSpamMod/src/init.cpp4
-rw-r--r--plugins/StopSpamPlus/src/stopspam.cpp4
-rw-r--r--plugins/TabSRMM/src/globals.cpp10
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp8
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp4
-rw-r--r--plugins/UserGuide/src/main.cpp4
-rw-r--r--plugins/UserInfoEx/src/mir_menuitems.cpp104
-rw-r--r--plugins/UserInfoEx/src/svc_email.cpp4
-rw-r--r--plugins/UserInfoEx/src/svc_homepage.cpp4
-rw-r--r--plugins/Weather/src/weather_svcs.cpp41
-rw-r--r--plugins/WebView/src/main.cpp94
-rw-r--r--plugins/WhenWasIt/src/WhenWasIt.cpp12
-rw-r--r--plugins/WhoUsesMyFiles/src/wumfplug.cpp12
-rw-r--r--plugins/XSoundNotify/src/xsn_main.cpp4
-rw-r--r--plugins/YAMN/src/main.cpp12
-rw-r--r--plugins/YAPP/src/yapp.cpp8
-rw-r--r--plugins/mRadio/i_tray.inc10
109 files changed, 736 insertions, 853 deletions
diff --git a/plugins/Actman/ua/i_uaplaces.inc b/plugins/Actman/ua/i_uaplaces.inc
index bd724bf406..a74e56425a 100644
--- a/plugins/Actman/ua/i_uaplaces.inc
+++ b/plugins/Actman/ua/i_uaplaces.inc
@@ -454,7 +454,6 @@ begin
if UAMenuItem.hMenuRoot<>0 then
begin
- clmi.flags:=clmi.flags or CMIF_ROOTHANDLE;
clmi.hParentMenu:=UAMenuItem.hMenuRoot;
end;
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp
index 96fcff53bf..7345f16720 100644
--- a/plugins/AddContactPlus/src/main.cpp
+++ b/plugins/AddContactPlus/src/main.cpp
@@ -96,7 +96,7 @@ static int OnAccListChanged(WPARAM, LPARAM)
mi.position = 500020001;
mi.flags = CMIF_TCHAR;
mi.icolibItem = icon.hIcolib;
- mi.ptszName = LPGENT("&Add contact...");
+ mi.name.t = LPGENT("&Add contact...");
mi.pszService = MS_ADDCONTACTPLUS_SHOW;
hMainMenuItem = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp
index 5586cf4c0e..be6235ef2d 100644
--- a/plugins/Alarms/src/frame.cpp
+++ b/plugins/Alarms/src/frame.cpp
@@ -542,8 +542,8 @@ int CreateFrame()
CreateServiceFunction(MODULE "/ShowHideReminders", ShowHideMenuFunc);
CLISTMENUITEM mi = { 0 };
- mi.hIcon = hIconMenuShowHide;
- mi.pszName = LPGEN("Show reminders");
+ mi.icolibItem = hIconMenuShowHide;
+ mi.name.a = LPGEN("Show reminders");
mi.pszService = MODULE "/ShowHideReminders";
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Alarms"), 0);
mi.position = 500010000;
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp
index 15df78706c..322c2d87e5 100644
--- a/plugins/Alarms/src/options.cpp
+++ b/plugins/Alarms/src/options.cpp
@@ -694,7 +694,7 @@ void AddMenuItem()
CLISTMENUITEM mi = { 0 };
mi.icolibItem = IcoLib_GetIconHandle("alarms_menu_set");
- mi.pszName = "Set alarm";
+ mi.name.a = "Set alarm";
mi.pszService = MODULE "/NewAlarm";
mi.position = 500010000;
if (!ServiceExists(MS_CLIST_FRAMES_ADDFRAME))
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp
index 85636cc2f4..0915ba1ec0 100644
--- a/plugins/AuthState/src/main.cpp
+++ b/plugins/AuthState/src/main.cpp
@@ -200,7 +200,7 @@ extern "C" int __declspec(dllexport) Load(void)
CLISTMENUITEM mi = { 0 };
mi.position = -1999901005;
mi.flags = CMIF_TCHAR;
- mi.ptszName = LPGENT("Enable AuthState icons");
+ mi.name.t = LPGENT("Enable AuthState icons");
mi.pszService = "AuthState/MenuItem";
hUserMenu = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp
index 8d22bc2956..4e696ef1dc 100644
--- a/plugins/AutoShutdown/src/settingsdlg.cpp
+++ b/plugins/AutoShutdown/src/settingsdlg.cpp
@@ -441,24 +441,24 @@ void SetShutdownMenuItem(bool fActive)
if (fActive)
{
mi.icolibItem = iconList[1].hIcolib;
- mi.ptszName = LPGENT("Stop automatic &shutdown");
+ mi.name.t = LPGENT("Stop automatic &shutdown");
}
else
{
mi.icolibItem = iconList[2].hIcolib;
- mi.ptszName = LPGENT("Automatic &shutdown...");
+ mi.name.t = LPGENT("Automatic &shutdown...");
}
mi.pszService = "AutoShutdown/MenuCommand";
mi.flags = CMIF_TCHAR;
if (hMainMenuItem != NULL)
- Menu_ModifyItem(hMainMenuItem, mi.ptszName, mi.icolibItem);
+ Menu_ModifyItem(hMainMenuItem, mi.name.t, mi.icolibItem);
else
hMainMenuItem = Menu_AddMainMenuItem(&mi);
/* tray menu */
mi.position = 899999;
if (hTrayMenuItem != NULL)
- Menu_ModifyItem(hTrayMenuItem, mi.ptszName, mi.icolibItem);
+ Menu_ModifyItem(hTrayMenuItem, mi.name.t, mi.icolibItem);
else
hTrayMenuItem = Menu_AddTrayMenuItem(&mi);
}
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp
index da41894e42..67cefbd921 100644
--- a/plugins/AvatarHistory/src/AvatarDlg.cpp
+++ b/plugins/AvatarHistory/src/AvatarDlg.cpp
@@ -515,13 +515,13 @@ void InitMenuItem()
CreateServiceFunction(MS_AVATARHISTORY_SHOWDIALOG, ShowDialogSvc);
CLISTMENUITEM mi = { 0 };
- mi.ptszName = LPGENT("View Avatar History");
+ mi.name.t = LPGENT("View Avatar History");
mi.flags = CMIF_TCHAR;
mi.position = 1000090010;
- mi.hIcon = createDefaultOverlayedIcon(FALSE);
+ mi.icolibItem = createDefaultOverlayedIcon(FALSE);
mi.pszService = MS_AVATARHISTORY_SHOWDIALOG;
hMenu = Menu_AddContactMenuItem(&mi);
- DestroyIcon(mi.hIcon);
+ DestroyIcon((HICON)mi.icolibItem);
}
static INT_PTR ShowDialogSvc(WPARAM wParam, LPARAM lParam)
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index f95b352062..c1dce1dfdd 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -99,7 +99,7 @@ void InitMenuItems()
CLISTMENUITEM mi = { 0 };
mi.position = 1000090000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
- mi.pszName = LPGEN("View &History");
+ mi.name.a = LPGEN("View &History");
mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
hContactMenu = Menu_AddContactMenuItem(&mi);
@@ -109,7 +109,7 @@ void InitMenuItems()
mi.position = 1000090001;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
- mi.pszName = LPGEN("Delete All User History");
+ mi.name.a = LPGEN("Delete All User History");
mi.pszService = MS_HISTORY_DELETEALLCONTACTHISTORY;
hDeleteContactMenu = Menu_AddContactMenuItem(&mi);
@@ -123,7 +123,7 @@ void InitTaskMenuItems()
CLISTMENUITEM mi = { 0 };
mi.position = 500060005;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
- mi.pszName = LPGEN("Execute history task");
+ mi.name.a = LPGEN("Execute history task");
hTaskMainMenu = Menu_AddMainMenuItem(&mi);
}
@@ -141,7 +141,7 @@ void InitTaskMenuItems()
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.pszService = MS_HISTORY_EXECUTE_TASK;
mi.hParentMenu = hTaskMainMenu;
- mi.ptszName = (TCHAR*)taskIt->taskName.c_str();
+ mi.name.t = (TCHAR*)taskIt->taskName.c_str();
HGENMENU menu = Menu_AddMainMenuItem(&mi);
Menu_ConfigureItem(menu, MCI_OPT_EXECPARAM, pos++);
taskMenus.push_back(menu);
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp
index 3c77218d31..9c44fccd4a 100644
--- a/plugins/Boltun/src/boltun.cpp
+++ b/plugins/Boltun/src/boltun.cpp
@@ -599,19 +599,19 @@ extern "C" int __declspec(dllexport) Load(void)
{
CLISTMENUITEM mi = { 0 };
mi.position = -50010002; //TODO: check the warning
- mi.pszName = BOLTUN_AUTO_CHAT;
+ mi.name.a = BOLTUN_AUTO_CHAT;
mi.pszService = SERV_CONTACT_AUTO_CHAT;
hMenuItemAutoChat = Menu_AddContactMenuItem(&mi);
mi.position = -50010001; //TODO: check the warning
- mi.pszName = BOLTUN_NOT_TO_CHAT;
+ mi.name.a = BOLTUN_NOT_TO_CHAT;
mi.pszService = SERV_CONTACT_NOT_TO_CHAT;
hMenuItemNotToChat = Menu_AddContactMenuItem(&mi);
mi.flags = CMIF_NOTOFFLINE;
mi.position = -50010000; //TODO: check the warning
- mi.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RECVMSG));
- mi.pszName = BOLTUN_START_CHATTING;
+ mi.icolibItem = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RECVMSG));
+ mi.name.a = BOLTUN_START_CHATTING;
mi.pszService = SERV_CONTACT_START_CHATTING;
hMenuItemStartChatting = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index 2770a91569..96b73d6dbc 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -533,8 +533,8 @@ void BossKeyMenuItemInit(void) // Add menu item
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.position = 2000100000;
- mi.hIcon = IcoLib_GetIcon("hidemim");
- mi.ptszName = LPGENT("Hide");
+ mi.icolibItem = IcoLib_GetIcon("hidemim");
+ mi.name.t = LPGENT("Hide");
mi.pszService = MS_BOSSKEY_HIDE;
g_hMenuItem = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index fa71165748..a05f1ff936 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -615,7 +615,7 @@ int ModulesLoaded(WPARAM, LPARAM)
mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[2].hIcolib;
mi.position = 200000;
- mi.ptszName = LPGENT("Enable Miss You");
+ mi.name.t = LPGENT("Enable Miss You");
mi.pszService = "BuddyExpectator/actionMissYouClick";
hContactMenu = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index 7278db9364..a8d2dc419a 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -44,13 +44,10 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
int MainInit(WPARAM, LPARAM)
{
CLISTMENUITEM mi = { 0 };
- mi.position=10;
- mi.flags=0;
- mi.hIcon= LoadIcon(hInst,MAKEINTRESOURCE(IDI_POUNCE));
- mi.pszName=LPGEN("&Buddy Pounce");
- mi.pszService="BuddyPounce/MenuCommand";
- mi.pszContactOwner=NULL;
-
+ mi.position = 10;
+ mi.icolibItem = LoadIcon(hInst,MAKEINTRESOURCE(IDI_POUNCE));
+ mi.name.a = LPGEN("&Buddy Pounce");
+ mi.pszService = "BuddyPounce/MenuCommand";
Menu_AddContactMenuItem(&mi);
return 0;
}
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp
index a51e18c032..db3383d326 100644
--- a/plugins/CSList/src/cslist.cpp
+++ b/plugins/CSList/src/cslist.cpp
@@ -241,7 +241,7 @@ void addProtoStatusMenuItem(char *protoName)
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.icolibItem = forms[0].hIcoLibItem;
- mi.ptszName = _T(MODULENAME);
+ mi.name.t = _T(MODULENAME);
mi.position = 2000040000;
mi.pszService = buf;
mi.hParentMenu = hRoot;
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index d04add9b62..82d8f12ccd 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -331,9 +331,9 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam)
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
mi.flags = CMIF_TCHAR;
if (g_PopupOptPage.GetDBValueCopy(IDC_POPUPOPTDLG_POPUPNOTIFY))
- mi.ptszName = LPGENT("Disable c&lient change notification");
+ mi.name.t = LPGENT("Disable c&lient change notification");
else
- mi.ptszName = LPGENT("Enable c&lient change notification");
+ mi.name.t = LPGENT("Enable c&lient change notification");
mi.pszService = MS_CCN_TOGGLEPOPUPS;
g_hTogglePopupsMenuItem = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
index 989a515ea7..ca7f000fbc 100644
--- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
@@ -69,7 +69,7 @@ static int _iNextFrameId = 100;
static HFONT _hTitleBarFont = NULL;
// menus
-static FrameMenuHandles cont = { NULL };
+static FrameMenuHandles cont = { NULL };
// others
static int _nContactListHeight = 0;
@@ -101,7 +101,7 @@ static int sortfunc(const void *a, const void *b)
sd1 = (SortData *)a;
sd2 = (SortData *)b;
if (sd1->order > sd2->order) { return(1); };
- if (sd1->order < sd2->order) { return(-1); };
+ if (sd1->order < sd2->order) return -1;;
return (0);
};
int CLUIFrames_OnMoving(HWND hwnd, RECT *r)
@@ -749,7 +749,17 @@ static int CLUIFramesGetalClientFrame(void)
return -1;
}
-static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGENMENU(*pfnAdd)(CLISTMENUITEM*))
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static HGENMENU addFrameMenuItem(CLISTMENUITEM *pmi, int frameid, bool bMain)
+{
+ HGENMENU res = (bMain) ? Menu_AddMainMenuItem(pmi) : Menu_AddContextFrameMenuItem(pmi);
+ if (pmi->pszService != NULL)
+ Menu_ConfigureItem(res, MCI_OPT_EXECPARAM, frameid);
+ return res;
+}
+
+static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, bool bMain)
{
if (_fCluiFramesModuleNotStarted)
return NULL;
@@ -760,92 +770,85 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp
CLISTMENUITEM mi = { 0 };
mi.hParentMenu = root;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Visible");
+ mi.name.a = LPGEN("&Visible");
mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SHFRAME;
- Menu_ConfigureItem(fmh.MIVisible = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIVisible = addFrameMenuItem(&mi, frameid, bMain);
popuppos += 100000;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Show title");
+ mi.name.a = LPGEN("&Show title");
mi.pszService = MS_CLIST_FRAMES_SHFRAMETITLEBAR;
- Menu_ConfigureItem(fmh.MITBVisible = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MITBVisible = addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
- mi.pszName = LPGEN("&Locked");
+ mi.name.a = LPGEN("&Locked");
mi.pszService = MS_CLIST_FRAMES_ULFRAME;
- Menu_ConfigureItem(fmh.MILock = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MILock = addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
- mi.pszName = LPGEN("&Expanded");
+ mi.name.a = LPGEN("&Expanded");
mi.pszService = MS_CLIST_FRAMES_UCOLLFRAME;
- Menu_ConfigureItem(fmh.MIColl = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIColl = addFrameMenuItem(&mi, frameid, bMain);
// floating
mi.position = popuppos++;
- mi.pszName = LPGEN("&Floating mode");
+ mi.name.a = LPGEN("&Floating mode");
mi.flags = 0;
mi.pszService = "Set_Floating";
- Menu_ConfigureItem(fmh.MIFloating = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIFloating = addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
- mi.pszName = LPGEN("&Border");
+ mi.name.a = LPGEN("&Border");
mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETUNBORDER;
- Menu_ConfigureItem(fmh.MIBorder = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIBorder = addFrameMenuItem(&mi, frameid, bMain);
popuppos += 100000;
// alignment root
mi.position = popuppos++;
- mi.pszName = LPGEN("&Align");
+ mi.name.a = LPGEN("&Align");
mi.flags = 0;
- mi.pszService = "";
- fmh.MIAlignRoot = pfnAdd(&mi);
+ mi.pszService = NULL;
+ fmh.MIAlignRoot = addFrameMenuItem(&mi, frameid, bMain);
// align top
mi.hParentMenu = fmh.MIAlignRoot;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Top");
+ mi.name.a = LPGEN("&Top");
mi.pszService = CLUIFRAMESSETALIGNALTOP;
- mi.pszContactOwner = (char*)alTop;
- Menu_ConfigureItem(fmh.MIAlignTop = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIAlignTop = addFrameMenuItem(&mi, frameid, bMain);
// align client
mi.position = popuppos++;
- mi.pszName = LPGEN("&Client");
+ mi.name.a = LPGEN("&Client");
mi.pszService = CLUIFRAMESSETALIGNALCLIENT;
- mi.pszContactOwner = (char*)alClient;
- Menu_ConfigureItem(fmh.MIAlignClient = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIAlignClient = addFrameMenuItem(&mi, frameid, bMain);
// align bottom
mi.position = popuppos++;
- mi.pszName = LPGEN("&Bottom");
+ mi.name.a = LPGEN("&Bottom");
mi.pszService = CLUIFRAMESSETALIGNALBOTTOM;
- mi.pszContactOwner = (char*)alBottom;
- Menu_ConfigureItem(fmh.MIAlignBottom = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIAlignBottom = addFrameMenuItem(&mi, frameid, bMain);
// position root
mi.hParentMenu = root;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Position");
- mi.pszService = "";
- mi.pszContactOwner = (char*)0;
- fmh.MIPosRoot = pfnAdd(&mi);
+ mi.name.a = LPGEN("&Position");
+ mi.pszService = NULL;
+ mi.hParentMenu = addFrameMenuItem(&mi, frameid, bMain);
- mi.hParentMenu = fmh.MIPosRoot;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Up");
+ mi.name.a = LPGEN("&Up");
mi.pszService = CLUIFRAMESMOVEUP;
- mi.pszContactOwner = (char*)1;
- Menu_ConfigureItem(fmh.MIPosUp = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
- mi.pszName = LPGEN("&Down");
+ mi.name.a = LPGEN("&Down");
mi.pszService = CLUIFRAMESMOVEDOWN;
- mi.pszContactOwner = (char*)-1;
- Menu_ConfigureItem(fmh.MIPosDown = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ addFrameMenuItem(&mi, frameid, bMain);
return 0;
}
@@ -916,81 +919,58 @@ static int CLUIFramesModifyMainMenuItems(WPARAM wParam, LPARAM)
static INT_PTR _us_DoGetFrameOptions(WPARAM wParam, LPARAM)
{
- INT_PTR retval;
- BOOL bUnicodeText = (LOWORD(wParam) & FO_UNICODETEXT) != 0;
- wParam = MAKEWPARAM((LOWORD(wParam)) & ~FO_UNICODETEXT, HIWORD(wParam));
-
- if (_fCluiFramesModuleNotStarted) return -1;
+ if (_fCluiFramesModuleNotStarted)
+ return -1;
int pos = id2pos(HIWORD(wParam));
if (pos < 0 || pos >= g_nFramesCount)
return -1;
- switch (LOWORD(wParam)) {
- case FO_FLAGS:
- retval = 0;
- if (g_pfwFrames[pos].visible) retval |= F_VISIBLE;
- if (!g_pfwFrames[pos].collapsed) retval |= F_UNCOLLAPSED;
- if (g_pfwFrames[pos].Locked) retval |= F_LOCKED;
- if (g_pfwFrames[pos].TitleBar.ShowTitleBar) retval |= F_SHOWTB;
- if (g_pfwFrames[pos].TitleBar.ShowTitleBarTip) retval |= F_SHOWTBTIP;
- if (!g_CluiData.fLayered) {
- if (!(GetWindowLongPtr(g_pfwFrames[pos].hWnd, GWL_STYLE)&WS_BORDER))
- retval |= F_NOBORDER;
- }
- else if (!g_pfwFrames[pos].UseBorder)
- retval |= F_NOBORDER;
- break;
-
+ switch (LOWORD(wParam) & ~FO_UNICODETEXT) {
case FO_NAME:
- if (bUnicodeText)
- retval = (INT_PTR)g_pfwFrames[pos].name;
- else
- retval = (INT_PTR)g_pfwFrames[pos].szName;
- break;
+ return (INT_PTR)g_pfwFrames[pos].name;
case FO_TBNAME:
- if (bUnicodeText)
- retval = (INT_PTR)g_pfwFrames[pos].TitleBar.tbname;
- else
- retval = (INT_PTR)g_pfwFrames[pos].TitleBar.sztbname;
- break;
+ return (INT_PTR)g_pfwFrames[pos].TitleBar.tbname;
case FO_TBTIPNAME:
- if (bUnicodeText)
- retval = (INT_PTR)g_pfwFrames[pos].TitleBar.tooltip;
- else
- retval = (INT_PTR)g_pfwFrames[pos].TitleBar.sztooltip;
- break;
+ return (INT_PTR)g_pfwFrames[pos].TitleBar.tooltip;
case FO_TBSTYLE:
- retval = GetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd, GWL_STYLE);
- break;
+ return GetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd, GWL_STYLE);
case FO_TBEXSTYLE:
- retval = GetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd, GWL_EXSTYLE);
- break;
+ return GetWindowLongPtr(g_pfwFrames[pos].TitleBar.hwnd, GWL_EXSTYLE);
case FO_ICON:
- retval = (INT_PTR)g_pfwFrames[pos].TitleBar.hicon;
- break;
+ return (INT_PTR)g_pfwFrames[pos].TitleBar.hicon;
case FO_HEIGHT:
- retval = (INT_PTR)g_pfwFrames[pos].height;
- break;
+ return (INT_PTR)g_pfwFrames[pos].height;
case FO_ALIGN:
- retval = (INT_PTR)g_pfwFrames[pos].align;
- break;
+ return (INT_PTR)g_pfwFrames[pos].align;
+
case FO_FLOATING:
- retval = (INT_PTR)g_pfwFrames[pos].floating;
- break;
- default:
- retval = -1;
- break;
+ return (INT_PTR)g_pfwFrames[pos].floating;
+
+ case FO_FLAGS:
+ INT_PTR retval = 0;
+ if (g_pfwFrames[pos].visible) retval |= F_VISIBLE;
+ if (!g_pfwFrames[pos].collapsed) retval |= F_UNCOLLAPSED;
+ if (g_pfwFrames[pos].Locked) retval |= F_LOCKED;
+ if (g_pfwFrames[pos].TitleBar.ShowTitleBar) retval |= F_SHOWTB;
+ if (g_pfwFrames[pos].TitleBar.ShowTitleBarTip) retval |= F_SHOWTBTIP;
+ if (!g_CluiData.fLayered) {
+ if (!(GetWindowLongPtr(g_pfwFrames[pos].hWnd, GWL_STYLE)&WS_BORDER))
+ retval |= F_NOBORDER;
+ }
+ else if (!g_pfwFrames[pos].UseBorder)
+ retval |= F_NOBORDER;
+ return retval;
}
- return retval;
+ return -1;
}
static int UpdateTBToolTip(int framepos)
@@ -1059,47 +1039,37 @@ static int _us_DoSetFrameOptions(WPARAM wParam, LPARAM lParam)
return -1;
mir_free(fw.name);
- mir_free(fw.szName);
- if (bUnicodeText) {
+ if (bUnicodeText)
fw.name = mir_tstrdup((LPTSTR)lParam);
- fw.szName = mir_t2a((LPTSTR)lParam);
- }
- else {
- fw.szName = mir_strdup((char*)lParam);
+ else
fw.name = mir_a2t((char *)lParam);
- }
return 0;
case FO_TBNAME:
- if (lParam == 0) { return(-1); }
+ if (lParam == 0)
+ return -1;
mir_free(fw.TitleBar.tbname);
- mir_free(fw.TitleBar.sztbname);
- if (bUnicodeText) {
+ if (bUnicodeText)
fw.TitleBar.tbname = mir_tstrdup((LPTSTR)lParam);
- fw.TitleBar.sztbname = mir_t2a((LPTSTR)lParam);
- }
- else {
- fw.TitleBar.sztbname = mir_strdup((char*)lParam);
+ else
fw.TitleBar.tbname = mir_a2t((char*)lParam);
- }
if (fw.floating && (fw.TitleBar.tbname != NULL))
SetWindowText(fw.ContainerWnd, fw.TitleBar.tbname);
return 0;
case FO_TBTIPNAME:
- if (lParam == 0) { return(-1); }
- if (fw.TitleBar.tooltip != NULL) mir_free_and_nil(fw.TitleBar.tooltip);
- if (fw.TitleBar.sztooltip != NULL) mir_free_and_nil(fw.TitleBar.sztooltip);
- if (bUnicodeText) {
+ if (lParam == 0)
+ return -1;
+
+ if (fw.TitleBar.tooltip != NULL)
+ mir_free_and_nil(fw.TitleBar.tooltip);
+ if (bUnicodeText)
fw.TitleBar.tooltip = mir_tstrdup((LPTSTR)lParam);
- fw.TitleBar.sztooltip = mir_t2a((LPTSTR)lParam);
- }
- else {
- fw.TitleBar.sztooltip = mir_strdup((char*)lParam);
+ else
fw.TitleBar.tooltip = mir_a2t((char*)lParam);
- }
+
UpdateTBToolTip(pos);
return 0;
@@ -1520,20 +1490,20 @@ static int CLUIFramesLoadMainMenu()
CLISTMENUITEM mi = { 0 };
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME);
mi.position = 3000090000;
- mi.pszName = LPGEN("Frames");
+ mi.name.a = LPGEN("Frames");
cont.MainMenuItem = Menu_AddMainMenuItem(&mi);
// create frames menu
int separator = 3000200000;
for (int i = 0; i < g_nFramesCount; i++) {
- mi.hIcon = g_pfwFrames[i].TitleBar.hicon;
+ mi.icolibItem = g_pfwFrames[i].TitleBar.hicon;
mi.flags = CMIF_TCHAR;
mi.position = separator;
mi.hParentMenu = cont.MainMenuItem;
- mi.ptszName = g_pfwFrames[i].TitleBar.tbname ? g_pfwFrames[i].TitleBar.tbname : g_pfwFrames[i].name;
+ mi.name.t = g_pfwFrames[i].TitleBar.tbname ? g_pfwFrames[i].TitleBar.tbname : g_pfwFrames[i].name;
mi.pszService = 0;
g_pfwFrames[i].MenuHandles.MainMenuItem = Menu_AddMainMenuItem(&mi);
- CLUIFramesCreateMenuForFrame(g_pfwFrames[i].id, g_pfwFrames[i].MenuHandles.MainMenuItem, separator, Menu_AddMainMenuItem);
+ CLUIFramesCreateMenuForFrame(g_pfwFrames[i].id, g_pfwFrames[i].MenuHandles.MainMenuItem, separator, true);
CLUIFramesModifyMainMenuItems(g_pfwFrames[i].id, 0);
CallService(MS_CLIST_FRAMEMENUNOTIFY, (WPARAM)g_pfwFrames[i].id, (LPARAM)g_pfwFrames[i].MenuHandles.MainMenuItem);
separator++;
@@ -1542,23 +1512,23 @@ static int CLUIFramesLoadMainMenu()
separator += 100000;
// create "show all frames" menu
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.flags = 0;
mi.position = separator++;
mi.hParentMenu = cont.MainMenuItem;
- mi.pszName = LPGEN("Show all frames");
+ mi.name.a = LPGEN("Show all frames");
mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMES;
Menu_AddMainMenuItem(&mi);
// create "show all titlebars" menu
mi.position = separator++;
- mi.pszName = LPGEN("Show all title bars");
+ mi.name.a = LPGEN("Show all title bars");
mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMESTB;
Menu_AddMainMenuItem(&mi);
// create "hide all titlebars" menu
mi.position = separator++;
- mi.pszName = LPGEN("Hide all title bars");
+ mi.name.a = LPGEN("Hide all title bars");
mi.pszService = MS_CLIST_FRAMES_HIDEALLFRAMESTB;
Menu_AddMainMenuItem(&mi);
return 0;
@@ -1618,32 +1588,29 @@ static int _us_DoAddFrame(WPARAM wParam, LPARAM)
g_pfwFrames[g_nFramesCount].name = (LPTSTR)mir_alloc(255 * sizeof(TCHAR));
GetClassName(g_pfwFrames[g_nFramesCount].hWnd, g_pfwFrames[g_nFramesCount].name, 255);
}
- else {
- g_pfwFrames[g_nFramesCount].name = (clfrm->Flags&F_UNICODE) ? mir_u2t(clfrm->wname) : mir_a2t(clfrm->name);
- }
- g_pfwFrames[g_nFramesCount].szName = mir_t2a(g_pfwFrames[g_nFramesCount].name);
+ else g_pfwFrames[g_nFramesCount].name = (clfrm->Flags & F_UNICODE) ? mir_u2t(clfrm->wname) : mir_a2t(clfrm->name);
+
if (IsBadCodePtr((FARPROC)clfrm->TBname) || clfrm->TBname == NULL
|| ((clfrm->Flags&F_UNICODE) ? mir_wstrlen(clfrm->TBwname) : mir_strlen(clfrm->TBname)) == 0)
g_pfwFrames[g_nFramesCount].TitleBar.tbname = mir_tstrdup(g_pfwFrames[g_nFramesCount].name);
else
- g_pfwFrames[g_nFramesCount].TitleBar.tbname = (clfrm->Flags&F_UNICODE) ? mir_u2t(clfrm->TBwname) : mir_a2t(clfrm->TBname);
- g_pfwFrames[g_nFramesCount].TitleBar.sztbname = mir_t2a(g_pfwFrames[g_nFramesCount].TitleBar.tbname);
+ g_pfwFrames[g_nFramesCount].TitleBar.tbname = (clfrm->Flags & F_UNICODE) ? mir_u2t(clfrm->TBwname) : mir_a2t(clfrm->TBname);
+
g_pfwFrames[g_nFramesCount].needhide = FALSE;
- g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBar = (clfrm->Flags&F_SHOWTB ? TRUE : FALSE);
- g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBarTip = (clfrm->Flags&F_SHOWTBTIP ? TRUE : FALSE);
+ g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBar = (clfrm->Flags & F_SHOWTB ? TRUE : FALSE);
+ g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBarTip = (clfrm->Flags & F_SHOWTBTIP ? TRUE : FALSE);
- g_pfwFrames[g_nFramesCount].collapsed = (clfrm->Flags&F_UNCOLLAPSED) ? FALSE : TRUE;
+ g_pfwFrames[g_nFramesCount].collapsed = (clfrm->Flags & F_UNCOLLAPSED) ? FALSE : TRUE;
- g_pfwFrames[g_nFramesCount].Locked = clfrm->Flags&F_LOCKED ? TRUE : FALSE;
- g_pfwFrames[g_nFramesCount].visible = clfrm->Flags&F_VISIBLE ? TRUE : FALSE;
+ g_pfwFrames[g_nFramesCount].Locked = clfrm->Flags & F_LOCKED ? TRUE : FALSE;
+ g_pfwFrames[g_nFramesCount].visible = clfrm->Flags & F_VISIBLE ? TRUE : FALSE;
g_pfwFrames[g_nFramesCount].UseBorder = ((clfrm->Flags&F_NOBORDER) || g_CluiData.fLayered) ? FALSE : TRUE;
//Frames[nFramescount].OwnerWindow = 0;
- g_pfwFrames[g_nFramesCount].TitleBar.hwnd
- = CreateWindow(CLUIFrameTitleBarClassName, g_pfwFrames[g_nFramesCount].name,
+ g_pfwFrames[g_nFramesCount].TitleBar.hwnd = CreateWindow(CLUIFrameTitleBarClassName, g_pfwFrames[g_nFramesCount].name,
(db_get_b(0, CLUIFrameModule, "RemoveAllTitleBarBorders", 1) ? 0 : WS_BORDER)
| WS_CHILD | WS_CLIPCHILDREN |
(g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBar ? WS_VISIBLE : 0) |
@@ -1651,8 +1618,7 @@ static int _us_DoAddFrame(WPARAM wParam, LPARAM)
0, 0, 0, 0, pcli->hwndContactList, NULL, g_hInst, NULL);
SetWindowLongPtr(g_pfwFrames[g_nFramesCount].TitleBar.hwnd, GWLP_USERDATA, g_pfwFrames[g_nFramesCount].id);
- g_pfwFrames[g_nFramesCount].TitleBar.hwndTip
- = CreateWindowEx(0, TOOLTIPS_CLASS, NULL,
+ g_pfwFrames[g_nFramesCount].TitleBar.hwndTip = CreateWindowEx(0, TOOLTIPS_CLASS, NULL,
WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
@@ -1740,14 +1706,11 @@ static int _us_DoRemoveFrame(WPARAM wParam, LPARAM)
pos = id2pos(wParam);
- if (pos < 0 || pos>g_nFramesCount) { return(-1); };
+ if (pos < 0 || pos>g_nFramesCount) return -1;;
mir_free_and_nil(g_pfwFrames[pos].name);
- mir_free_and_nil(g_pfwFrames[pos].szName);
mir_free_and_nil(g_pfwFrames[pos].TitleBar.tbname);
- mir_free_and_nil(g_pfwFrames[pos].TitleBar.sztbname);
mir_free_and_nil(g_pfwFrames[pos].TitleBar.tooltip);
- mir_free_and_nil(g_pfwFrames[pos].TitleBar.sztooltip);
DestroyWindow(g_pfwFrames[pos].hWnd);
g_pfwFrames[pos].hWnd = (HWND)-1;
DestroyWindow(g_pfwFrames[pos].TitleBar.hwnd);
@@ -1990,7 +1953,7 @@ static int CLUIFramesResizeFrames(const RECT newsize)
{
//sorting stuff
sdarray = (SortData*)malloc(sizeof(SortData)*g_nFramesCount);
- if (sdarray == NULL) { return(-1); };
+ if (sdarray == NULL) return -1;;
for (i = 0; i < g_nFramesCount; i++) {
sdarray[i].order = g_pfwFrames[i].order;
sdarray[i].realpos = i;
@@ -2779,21 +2742,16 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam
int pos;
//tbinfo
{
- char TBcapt[255];
-
-
+ TCHAR TBcapt[255];
pos = id2pos(Frameid);
-
if (pos != -1) {
int oldflags;
-
- mir_snprintf(TBcapt, _countof(TBcapt), "%s - h:%d, vis:%d, fl:%d, fl:(%d,%d,%d,%d),or: %d",
- g_pfwFrames[pos].szName, g_pfwFrames[pos].height, g_pfwFrames[pos].visible, g_pfwFrames[pos].floating,
+ mir_sntprintf(TBcapt, _countof(TBcapt), _T("%s - h:%d, vis:%d, fl:%d, fl:(%d,%d,%d,%d),or: %d"),
+ g_pfwFrames[pos].name, g_pfwFrames[pos].height, g_pfwFrames[pos].visible, g_pfwFrames[pos].floating,
g_pfwFrames[pos].FloatingPos.x, g_pfwFrames[pos].FloatingPos.y,
g_pfwFrames[pos].FloatingSize.x, g_pfwFrames[pos].FloatingSize.y,
- g_pfwFrames[pos].order
- );
+ g_pfwFrames[pos].order);
oldflags = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, g_pfwFrames[pos].id), 0);
if (!(oldflags&F_SHOWTBTIP)) {
@@ -3041,7 +2999,6 @@ static int CLUIFrameResizeFloatingFrame(int framepos)
if (g_pfwFrames[framepos].TitleBar.ShowTitleBar) {
CLUI_ShowWindowMod(g_pfwFrames[framepos].TitleBar.hwnd, SW_SHOW/*NOACTIVATE*/);
- //if (Frames[framepos].Locked){return 0;};
g_pfwFrames[framepos].height = height - DEFAULT_TITLEBAR_HEIGHT;
SetWindowPos(g_pfwFrames[framepos].TitleBar.hwnd, HWND_TOP, 0, 0, width, DEFAULT_TITLEBAR_HEIGHT, SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_DRAWFRAME);
@@ -3049,20 +3006,13 @@ static int CLUIFrameResizeFloatingFrame(int framepos)
}
else {
- //SetWindowPos(Frames[framepos].TitleBar.hwnd,HWND_TOP, 0, 0, width,DEFAULT_TITLEBAR_HEIGHT,SWP_SHOWWINDOW|SWP_NOMOVE);
- //if (Frames[framepos].Locked){return 0;};
g_pfwFrames[framepos].height = height;
CLUI_ShowWindowMod(g_pfwFrames[framepos].TitleBar.hwnd, SW_HIDE);
SetWindowPos(g_pfwFrames[framepos].hWnd, HWND_TOP, 0, 0, width, height, SWP_SHOWWINDOW | SWP_NOACTIVATE);
};
- // CLUIFramesForceUpdateFrame(&Frames[framepos]);
if (g_pfwFrames[framepos].ContainerWnd != 0) UpdateWindow(g_pfwFrames[framepos].ContainerWnd);
- //GetClientRect(Frames[framepos].TitleBar.hwnd,&Frames[framepos].TitleBar.wndSize);
GetWindowRect(g_pfwFrames[framepos].hWnd, &g_pfwFrames[framepos].wndSize);
- //Frames[framepos].height = Frames[framepos].wndSize.bottom-Frames[framepos].wndSize.top;
- //GetClientRect(Frames[framepos].hWnd,&Frames[framepos].wndSize);
- //Frames[framepos].height = Frames[framepos].wndSize.bottom-Frames[framepos].wndSize.top;
return 0;
};
@@ -3385,43 +3335,18 @@ int CLUIFrameOnModulesLoad(WPARAM, LPARAM)
{
/* HOOK */
CLUIFramesLoadMainMenu();
- CLUIFramesCreateMenuForFrame(-1, NULL, 000010000, Menu_AddContextFrameMenuItem);
+ CLUIFramesCreateMenuForFrame(-1, NULL, 000010000, false);
return 0;
}
int CLUIFrameOnModulesUnload(WPARAM, LPARAM)
{
- g_CluiData.bSTATE = STATE_PREPEARETOEXIT;
+ g_CluiData.bSTATE = STATE_PREPARETOEXIT;
- if (!cont.MIVisible)
- return 0;
-
- Menu_RemoveItem(cont.MIVisible);
- Menu_RemoveItem(cont.MITBVisible);
- Menu_RemoveItem(cont.MILock);
- Menu_RemoveItem(cont.MIColl);
- Menu_RemoveItem(cont.MIFloating);
- Menu_RemoveItem(cont.MIAlignTop);
- Menu_RemoveItem(cont.MIAlignClient);
- Menu_RemoveItem(cont.MIAlignBottom);
- Menu_RemoveItem(cont.MIBorder);
- Menu_RemoveItem(cont.MIAlignRoot);
-
- Menu_RemoveItem(cont.MIPosUp);
- Menu_RemoveItem(cont.MIPosDown);
- Menu_RemoveItem(cont.MIPosRoot);
-
- Menu_RemoveItem(cont.MIVisible);
- Menu_RemoveItem(cont.MITBVisible);
- Menu_RemoveItem(cont.MILock);
- Menu_RemoveItem(cont.MIColl);
- Menu_RemoveItem(cont.MIFloating);
- Menu_RemoveItem(cont.MIBorder);
- Menu_RemoveItem(cont.MIAlignRoot);
- Menu_RemoveItem(cont.MIPosRoot);
- cont.MIVisible = 0;
-
- _AniAva_OnModulesUnload();
+ if (cont.MIVisible) {
+ cont.MIVisible = NULL;
+ _AniAva_OnModulesUnload();
+ }
return 0;
}
@@ -3510,11 +3435,8 @@ int UnLoadCLUIFramesModule(void)
if (g_pfwFrames[i].UpdateRgn) DeleteObject(g_pfwFrames[i].UpdateRgn);
mir_free_and_nil(g_pfwFrames[i].name);
- mir_free_and_nil(g_pfwFrames[i].szName);
mir_free_and_nil(g_pfwFrames[i].TitleBar.tbname);
- mir_free_and_nil(g_pfwFrames[i].TitleBar.sztbname);
mir_free_and_nil(g_pfwFrames[i].TitleBar.tooltip);
- mir_free_and_nil(g_pfwFrames[i].TitleBar.sztooltip);
}
free(g_pfwFrames);
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.h b/plugins/Clist_modern/src/CLUIFrames/cluiframes.h
index b4d89866b3..09af1b44f2 100644
--- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.h
+++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.h
@@ -62,7 +62,7 @@ struct FrameMenuHandles
HGENMENU MainMenuItem;
HGENMENU MIVisible, MITitle, MITBVisible, MILock, MIColl, MIFloating, MIAlignRoot;
HGENMENU MIAlignTop, MIAlignClient, MIAlignBottom;
- HGENMENU MIBorder, MIPosRoot, MIPosUp, MIPosDown;
+ HGENMENU MIBorder;
};
struct FrameTitleBar
@@ -74,9 +74,6 @@ struct FrameTitleBar
LPTSTR tbname;
LPTSTR tooltip;
- char * sztbname;
- char * sztooltip;
-
HMENU hmenu;
HICON hicon;
@@ -101,7 +98,6 @@ struct FRAMEWND
HWND hWnd;
RECT wndSize;
LPTSTR name;
- LPSTR szName;
int align;
int height;
int dwFlags;
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
index 0c6a9a5e77..a63d2279ae 100644
--- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
@@ -84,7 +84,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam)
HGENMENU hNewItem = Menu_AddItem(hGroupMenuObject, &tmi);
char buf[1024];
- mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
+ mir_snprintf(buf, "%s/%s", mi->pszService, mi->name.a);
Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
return (INT_PTR)hNewItem;
}
@@ -229,43 +229,43 @@ void InitGroupMenus(void)
mi.position = 1900000;
mi.pszService = "CloseAction";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
- mi.pszName = LPGEN("E&xit");
+ mi.name.a = LPGEN("E&xit");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 500;
mi.pszService = MS_CLIST_SHOWHIDE;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
- mi.pszName = LPGEN("&Hide/show");
+ mi.name.a = LPGEN("&Hide/show");
hHideShowMainMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 200000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
- mi.pszName = LPGEN("&Find/add contacts...");
+ mi.name.a = LPGEN("&Find/add contacts...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300000;
mi.pszService = "";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU);
- mi.pszName = LPGEN("&Main menu");
+ mi.name.a = LPGEN("&Main menu");
hGroupMainMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300100;
mi.pszService = "";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS);
- mi.pszName = LPGEN("&Status");
+ mi.name.a = LPGEN("&Status");
hGroupStatusMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 400000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
- mi.pszName = LPGEN("&Options...");
+ mi.name.a = LPGEN("&Options...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 500000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "Help/AboutCommand";
- mi.pszName = LPGEN("&About");
+ mi.name.a = LPGEN("&About");
AddGroupMenuItem(0, (LPARAM)&mi);
GroupMenuParam gmp = {};
@@ -273,31 +273,31 @@ void InitGroupMenus(void)
mi.position = 100000;
mi.icolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSGroup/CreateGroupHelper";
- mi.pszName = LPGEN("&New group");
+ mi.name.a = LPGEN("&New group");
hNewGroupMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
- DestroyIcon_protect(mi.hIcon);
+ DestroyIcon_protect((HICON)mi.icolibItem);
mi.position = 100001;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.icolibItem = NULL;
mi.pszService = MS_CLIST_SETHIDEOFFLINE;
- mi.pszName = LPGEN("&Hide offline users");
+ mi.name.a = LPGEN("&Hide offline users");
gmp.lParam = 0; gmp.wParam = -1;
hHideOfflineUsersMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 100002;
mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
- mi.pszName = LPGEN("Hide &offline users out here");
+ mi.name.a = LPGEN("Hide &offline users out here");
hHideOfflineUsersOutHereMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 100003;
mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
- mi.pszName = LPGEN("Hide &empty groups");
+ mi.name.a = LPGEN("Hide &empty groups");
hHideEmptyGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 100004;
mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
- mi.pszName = LPGEN("Disable &groups");
+ mi.name.a = LPGEN("Disable &groups");
hDisableGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
}
@@ -384,7 +384,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam)
HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, &tmi);
char buf[1024];
- mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
+ mir_snprintf(buf, "%s/%s", mi->pszService, mi->name.a);
Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
return (INT_PTR)hNewItem;
}
@@ -472,25 +472,24 @@ void InitSubGroupMenus(void)
mi.position = 1000;
mi.icolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&New subgroup");
+ mi.name.a = LPGEN("&New subgroup");
gmp.lParam = 0;
gmp.wParam = POPUP_NEWSUBGROUP;
hNewSubGroupMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
- DestroyIcon_protect(mi.hIcon);
mi.position = 1001;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.icolibItem = NULL;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Hide offline users in here");
+ mi.name.a = LPGEN("&Hide offline users in here");
gmp.lParam = 0;
gmp.wParam = POPUP_GROUPHIDEOFFLINE;
hHideOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 1002;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Show offline users in here");
+ mi.name.a = LPGEN("&Show offline users in here");
gmp.lParam = 0;
gmp.wParam = POPUP_GROUPSHOWOFFLINE;
hShowOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
@@ -499,7 +498,7 @@ void InitSubGroupMenus(void)
mi.position = 900001;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Rename group");
+ mi.name.a = LPGEN("&Rename group");
gmp.lParam = 0;
gmp.wParam = POPUP_RENAMEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
@@ -507,7 +506,7 @@ void InitSubGroupMenus(void)
mi.position = 900002;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Delete group");
+ mi.name.a = LPGEN("&Delete group");
gmp.lParam = 0;
gmp.wParam = POPUP_DELETEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
diff --git a/plugins/Clist_modern/src/hdr/modern_commonheaders.h b/plugins/Clist_modern/src/hdr/modern_commonheaders.h
index 81ec07edc3..d81e30a5f7 100644
--- a/plugins/Clist_modern/src/hdr/modern_commonheaders.h
+++ b/plugins/Clist_modern/src/hdr/modern_commonheaders.h
@@ -195,7 +195,7 @@ enum
STATE_DLL_LOADING = 0,
STATE_CLUI_LOADING,
STATE_NORMAL,
- STATE_PREPEARETOEXIT,
+ STATE_PREPARETOEXIT,
STATE_EXITING
};
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp
index aa68906097..b31af23f27 100644
--- a/plugins/Clist_modern/src/modern_clistmenus.cpp
+++ b/plugins/Clist_modern/src/modern_clistmenus.cpp
@@ -36,7 +36,7 @@ int UnloadFavoriteContactMenu();
INT_PTR CloseAction(WPARAM, LPARAM)
{
int k;
- g_CluiData.bSTATE = STATE_PREPEARETOEXIT; // workaround for avatar service and other wich destroys service on OK_TOEXIT
+ g_CluiData.bSTATE = STATE_PREPARETOEXIT; // workaround for avatar service and other wich destroys service on OK_TOEXIT
do
k = CallService(MS_SYSTEM_OKTOEXIT, 0, 0);
while (!k);
@@ -103,19 +103,19 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM)
mi.icolibItem = iconList[bContactRate].hIcolib;
mi.flags = CMIF_TCHAR;
if (!bContactRate)
- mi.ptszName = FAVMENUROOTNAME;
+ mi.name.t = FAVMENUROOTNAME;
else {
TCHAR *str1 = TranslateTS(FAVMENUROOTNAME), *str2 = TranslateTS(rates[bContactRate]);
size_t bufsize = (mir_tstrlen(str1) + mir_tstrlen(str2) + 15) * sizeof(TCHAR);
TCHAR *name = (TCHAR *)_alloca(bufsize);
mir_sntprintf(name, (bufsize / sizeof(TCHAR)), _T("%s (%s)"), str1, str2);
- mi.ptszName = name;
+ mi.name.t = name;
mi.flags |= CMIF_KEEPUNTRANSLATED;
}
if (!hFavoriteContactMenu)
hFavoriteContactMenu = Menu_AddContactMenuItem(&mi);
else {
- Menu_ModifyItem(hFavoriteContactMenu, mi.ptszName);
+ Menu_ModifyItem(hFavoriteContactMenu, mi.name.t);
bModifyMenu = TRUE;
}
@@ -134,21 +134,21 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM)
Menu_ModifyItem(hFavoriteContactMenuItems[i], NULL, iconList[i].hIcolib, mi.flags);
else {
mi.icolibItem = iconList[i].hIcolib;
- mi.ptszName = rates[i];
+ mi.name.t = rates[i];
mi.pszService = CLUI_FAVSETRATE;
hFavoriteContactMenuItems[i] = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hFavoriteContactMenuItems[i], MCI_OPT_EXECPARAM, i);
}
}
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.flags = CMIF_TCHAR | (db_get_b(hContact, "CList", "noOffline", 0) ? CMIF_CHECKED : 0);
if (bModifyMenu && hShowIfOflineItem)
Menu_ModifyItem(hShowIfOflineItem, NULL, INVALID_HANDLE_VALUE, mi.flags);
else {
mi.pszService = CLUI_FAVTOGGLESHOWOFFLINE;
mi.position = -100000000;
- mi.ptszName = LPGENT("Show even if offline");
+ mi.name.t = LPGENT("Show even if offline");
hShowIfOflineItem = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hShowIfOflineItem, MCI_OPT_EXECPARAM, i + 100000000);
}
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp
index ac20d89b61..049e105b36 100644
--- a/plugins/Clist_modern/src/modern_clisttray.cpp
+++ b/plugins/Clist_modern/src/modern_clisttray.cpp
@@ -317,44 +317,44 @@ void InitTrayMenus(void)
CLISTMENUITEM mi = { 0 };
mi.position = 900000;
mi.pszService = "CloseAction";
- mi.pszName = LPGEN("E&xit");
+ mi.name.a = LPGEN("E&xit");
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
Menu_AddTrayMenuItem(&mi);
mi.position = 100000;
mi.pszService = MS_CLIST_SHOWHIDE;
- mi.pszName = LPGEN("&Hide/show");
+ mi.name.a = LPGEN("&Hide/show");
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
hTrayHideShowMainMenuItem = Menu_AddTrayMenuItem(&mi);
mi.position = 200000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
- mi.pszName = LPGEN("&Find/add contacts...");
+ mi.name.a = LPGEN("&Find/add contacts...");
Menu_AddTrayMenuItem(&mi);
mi.position = 300000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
mi.pszService = "FakeService_1";
- mi.pszName = LPGEN("&Main menu");
+ mi.name.a = LPGEN("&Main menu");
hTrayMainMenuItemProxy = Menu_AddTrayMenuItem(&mi);
mi.position = 300100;
mi.pszService = "FakeService_2";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS); // eternity #004
- mi.pszName = LPGEN("&Status");
+ mi.name.a = LPGEN("&Status");
hTrayStatusMenuItemProxy = Menu_AddTrayMenuItem(&mi);
mi.position = 400000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
- mi.pszName = LPGEN("&Options...");
+ mi.name.a = LPGEN("&Options...");
Menu_AddTrayMenuItem(&mi);
mi.position = 500000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "Help/AboutCommand";
- mi.pszName = LPGEN("&About");
+ mi.name.a = LPGEN("&About");
Menu_AddTrayMenuItem(&mi);
hMainMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 8ab38f6e47..d2945e1aa0 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -341,18 +341,16 @@ HRESULT CLUI::RegisterAvatarMenu()
CreateServiceFunction("CList/ShowContactAvatar", CLUI::Service_Menu_ShowContactAvatar);
mi.position = 2000150000;
mi.icolibItem = iconItem[0].hIcolib;
- mi.pszName = LPGEN("Show contact &avatar");
+ mi.name.a = LPGEN("Show contact &avatar");
mi.pszService = "CList/ShowContactAvatar";
hShowAvatarMenuItem = Menu_AddContactMenuItem(&mi);
- DestroyIcon_protect(mi.hIcon);
CreateServiceFunction("CList/HideContactAvatar", CLUI::Service_Menu_HideContactAvatar);
mi.position = 2000150001;
mi.icolibItem = iconItem[1].hIcolib;
- mi.pszName = LPGEN("Hide contact &avatar");
+ mi.name.a = LPGEN("Hide contact &avatar");
mi.pszService = "CList/HideContactAvatar";
hHideAvatarMenuItem = Menu_AddContactMenuItem(&mi);
- DestroyIcon_protect(mi.hIcon);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, CLUI::OnEvent_ContactMenuPreBuild);
return S_OK;
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp
index dc92f299de..14c8216866 100644
--- a/plugins/Clist_modern/src/modern_skinengine.cpp
+++ b/plugins/Clist_modern/src/modern_skinengine.cpp
@@ -2983,13 +2983,13 @@ static int ske_ValidateSingleFrameImage(FRAMEWND * Frame, BOOL SkipBkgBlitting)
BitBlt(g_pCachedWindow->hImageDC, rLine.left, rLine.top, rLine.right - rLine.left, rLine.bottom - rLine.top, g_pCachedWindow->hBackDC, rLine.left, rLine.top, SRCCOPY);
char req[255];
- mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%s,Part=Back", Frame->szName);
+ mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%S,Part=Back", Frame->name);
SkinDrawGlyph(g_pCachedWindow->hImageDC, &rLine, &rLine, req);
- mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%s,Part=Thumb", Frame->szName);
+ mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%S,Part=Thumb", Frame->name);
SkinDrawGlyph(g_pCachedWindow->hImageDC, &rThumb, &rThumb, req);
- mir_snprintf(req, _countof(req), "Main,ID=ScrollBar, Frame=%s,Part=UpLineButton", Frame->szName);
+ mir_snprintf(req, _countof(req), "Main,ID=ScrollBar, Frame=%S,Part=UpLineButton", Frame->name);
SkinDrawGlyph(g_pCachedWindow->hImageDC, &rUpBtn, &rUpBtn, req);
- mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%s,Part=DownLineButton", Frame->szName);
+ mir_snprintf(req, _countof(req), "Main,ID=ScrollBar,Frame=%S,Part=DownLineButton", Frame->name);
SkinDrawGlyph(g_pCachedWindow->hImageDC, &rDnBtn, &rDnBtn, req);
}
@@ -3019,6 +3019,7 @@ int ske_BltBackImage(HWND destHWND, HDC destDC, RECT *BltClientRect)
return BitBlt(destDC, w.left, w.top, (w.right - w.left), (w.bottom - w.top), g_pCachedWindow->hBackDC, (ptChildWnd.x - ptMainWnd.x), (ptChildWnd.y - ptMainWnd.y), SRCCOPY);
}
+
int ske_ReCreateBackImage(BOOL Erase, RECT *w)
{
RECT wnd = { 0 };
@@ -3112,7 +3113,8 @@ int ske_DrawNonFramedObjects(BOOL Erase, RECT *r)
return 0;
}
-int ske_ValidateFrameImageProc(RECT *r) // Calling queued frame paint procs and refresh image
+// Calling queued frame paint procs and refresh image
+int ske_ValidateFrameImageProc(RECT *r)
{
RECT wnd = { 0 };
BOOL IsNewCache = 0;
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
index 1921b5137c..e3e2986474 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
@@ -564,7 +564,17 @@ int CLUIFramesGetalClientFrame(void)
return -1;
}
-HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGENMENU(*pfnAdd)(CLISTMENUITEM*))
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static HGENMENU addFrameMenuItem(CLISTMENUITEM *pmi, int frameid, bool bMain)
+{
+ HGENMENU res = (bMain) ? Menu_AddMainMenuItem(pmi) : Menu_AddContextFrameMenuItem(pmi);
+ if (pmi->pszService != NULL)
+ Menu_ConfigureItem(res, MCI_OPT_EXECPARAM, frameid);
+ return res;
+}
+
+HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, bool bMain)
{
if (FramesSysNotStarted)
return NULL;
@@ -576,114 +586,107 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGE
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.hParentMenu = root;
mi.position = popuppos++;
- mi.pszName = LPGEN("&FrameTitle");
+ mi.name.a = LPGEN("&FrameTitle");
mi.flags = CMIF_GRAYED;
- fmh.MITitle = pfnAdd(&mi);
+ fmh.MITitle = addFrameMenuItem(&mi, frameid, bMain);
popuppos += 100000;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Visible");
+ mi.name.a = LPGEN("&Visible");
mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SHFRAME;
- Menu_ConfigureItem(fmh.MIVisible = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIVisible = addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
- mi.pszName = LPGEN("&Show title bar");
+ mi.name.a = LPGEN("&Show title bar");
mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SHFRAMETITLEBAR;
- Menu_ConfigureItem(fmh.MITBVisible = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MITBVisible = addFrameMenuItem(&mi, frameid, bMain);
popuppos += 100000;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Locked");
+ mi.name.a = LPGEN("&Locked");
mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_ULFRAME;
- Menu_ConfigureItem(fmh.MILock = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MILock = addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
- mi.pszName = LPGEN("&Collapsed");
+ mi.name.a = LPGEN("&Collapsed");
mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_UCOLLFRAME;
- Menu_ConfigureItem(fmh.MIColl = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIColl = addFrameMenuItem(&mi, frameid, bMain);
// floating
mi.position = popuppos++;
- mi.pszName = LPGEN("&Floating mode");
+ mi.name.a = LPGEN("&Floating mode");
mi.flags = 0;
mi.pszService = "Set_Floating";
- fmh.MIFloating = pfnAdd(&mi);
+ fmh.MIFloating = addFrameMenuItem(&mi, frameid, bMain);
popuppos += 100000;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Border");
+ mi.name.a = LPGEN("&Border");
mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETUNBORDER;
- Menu_ConfigureItem(fmh.MIBorder = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIBorder = addFrameMenuItem(&mi, frameid, bMain);
popuppos += 100000;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Skinned frame");
+ mi.name.a = LPGEN("&Skinned frame");
mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETSKINNED;
- Menu_ConfigureItem(fmh.MISkinned = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MISkinned = addFrameMenuItem(&mi, frameid, bMain);
popuppos += 100000;
// alignment root
mi.hParentMenu = root;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Align");
+ mi.name.a = LPGEN("&Align");
mi.flags = 0;
- mi.pszService = "";
- fmh.MIAlignRoot = pfnAdd(&mi);
+ mi.pszService = NULL;
+ fmh.MIAlignRoot = addFrameMenuItem(&mi, frameid, bMain);
// align top
mi.hParentMenu = fmh.MIAlignRoot;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Top");
+ mi.name.a = LPGEN("&Top");
mi.pszService = CLUIFRAMESSETALIGNALTOP;
- mi.pszContactOwner = (char*)alTop;
- Menu_ConfigureItem(fmh.MIAlignTop = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIAlignTop = addFrameMenuItem(&mi, frameid, bMain);
// align client
mi.position = popuppos++;
- mi.pszName = LPGEN("&Client");
+ mi.name.a = LPGEN("&Client");
mi.pszService = CLUIFRAMESSETALIGNALCLIENT;
- mi.pszContactOwner = (char*)alClient;
- Menu_ConfigureItem(fmh.MIAlignClient = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIAlignClient = addFrameMenuItem(&mi, frameid, bMain);
// align bottom
mi.position = popuppos++;
- mi.pszName = LPGEN("&Bottom");
+ mi.name.a = LPGEN("&Bottom");
mi.pszService = CLUIFRAMESSETALIGNALBOTTOM;
- mi.pszContactOwner = (char*)alBottom;
- Menu_ConfigureItem(fmh.MIAlignBottom = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ fmh.MIAlignBottom = addFrameMenuItem(&mi, frameid, bMain);
// position root
mi.hParentMenu = root;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Position");
- mi.pszService = "";
- mi.pszContactOwner = (char*)0;
- HGENMENU menuid = pfnAdd(&mi);
+ mi.name.a = LPGEN("&Position");
+ mi.pszService = NULL;
+ mi.hParentMenu = addFrameMenuItem(&mi, frameid, bMain);
- mi.hParentMenu = menuid;
mi.position = popuppos++;
- mi.pszName = LPGEN("&Up");
+ mi.name.a = LPGEN("&Up");
mi.pszService = CLUIFRAMESMOVEUP;
- mi.pszContactOwner = (char*)1;
- Menu_ConfigureItem(pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
- mi.pszName = LPGEN("&Down");
+ mi.name.a = LPGEN("&Down");
mi.pszService = CLUIFRAMESMOVEDOWN;
- mi.pszContactOwner = (char*)-1;
- Menu_ConfigureItem(pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
+ addFrameMenuItem(&mi, frameid, bMain);
return 0;
}
@@ -1338,21 +1341,21 @@ static int CLUIFramesLoadMainMenu()
CLISTMENUITEM mi = { 0 };
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME);
mi.position = 3000090000;
- mi.pszName = LPGEN("Frames");
+ mi.name.a = LPGEN("Frames");
mi.pszService = 0;
cont.MainMenuItem = Menu_AddMainMenuItem(&mi);
// create frames menu
int separator = (int)3000200000;
for (int i = 0; i < nFramescount; i++) {
- mi.hIcon = Frames[i].TitleBar.hicon;
+ mi.icolibItem = Frames[i].TitleBar.hicon;
mi.flags = CMIF_TCHAR;
mi.position = separator;
mi.hParentMenu = cont.MainMenuItem;
- mi.ptszName = Frames[i].TitleBar.tbname ? Frames[i].TitleBar.tbname : Frames[i].name;
+ mi.name.t = Frames[i].TitleBar.tbname ? Frames[i].TitleBar.tbname : Frames[i].name;
mi.pszService = 0;
Frames[i].MenuHandles.MainMenuItem = Menu_AddMainMenuItem(&mi);
- CLUIFramesCreateMenuForFrame(Frames[i].id, Frames[i].MenuHandles.MainMenuItem, separator, Menu_AddMainMenuItem);
+ CLUIFramesCreateMenuForFrame(Frames[i].id, Frames[i].MenuHandles.MainMenuItem, separator, true);
CLUIFramesModifyMainMenuItems(Frames[i].id, 0);
CallService(MS_CLIST_FRAMEMENUNOTIFY, (WPARAM)Frames[i].id, (LPARAM)Frames[i].MenuHandles.MainMenuItem);
separator++;
@@ -1365,20 +1368,20 @@ static int CLUIFramesLoadMainMenu()
mi.flags = 0;
mi.position = separator++;
mi.hParentMenu = cont.MainMenuItem;
- mi.pszName = LPGEN("Show all frames");
+ mi.name.a = LPGEN("Show all frames");
mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMES;
Menu_AddMainMenuItem(&mi);
// create "show all titlebars" menu
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HELP);
mi.position = separator++;
- mi.pszName = LPGEN("Show all title bars");
+ mi.name.a = LPGEN("Show all title bars");
mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMESTB;
Menu_AddMainMenuItem(&mi);
// create "hide all titlebars" menu
mi.position = separator++;
- mi.pszName = LPGEN("Hide all title bars");
+ mi.name.a = LPGEN("Hide all title bars");
mi.pszService = MS_CLIST_FRAMES_HIDEALLFRAMESTB;
Menu_AddMainMenuItem(&mi);
return 0;
@@ -2938,7 +2941,7 @@ static int CLUIFrameOnModulesLoad(WPARAM, LPARAM)
hThreadMFUpdate = mir_forkthread(MF_UpdateThread, NULL);
SetThreadPriority(hThreadMFUpdate, THREAD_PRIORITY_IDLE);
CLUIFramesLoadMainMenu();
- CLUIFramesCreateMenuForFrame(-1, NULL, 000010000, Menu_AddContextFrameMenuItem);
+ CLUIFramesCreateMenuForFrame(-1, NULL, 000010000, false);
return 0;
}
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.h b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.h
index 86aba956b1..4fef8cec0f 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.h
+++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.h
@@ -69,6 +69,7 @@ struct FrameTitleBar
LPTSTR tbname;
LPTSTR tooltip;
+
HMENU hmenu;
HICON hicon;
diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
index 077d832549..61911d6617 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
@@ -86,7 +86,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam)
HGENMENU hNewItem = Menu_AddItem(hGroupMenuObject, &tmi);
char buf[1024];
- mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
+ mir_snprintf(buf, "%s/%s", mi->pszService, mi->name.a);
Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
return (INT_PTR)hNewItem;
}
@@ -236,78 +236,78 @@ void InitGroupMenus(void)
mi.position = 1900000;
mi.pszService = "CloseAction";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
- mi.pszName = LPGEN("E&xit");
+ mi.name.a = LPGEN("E&xit");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 500;
mi.pszService = MS_CLIST_SHOWHIDE;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
- mi.pszName = LPGEN("&Hide/show");
+ mi.name.a = LPGEN("&Hide/show");
hHideShowMainMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 200000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
- mi.pszName = LPGEN("&Find/add contacts...");
+ mi.name.a = LPGEN("&Find/add contacts...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300000;
mi.pszService = "";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU);
- mi.pszName = LPGEN("&Main menu");
+ mi.name.a = LPGEN("&Main menu");
hGroupMainMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300100;
mi.pszService = "";
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS);
- mi.pszName = LPGEN("&Status");
+ mi.name.a = LPGEN("&Status");
hGroupStatusMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 390100;
mi.icolibItem = iconItem[1].hIcolib;
- mi.pszName = LPGEN("Appearance");
+ mi.name.a = LPGEN("Appearance");
hAppearanceMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 400000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
- mi.pszName = LPGEN("&Options...");
+ mi.name.a = LPGEN("&Options...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 500000;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "CLN/About";
- mi.pszName = LPGEN("&About the contact list...");
+ mi.name.a = LPGEN("&About the contact list...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.flags = 0;
mi.position = 100000;
mi.icolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&New group");
+ mi.name.a = LPGEN("&New group");
hNewGroupMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 100001;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.icolibItem = NULL;
mi.pszService = MS_CLIST_SETHIDEOFFLINE;
- mi.pszName = LPGEN("&Hide offline users");
+ mi.name.a = LPGEN("&Hide offline users");
gmp.lParam = 0; gmp.wParam = -1;
hHideOfflineUsersMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 100002;
mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
- mi.pszName = LPGEN("Hide &offline users out here");
+ mi.name.a = LPGEN("Hide &offline users out here");
hHideOfflineUsersOutHereMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 100003;
mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
- mi.pszName = LPGEN("Hide &empty groups");
+ mi.name.a = LPGEN("Hide &empty groups");
hHideEmptyGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 100004;
mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
- mi.pszName = LPGEN("Disable &groups");
+ mi.name.a = LPGEN("Disable &groups");
hDisableGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
}
@@ -369,7 +369,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam)
HGENMENU hNewItem = Menu_AddItem(hSubGroupMenuObject, &tmi);
char buf[1024];
- mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
+ mir_snprintf(buf, "%s/%s", mi->pszService, mi->name.a);
Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
return (INT_PTR)hNewItem;
}
@@ -464,16 +464,16 @@ void InitSubGroupMenus(void)
mi.position = 1000;
mi.icolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&New subgroup");
+ mi.name.a = LPGEN("&New subgroup");
gmp.lParam = 0;
gmp.wParam = POPUP_NEWSUBGROUP;
hNewSubGroupMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 1001;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.icolibItem = NULL;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Hide offline users in here");
+ mi.name.a = LPGEN("&Hide offline users in here");
gmp.lParam = 0;
gmp.wParam = POPUP_GROUPHIDEOFFLINE;
hHideOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
@@ -482,7 +482,7 @@ void InitSubGroupMenus(void)
mi.position = 900001;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Rename group");
+ mi.name.a = LPGEN("&Rename group");
gmp.lParam = 0;
gmp.wParam = POPUP_RENAMEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
@@ -490,7 +490,7 @@ void InitSubGroupMenus(void)
mi.position = 900002;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Delete group");
+ mi.name.a = LPGEN("&Delete group");
gmp.lParam = 0;
gmp.wParam = POPUP_DELETEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp
index fd7b062dd3..af4fc69042 100644
--- a/plugins/Clist_nicer/src/clistmenus.cpp
+++ b/plugins/Clist_nicer/src/clistmenus.cpp
@@ -385,7 +385,7 @@ int InitCustomMenus(void)
mi.position = 200000;
mi.pszService = "CList/SetContactIgnore";
mi.icolibItem = iconItem[1].hIcolib;
- mi.pszName = LPGEN("&Contact list settings...");
+ mi.name.a = LPGEN("&Contact list settings...");
Menu_AddContactMenuItem(&mi);
hMainStatusMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp
index 1a6df51867..0608ac2d5f 100644
--- a/plugins/Console/src/Console.cpp
+++ b/plugins/Console/src/Console.cpp
@@ -1161,9 +1161,9 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM)
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
- mi.hIcon = hIcons[0];
+ mi.icolibItem = hIcons[0];
mi.position = 1900000000;
- mi.ptszName = (IsWindowVisible(hwndConsole)) ? LPGENT("Hide Console") : LPGENT("Show Console");
+ mi.name.t = (IsWindowVisible(hwndConsole)) ? LPGENT("Hide Console") : LPGENT("Show Console");
mi.pszService = MS_CONSOLE_SHOW_HIDE;
hMenu = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp
index 30eb931822..a4dc6ff656 100644
--- a/plugins/ContactsPlus/src/main.cpp
+++ b/plugins/ContactsPlus/src/main.cpp
@@ -136,10 +136,10 @@ static int HookModulesLoaded(WPARAM, LPARAM)
CallService("DBEditorpp/RegisterModule", (WPARAM)modules, 1);
CLISTMENUITEM mi = { 0 };
- mi.pszName = LPGEN("Contacts");
+ mi.name.a = LPGEN("Contacts");
mi.position = -2000009990; //position in menu
mi.pszService = MS_CONTACTS_SEND;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_CONTACTS));
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_CONTACTS));
hContactMenuItem = Menu_AddContactMenuItem(&mi);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, HookPreBuildContactMenu);
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp
index 57a0ef06ee..ba56531671 100644
--- a/plugins/CrashDumper/src/crshdmp.cpp
+++ b/plugins/CrashDumper/src/crshdmp.cpp
@@ -259,51 +259,51 @@ static int ModulesLoaded(WPARAM, LPARAM)
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Version Information"), 2000089999, GetIconHandle(IDI_VI));
mi.position = 2000089995;
- mi.pszName = LPGEN("Copy to clipboard");
+ mi.name.a = LPGEN("Copy to clipboard");
mi.icolibItem = GetIconHandle(IDI_VITOCLIP);
mi.pszService = MS_CRASHDUMPER_STORETOCLIP;
Menu_AddMainMenuItem(&mi);
mi.position = 2000089996;
- mi.pszName = LPGEN("Store to file");
+ mi.name.a = LPGEN("Store to file");
mi.icolibItem = GetIconHandle(IDI_VITOFILE);
mi.pszService = MS_CRASHDUMPER_STORETOFILE;
Menu_AddMainMenuItem(&mi);
mi.position = 2000089997;
- mi.pszName = LPGEN("Show");
+ mi.name.a = LPGEN("Show");
mi.icolibItem = GetIconHandle(IDI_VISHOW);
mi.pszService = MS_CRASHDUMPER_VIEWINFO;
Menu_AddMainMenuItem(&mi);
mi.position = 2000089998;
- mi.pszName = LPGEN("Show with DLLs");
+ mi.name.a = LPGEN("Show with DLLs");
mi.icolibItem = GetIconHandle(IDI_VIUPLOAD);
mi.pszService = MS_CRASHDUMPER_VIEWINFO;
Menu_ConfigureItem(Menu_AddMainMenuItem(&mi), MCI_OPT_EXECPARAM, 1);
mi.position = 2000089999;
- mi.pszName = LPGEN("Upload");
+ mi.name.a = LPGEN("Upload");
mi.icolibItem = GetIconHandle(IDI_VIUPLOAD);
mi.pszService = MS_CRASHDUMPER_UPLOAD;
Menu_AddMainMenuItem(&mi);
mi.position = 2000089999;
- mi.pszName = LPGEN("Copy link to clipboard");
+ mi.name.a = LPGEN("Copy link to clipboard");
mi.icolibItem = GetIconHandle(IDI_LINKTOCLIP);//need icon
mi.pszService = MS_CRASHDUMPER_URLTOCLIP;
Menu_AddMainMenuItem(&mi);
if (catchcrashes && !needrestart) {
mi.position = 2000099990;
- mi.pszName = LPGEN("Open crash report directory");
+ mi.name.a = LPGEN("Open crash report directory");
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.pszService = MS_CRASHDUMPER_URL;
Menu_AddMainMenuItem(&mi);
}
mi.position = 2000099991;
- mi.pszName = LPGEN("Open online Version Info");
+ mi.name.a = LPGEN("Open online Version Info");
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.pszService = MS_CRASHDUMPER_URL;
Menu_ConfigureItem(Menu_AddMainMenuItem(&mi), MCI_OPT_EXECPARAM, 1);
diff --git a/plugins/CyrTranslit/src/MirandaContact.cpp b/plugins/CyrTranslit/src/MirandaContact.cpp
index 653e134388..c517ac12bc 100644
--- a/plugins/CyrTranslit/src/MirandaContact.cpp
+++ b/plugins/CyrTranslit/src/MirandaContact.cpp
@@ -64,7 +64,7 @@ void MirandaContact::save(MCONTACT hContact, bool bValue)
void MirandaContact::addMenuItem()
{
CLISTMENUITEM mi = { 0 };
- mi.pszName = MENU_ITEM_TEXT;
+ mi.name.a = MENU_ITEM_TEXT;
mi.position = 65535;
mi.pszService = MENU_COMMAND_CALLBACK_SERVICE;
hTransliterateCmdMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp
index 0fbbe2e031..8a385b21f5 100644
--- a/plugins/Db3x_mmap/src/ui.cpp
+++ b/plugins/Db3x_mmap/src/ui.cpp
@@ -312,14 +312,14 @@ static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM)
// main menu item
CLISTMENUITEM mi = { 0 };
- mi.ptszName = LPGENT("Database");
+ mi.name.t = LPGENT("Database");
mi.position = 500000000;
mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[0].hIcolib;
HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
mi.icolibItem = iconList[1].hIcolib;
- mi.ptszName = db->GetMenuTitle();
+ mi.name.t = db->GetMenuTitle();
mi.hParentMenu = hMenuRoot;
mi.pszService = MS_DB_CHANGEPASSWORD;
hSetPwdMenu = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp
index 840a49442c..c887ddb809 100644
--- a/plugins/DbEditorPP/src/main.cpp
+++ b/plugins/DbEditorPP/src/main.cpp
@@ -117,7 +117,7 @@ int ModulesLoaded(WPARAM, LPARAM)
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), 1900000001);
mi.position = 1900000001;
mi.icolibItem = GetIcoLibHandle(ICO_DBE_BUTT);
- mi.pszName = modFullname;
+ mi.name.a = modFullname;
mi.pszService = "DBEditorpp/MenuCommand";
Menu_AddMainMenuItem(&mi);
@@ -125,7 +125,7 @@ int ModulesLoaded(WPARAM, LPARAM)
mi.position = 1900000001;
mi.flags = 0;
mi.icolibItem = GetIcoLibHandle(ICO_REGUSER);
- mi.pszName = LPGEN("Open user tree in DBE++");
+ mi.name.a = LPGEN("Open user tree in DBE++");
mi.pszService = "DBEditorpp/MenuCommand";
hUserMenu = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp
index 99b4abe08b..cc04428fa3 100644
--- a/plugins/Db_autobackups/src/main.cpp
+++ b/plugins/Db_autobackups/src/main.cpp
@@ -102,13 +102,13 @@ int ModulesLoad(WPARAM, LPARAM)
CLISTMENUITEM mi = { 0 };
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), 500100000);
- mi.pszName = LPGEN("Backup profile");
+ mi.name.a = LPGEN("Backup profile");
mi.pszService = MS_AB_BACKUP;
mi.icolibItem = iconList[0].hIcolib;
mi.position = 500100000;
Menu_AddMainMenuItem(&mi);
- mi.pszName = LPGEN("Save profile as...");
+ mi.name.a = LPGEN("Save profile as...");
mi.pszService = MS_AB_SAVEAS;
mi.icolibItem = iconList[1].hIcolib;
mi.position = 500100001;
diff --git a/plugins/Dropbox/src/dropbox_menus.cpp b/plugins/Dropbox/src/dropbox_menus.cpp
index 432bd211ec..c1c57fbf1f 100644
--- a/plugins/Dropbox/src/dropbox_menus.cpp
+++ b/plugins/Dropbox/src/dropbox_menus.cpp
@@ -17,7 +17,7 @@ void CDropbox::InitializeMenus()
{
CLISTMENUITEM mi = { 0 };
mi.pszService = MODULE"/SendFilesToDropbox";
- mi.pszName = LPGEN("Upload files to Dropbox");
+ mi.name.a = LPGEN("Upload files to Dropbox");
mi.position = -2000020000 + CMI_SEND_FILES;
mi.icolibItem = GetIconHandleByName("upload");
contactMenuItems[CMI_SEND_FILES] = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/Exchange/src/hooked_events.cpp b/plugins/Exchange/src/hooked_events.cpp
index 7ee2eec3b6..7f6bd40295 100644
--- a/plugins/Exchange/src/hooked_events.cpp
+++ b/plugins/Exchange/src/hooked_events.cpp
@@ -60,13 +60,13 @@ int OnModulesLoaded(WPARAM, LPARAM)
{
UpdateTimers();
- CLISTMENUITEM cl = {0};
- cl.hIcon = hiMailIcon;
- cl.position = 10000000;
- cl.pszService = MS_EXCHANGE_CHECKEMAIL;
- cl.flags = CMIF_TCHAR;
- cl.ptszName = LPGENT("Check exchange mailbox");
- Menu_AddMainMenuItem (&cl);
+ CLISTMENUITEM mi = {0};
+ mi.icolibItem = hiMailIcon;
+ mi.position = 10000000;
+ mi.pszService = MS_EXCHANGE_CHECKEMAIL;
+ mi.flags = CMIF_TCHAR;
+ mi.name.t = LPGENT("Check exchange mailbox");
+ Menu_AddMainMenuItem(&mi);
hEmailsDlg = NULL; //CreateDialog(hInstance, MAKEINTRESOURCE(IDD_EMAILS), NULL, DlgProcEmails); //create emails window
FirstTimeCheck();
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index bf5950cdae..ed5185dd71 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -95,14 +95,14 @@ void InitMenuItems()
mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
- mi.ptszName = LPGENT("FTP File");
+ mi.name.t = LPGENT("FTP File");
hMainMenu = Menu_AddMainMenuItem(&mi);
if (opt.bUseSubmenu)
hMenu = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.ptszName = stzName;
+ mi.name.t = stzName;
CLISTMENUITEM mi2 = { 0 };
mi2.flags = CMIF_TCHAR;
@@ -127,7 +127,7 @@ void InitMenuItems()
mi2.hParentMenu = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
- mi2.ptszName = LPGENT("Upload file(s)");
+ mi2.name.t = LPGENT("Upload file(s)");
HGENMENU tmp = Menu_AddContactMenuItem(&mi2);
Menu_ConfigureItem(tmp, MCI_OPT_EXECPARAM, mi2.position = i + UploadJob::FTP_RAWFILE);
@@ -137,7 +137,7 @@ void InitMenuItems()
mi2.hParentMenu = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
- mi2.ptszName = LPGENT("Zip and upload file(s)");
+ mi2.name.t = LPGENT("Zip and upload file(s)");
tmp = Menu_AddContactMenuItem(&mi2);
Menu_ConfigureItem(tmp, MCI_OPT_EXECPARAM, i + UploadJob::FTP_ZIPFILE);
@@ -147,7 +147,7 @@ void InitMenuItems()
mi2.hParentMenu = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
- mi2.ptszName = LPGENT("Zip and upload folder");
+ mi2.name.t = LPGENT("Zip and upload folder");
tmp = Menu_AddContactMenuItem(&mi2);
Menu_ConfigureItem(tmp, MCI_OPT_EXECPARAM, i + UploadJob::FTP_ZIPFOLDER);
@@ -160,7 +160,7 @@ void InitMenuItems()
mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
- mi.ptszName = LPGENT("FTP File manager");
+ mi.name.t = LPGENT("FTP File manager");
mi.pszService = MS_FTPFILE_SHOWMANAGER;
mi.hParentMenu = hMainMenu;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp
index ae7188e548..cb0889af43 100644
--- a/plugins/FileAsMessage/src/main.cpp
+++ b/plugins/FileAsMessage/src/main.cpp
@@ -176,8 +176,8 @@ static int OnModulesLoaded(WPARAM wparam, LPARAM lparam)
CLISTMENUITEM mi = { 0 };
mi.position = 200011;
- mi.hIcon = hIcons[ICON_MAIN];
- mi.pszName = LPGEN("File As Message...");
+ mi.icolibItem = hIcons[ICON_MAIN];
+ mi.name.a = LPGEN("File As Message...");
mi.pszService = SERVICE_NAME "/FESendFile";
mi.flags = CMIF_NOTOFFLINE;
Menu_AddContactMenuItem(&mi);
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp
index 36047e19f3..22a9c99a75 100644
--- a/plugins/FloatingContacts/src/main.cpp
+++ b/plugins/FloatingContacts/src/main.cpp
@@ -719,16 +719,16 @@ static void LoadMenus()
CLISTMENUITEM mi = { 0 };
mi.position = 0xFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_HIDE));
- mi.ptszName = LPGENT("Remove thumb");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_HIDE));
+ mi.name.t = LPGENT("Remove thumb");
mi.pszService = MODULE "/RemoveThumb";
hMenuItemRemove = Menu_AddContactMenuItem(&mi);
// Hide all thumbs main menu item
CreateServiceFunction(MODULE "/MainHideAllThumbs", OnMainMenu_HideAll);
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(fcOpt.bHideAll ? IDI_SHOW : IDI_HIDE));
- mi.ptszName = fcOpt.bHideAll ? LPGENT("Show all thumbs") : LPGENT("Hide all thumbs");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(fcOpt.bHideAll ? IDI_SHOW : IDI_HIDE));
+ mi.name.t = fcOpt.bHideAll ? LPGENT("Show all thumbs") : LPGENT("Hide all thumbs");
mi.pszService = MODULE "/MainHideAllThumbs";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/GmailNotifier/src/gmail.h b/plugins/GmailNotifier/src/gmail.h
index 1c56a13e80..d6293e4436 100644
--- a/plugins/GmailNotifier/src/gmail.h
+++ b/plugins/GmailNotifier/src/gmail.h
@@ -25,7 +25,7 @@
#define WM_SHELLNOTIFY WM_USER+5
#define IDI_TRAY WM_USER+6
-#define pluginName "GmailMNotifier"
+#define MODULE_NAME "GmailMNotifier"
#define _MAX_DOWN_BUFFER 65536
#define LINK "https://accounts.google.com/ServiceLogin?continue=https%3A%2F%2Fmail.google.com%2Fmail&service=mail&passive=true&Email="
#define FORMDATA1 "<body onload=document.gmail.submit();><form name=gmail action=https://www.google.com/a/"
diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp
index 77480035dc..ca9ce6a3b5 100644
--- a/plugins/GmailNotifier/src/main.cpp
+++ b/plugins/GmailNotifier/src/main.cpp
@@ -51,7 +51,7 @@ INT_PTR GetStatus(WPARAM wParam, LPARAM lParam)
INT_PTR GetName(WPARAM wParam, LPARAM lParam)
{
- mir_strncpy((char*)lParam, pluginName, wParam);
+ mir_strncpy((char*)lParam, MODULE_NAME, wParam);
return 0;
}
@@ -93,26 +93,26 @@ extern "C" int __declspec(dllexport) Load()
HookEvent(ME_CLIST_DOUBLECLICKED, OpenBrowser);
PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
- pd.szName = pluginName;
+ pd.szName = MODULE_NAME;
pd.type = PROTOTYPE_VIRTUAL;
Proto_RegisterModule(&pd);
- CreateProtoServiceFunction(pluginName, PS_GETCAPS, GetCaps);
- CreateProtoServiceFunction(pluginName, PS_GETSTATUS, GetStatus);
- CreateProtoServiceFunction(pluginName, PS_GETNAME, GetName);
+ CreateProtoServiceFunction(MODULE_NAME, PS_GETCAPS, GetCaps);
+ CreateProtoServiceFunction(MODULE_NAME, PS_GETSTATUS, GetStatus);
+ CreateProtoServiceFunction(MODULE_NAME, PS_GETNAME, GetName);
CreateServiceFunction("GmailMNotifier/Notifying", Notifying);
- opt.circleTime = db_get_dw(NULL, pluginName, "circleTime", 30);
- opt.notifierOnTray = db_get_dw(NULL, pluginName, "notifierOnTray", TRUE);
- opt.notifierOnPop = db_get_dw(NULL, pluginName, "notifierOnPop", TRUE);
- opt.popupDuration = db_get_dw(NULL, pluginName, "popupDuration", -1);
- opt.popupBgColor = db_get_dw(NULL, pluginName, "popupBgColor", RGB(173, 206, 247));
- opt.popupTxtColor = db_get_dw(NULL, pluginName, "popupTxtColor", RGB(0, 0, 0));
- opt.OpenUsePrg = db_get_dw(NULL, pluginName, "OpenUsePrg", 0);
- opt.ShowCustomIcon = db_get_dw(NULL, pluginName, "ShowCustomIcon", FALSE);
- opt.UseOnline = db_get_dw(NULL, pluginName, "UseOnline", FALSE);
- opt.AutoLogin = db_get_dw(NULL, pluginName, "AutoLogin", TRUE);
- opt.LogThreads = db_get_dw(NULL, pluginName, "LogThreads", FALSE);
+ opt.circleTime = db_get_dw(NULL, MODULE_NAME, "circleTime", 30);
+ opt.notifierOnTray = db_get_dw(NULL, MODULE_NAME, "notifierOnTray", TRUE);
+ opt.notifierOnPop = db_get_dw(NULL, MODULE_NAME, "notifierOnPop", TRUE);
+ opt.popupDuration = db_get_dw(NULL, MODULE_NAME, "popupDuration", -1);
+ opt.popupBgColor = db_get_dw(NULL, MODULE_NAME, "popupBgColor", RGB(173, 206, 247));
+ opt.popupTxtColor = db_get_dw(NULL, MODULE_NAME, "popupTxtColor", RGB(0, 0, 0));
+ opt.OpenUsePrg = db_get_dw(NULL, MODULE_NAME, "OpenUsePrg", 0);
+ opt.ShowCustomIcon = db_get_dw(NULL, MODULE_NAME, "ShowCustomIcon", FALSE);
+ opt.UseOnline = db_get_dw(NULL, MODULE_NAME, "UseOnline", FALSE);
+ opt.AutoLogin = db_get_dw(NULL, MODULE_NAME, "AutoLogin", TRUE);
+ opt.LogThreads = db_get_dw(NULL, MODULE_NAME, "LogThreads", FALSE);
DBVARIANT dbv;
if (db_get_s(NULL, "Icons", "GmailMNotifier40076", &dbv)) {
@@ -126,23 +126,25 @@ extern "C" int __declspec(dllexport) Load()
BuildList();
ID_STATUS_NONEW = opt.UseOnline ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE;
for (int i = 0; i < acc_num; i++)
- db_set_dw(acc[i].hContact, pluginName, "Status", ID_STATUS_NONEW);
+ db_set_dw(acc[i].hContact, MODULE_NAME, "Status", ID_STATUS_NONEW);
hTimer = SetTimer(NULL, 0, opt.circleTime * 60000, TimerProc);
hMirandaStarted = HookEvent(ME_SYSTEM_MODULESLOADED, OnMirandaStart);
hOptionsInitial = HookEvent(ME_OPT_INITIALISE, OptInit);
- CreateServiceFunction("GmailMNotifier/MenuCommand", PluginMenuCommand);
+
+ CreateServiceFunction(MODULE_NAME "/MenuCommand", PluginMenuCommand);
CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = 0;
- mi.hIcon = Skin_LoadProtoIcon(pluginName, ID_STATUS_ONLINE);
- mi.pszName = LPGEN("&Check all Gmail inboxes");
- mi.pszContactOwner = pluginName;
- mi.pszService = "GmailMNotifier/MenuCommand";
+ mi.icolibItem = Skin_LoadProtoIcon(MODULE_NAME, ID_STATUS_ONLINE);
+ mi.name.a = LPGEN("&Check all Gmail inboxes");
+ mi.pszService = MODULE_NAME "/MenuCommand";
Menu_AddMainMenuItem(&mi);
- mi.pszName = LPGEN("&Check Gmail inbox");
- Menu_AddContactMenuItem(&mi);
+
+ mi.name.a = LPGEN("&Check Gmail inbox");
+ mi.pszService = "/MenuCommand";
+ Menu_AddContactMenuItem(&mi, MODULE_NAME);
return 0;
}
diff --git a/plugins/GmailNotifier/src/notify.cpp b/plugins/GmailNotifier/src/notify.cpp
index e1aff5e67e..9ec7111750 100644
--- a/plugins/GmailNotifier/src/notify.cpp
+++ b/plugins/GmailNotifier/src/notify.cpp
@@ -3,7 +3,7 @@
int OpenBrowser(WPARAM hContact, LPARAM lParam)
{
char *proto = GetContactProto(hContact);
- if (proto && !mir_strcmp(proto, pluginName)) {
+ if (proto && !mir_strcmp(proto, MODULE_NAME)) {
Account *curAcc = GetAccountByContact(hContact);
PUDeletePopup(curAcc->popUpHwnd);
CallServiceSync(MS_CLIST_REMOVEEVENT, (WPARAM)curAcc->hContact, (LPARAM)1);
@@ -11,7 +11,7 @@ int OpenBrowser(WPARAM hContact, LPARAM lParam)
return FALSE;
if (curAcc->oldResults_num != 0) {
- db_set_w(curAcc->hContact, pluginName, "Status", ID_STATUS_NONEW);
+ db_set_w(curAcc->hContact, MODULE_NAME, "Status", ID_STATUS_NONEW);
curAcc->oldResults_num = 0;
DeleteResults(curAcc->results.next);
curAcc->results.next = NULL;
@@ -61,21 +61,21 @@ void NotifyUser(Account *curAcc)
PUDeletePopup(curAcc->popUpHwnd);
CallServiceSync(MS_CLIST_REMOVEEVENT, (WPARAM)curAcc->hContact, (LPARAM)1);
if (curAcc->oldResults_num != 0)
- db_set_w(curAcc->hContact, pluginName, "Status", ID_STATUS_NONEW);
+ db_set_w(curAcc->hContact, MODULE_NAME, "Status", ID_STATUS_NONEW);
break;
case -1:
- db_set_w(curAcc->hContact, pluginName, "Status", ID_STATUS_AWAY);
+ db_set_w(curAcc->hContact, MODULE_NAME, "Status", ID_STATUS_AWAY);
break;
default:
- db_set_w(curAcc->hContact, pluginName, "Status", ID_STATUS_OCCUPIED);
+ db_set_w(curAcc->hContact, MODULE_NAME, "Status", ID_STATUS_OCCUPIED);
int newMails = (curAcc->oldResults_num == -1) ? (curAcc->results_num) : (curAcc->results_num - curAcc->oldResults_num);
if (opt.LogThreads&&newMails > 0) {
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_READ;
- dbei.szModule = pluginName;
+ dbei.szModule = MODULE_NAME;
dbei.timestamp = time(NULL);
resultLink *prst = curAcc->results.next;
@@ -91,7 +91,7 @@ void NotifyUser(Account *curAcc)
cle.hContact = curAcc->hContact;
cle.hDbEvent = 1;
cle.flags = CLEF_URGENT;
- cle.hIcon = Skin_LoadProtoIcon(pluginName, ID_STATUS_OCCUPIED);
+ cle.hIcon = Skin_LoadProtoIcon(MODULE_NAME, ID_STATUS_OCCUPIED);
cle.pszService = "GmailMNotifier/Notifying";
cle.pszTooltip = curAcc->results.next->content;
CallServiceSync(MS_CLIST_REMOVEEVENT, (WPARAM)curAcc->hContact, (LPARAM)1);
@@ -102,7 +102,7 @@ void NotifyUser(Account *curAcc)
POPUPDATA ppd = { 0 };
ppd.lchContact = curAcc->hContact;
- ppd.lchIcon = Skin_LoadProtoIcon(pluginName, ID_STATUS_OCCUPIED);
+ ppd.lchIcon = Skin_LoadProtoIcon(MODULE_NAME, ID_STATUS_OCCUPIED);
mir_strcpy(ppd.lpzContactName, curAcc->results.content);
resultLink *prst = curAcc->results.next;
for (int i = 0; i < 5 && i < newMails; i++) {
diff --git a/plugins/GmailNotifier/src/options.cpp b/plugins/GmailNotifier/src/options.cpp
index f329cbf2e0..652a674981 100644
--- a/plugins/GmailNotifier/src/options.cpp
+++ b/plugins/GmailNotifier/src/options.cpp
@@ -8,10 +8,10 @@ static void SaveButton(HWND hwndDlg,HWND hwndCombo, int curIndex) {
SendMessageA(hwndCombo, CB_DELETESTRING, curIndex, 0);
SendMessageA(hwndCombo, CB_INSERTSTRING, curIndex, (LPARAM)acc[curIndex].name);
SendMessageA(hwndCombo, CB_SETCURSEL, curIndex, 0);
- db_set_s(acc[curIndex].hContact, pluginName, "name", acc[curIndex].name);
- db_set_s(acc[curIndex].hContact, pluginName, "Nick", acc[curIndex].name);
+ db_set_s(acc[curIndex].hContact, MODULE_NAME, "name", acc[curIndex].name);
+ db_set_s(acc[curIndex].hContact, MODULE_NAME, "Nick", acc[curIndex].name);
GetDlgItemTextA(hwndDlg, IDC_PASS, acc[curIndex].pass, _countof(acc[curIndex].pass));
- db_set_s(acc[curIndex].hContact, pluginName, "Password", acc[curIndex].pass);
+ db_set_s(acc[curIndex].hContact, MODULE_NAME, "Password", acc[curIndex].pass);
}
}
static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -77,7 +77,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
{
DBVARIANT dbv;
- if (!db_get_s(NULL, pluginName, "OpenUsePrgPath", &dbv)) {
+ if (!db_get_s(NULL, MODULE_NAME, "OpenUsePrgPath", &dbv)) {
mir_strcpy(str, dbv.pszVal);
db_free(&dbv);
}
@@ -150,7 +150,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
SetDlgItemTextA(hwndDlg, IDC_PASS, "");
SetFocus(hwndCombo);
acc[curIndex].hContact = CallService(MS_DB_CONTACT_ADD, 0, 0);
- Proto_AddToContact(acc[curIndex].hContact, pluginName);
+ Proto_AddToContact(acc[curIndex].hContact, MODULE_NAME);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -202,20 +202,20 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
if (opt.circleTime > 0) {
KillTimer(NULL, hTimer);
hTimer = SetTimer(NULL, 0, opt.circleTime * 60000, TimerProc);
- db_set_dw(NULL, pluginName, "circleTime", opt.circleTime);
+ db_set_dw(NULL, MODULE_NAME, "circleTime", opt.circleTime);
}
opt.notifierOnTray = IsDlgButtonChecked(hwndDlg, IDC_OPTTRAY);
opt.notifierOnPop = IsDlgButtonChecked(hwndDlg, IDC_OPTPOP);
- db_set_dw(NULL, pluginName, "notifierOnTray", opt.notifierOnTray);
- db_set_dw(NULL, pluginName, "notifierOnPop", opt.notifierOnPop);
+ db_set_dw(NULL, MODULE_NAME, "notifierOnTray", opt.notifierOnTray);
+ db_set_dw(NULL, MODULE_NAME, "notifierOnPop", opt.notifierOnPop);
opt.popupDuration = GetDlgItemInt(hwndDlg, IDC_DURATION, NULL, TRUE);
- db_set_dw(NULL, pluginName, "popupDuration", opt.popupDuration);
+ db_set_dw(NULL, MODULE_NAME, "popupDuration", opt.popupDuration);
opt.popupBgColor = SendDlgItemMessage(hwndDlg, IDC_BGCOLOR, CPM_GETCOLOUR, 0, opt.popupBgColor);
opt.popupTxtColor = SendDlgItemMessage(hwndDlg, IDC_TEXTCOLOR, CPM_GETCOLOUR, 0, opt.popupBgColor);
- db_set_dw(NULL, pluginName, "popupBgColor", opt.popupBgColor);
- db_set_dw(NULL, pluginName, "popupTxtColor", opt.popupTxtColor);
+ db_set_dw(NULL, MODULE_NAME, "popupBgColor", opt.popupBgColor);
+ db_set_dw(NULL, MODULE_NAME, "popupTxtColor", opt.popupTxtColor);
if (IsDlgButtonChecked(hwndDlg, IDC_SYSDEF) == BST_CHECKED)
opt.OpenUsePrg = 0;
@@ -226,8 +226,8 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
GetDlgItemTextA(hwndDlg, IDC_PRG, str, _countof(str));
- db_set_dw(NULL, pluginName, "OpenUsePrg", opt.OpenUsePrg);
- db_set_s(NULL, pluginName, "OpenUsePrgPath", str);
+ db_set_dw(NULL, MODULE_NAME, "OpenUsePrg", opt.OpenUsePrg);
+ db_set_s(NULL, MODULE_NAME, "OpenUsePrgPath", str);
opt.ShowCustomIcon = IsDlgButtonChecked(hwndDlg, IDC_SHOWICON);
opt.UseOnline = IsDlgButtonChecked(hwndDlg, IDC_ONLINE);
@@ -238,14 +238,14 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
else if (IsDlgButtonChecked(hwndDlg, IDC_AUTOLOGIN) == BST_INDETERMINATE)
opt.AutoLogin = 2;
opt.LogThreads = IsDlgButtonChecked(hwndDlg, IDC_LOGTHREADS);
- db_set_dw(NULL, pluginName, "ShowCustomIcon", opt.ShowCustomIcon);
- db_set_dw(NULL, pluginName, "UseOnline", opt.UseOnline);
- db_set_dw(NULL, pluginName, "AutoLogin", opt.AutoLogin);
- db_set_dw(NULL, pluginName, "LogThreads", opt.LogThreads);
+ db_set_dw(NULL, MODULE_NAME, "ShowCustomIcon", opt.ShowCustomIcon);
+ db_set_dw(NULL, MODULE_NAME, "UseOnline", opt.UseOnline);
+ db_set_dw(NULL, MODULE_NAME, "AutoLogin", opt.AutoLogin);
+ db_set_dw(NULL, MODULE_NAME, "LogThreads", opt.LogThreads);
ID_STATUS_NONEW = opt.UseOnline ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE;
for (int i = 0; i < acc_num; i++)
- db_set_w(acc[i].hContact, pluginName, "Status", ID_STATUS_NONEW);
+ db_set_w(acc[i].hContact, MODULE_NAME, "Status", ID_STATUS_NONEW);
}
return TRUE;
diff --git a/plugins/GmailNotifier/src/utility.cpp b/plugins/GmailNotifier/src/utility.cpp
index 0cd72e28a6..8e91d5d8ed 100644
--- a/plugins/GmailNotifier/src/utility.cpp
+++ b/plugins/GmailNotifier/src/utility.cpp
@@ -5,8 +5,8 @@ void BuildList(void)
DBVARIANT dbv;
acc_num = 0;
- for (MCONTACT hContact = db_find_first(pluginName); hContact; hContact = db_find_next(hContact, pluginName)) {
- if (!db_get_s(hContact, pluginName, "name", &dbv)) {
+ for (MCONTACT hContact = db_find_first(MODULE_NAME); hContact; hContact = db_find_next(hContact, MODULE_NAME)) {
+ if (!db_get_s(hContact, MODULE_NAME, "name", &dbv)) {
acc_num++;
acc = (Account *)realloc(acc, acc_num * sizeof(Account));
memset(&acc[acc_num-1], 0, sizeof(Account));
@@ -15,7 +15,7 @@ void BuildList(void)
CallService(MS_IGNORE_IGNORE, hContact, IGNOREEVENT_USERONLINE);
db_free(&dbv);
- if (!db_get_s(hContact, pluginName, "Password", &dbv)) {
+ if (!db_get_s(hContact, MODULE_NAME, "Password", &dbv)) {
mir_strcpy(acc[acc_num-1].pass, dbv.pszVal);
db_free(&dbv);
}
@@ -42,7 +42,7 @@ BOOL GetBrowser(char *str)
strKey = strIE;
else if (opt.OpenUsePrg == 0)
strKey = strDefault;
- else if (!db_get_s(NULL, pluginName, "OpenUsePrgPath", &dbv)) {
+ else if (!db_get_s(NULL, MODULE_NAME, "OpenUsePrgPath", &dbv)) {
mir_strcpy(str, dbv.pszVal);
db_free(&dbv);
return FALSE;
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp
index 0e98449539..07049a8ec2 100644
--- a/plugins/HTTPServer/src/GuiElements.cpp
+++ b/plugins/HTTPServer/src/GuiElements.cpp
@@ -1445,7 +1445,8 @@ void ShowPopupWindow(const char * pszName, const char * pszText, COLORREF ColorB
// Developer : KN
/////////////////////////////////////////////////////////////////////
-void InitGuiElements() {
+void InitGuiElements()
+{
INITCOMMONCONTROLSEX stInitCom;
stInitCom.dwSize = sizeof(INITCOMMONCONTROLSEX);
stInitCom.dwICC = ICC_INTERNET_CLASSES;
@@ -1454,60 +1455,34 @@ void InitGuiElements() {
//hMainThread = GetCurrentThread();
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hMainThread, THREAD_SET_CONTEXT, FALSE, 0);
-
sUrlAddress = DBGetString(NULL, MODULE, "UrlAddress", szDefaultUrlAddress);
sPageKeyword = DBGetString(NULL, MODULE, "PageKeyword", szDefaultPageKeyword);
hShareNewFileService = CreateServiceFunction(MS_SHARE_NEW_FILE, nShareNewFile);
- if (! hShareNewFileService) {
- MessageBox(NULL, TranslateT("Failed to CreateServiceFunction MS_SHARE_NEW_FILE"), MSG_BOX_TITEL, MB_OK);
- return;
- }
-
hShowStatisticsViewService = CreateServiceFunction(MS_SHOW_STATISTICS_VIEW, nShowStatisticsView);
- if (! hShowStatisticsViewService) {
- MessageBox(NULL, TranslateT("Failed to CreateServiceFunction MS_SHOW_STATISTICS_VIEW"), MSG_BOX_TITEL, MB_OK);
- return;
- }
- CLISTMENUITEM mi;
- memset(&mi, 0, sizeof(mi));
- mi.pszContactOwner = NULL; //all contacts
- mi.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
+ CLISTMENUITEM mi = { 0 };
+ mi.icolibItem = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
mi.position = -2000019955;
- mi.ptszName = LPGENT("HTTP Share new file");
+ mi.name.t = LPGENT("HTTP Share new file");
mi.pszService = MS_SHARE_NEW_FILE;
-
hShareNewFileMenuItem = Menu_AddContactMenuItem(&mi);
- if (!hShareNewFileMenuItem) {
- MessageBox(NULL, TranslateT("Failed to add contact menu item"), MSG_BOX_TITEL, MB_OK);
- return;
- }
-
if (db_get_b(NULL, MODULE, "AddStatisticsMenuItem", 1) != 0) {
mi.position = 1000085005;
mi.flags = CMIF_TCHAR;
- //mi.hIcon=LoadIcon(hInstance,MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
- mi.pszContactOwner = NULL;
- mi.ptszName = LPGENT("Show HTTP server statistics");
+ mi.name.t = LPGENT("Show HTTP server statistics");
mi.pszService = MS_SHOW_STATISTICS_VIEW;
hShowStatisticsViewMenuItem = Menu_AddMainMenuItem(&mi);
}
-
hEventOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
if (!hEventOptionsInitialize)
MessageBox(NULL, _T("Failed to HookEvent ME_OPT_INITIALISE"), MSG_BOX_TITEL, MB_OK);
bShowPopups = db_get_b(NULL, MODULE, "ShowPopups", bShowPopups) != 0;
- /*
- #ifdef _DEBUG
- nShowStatisticsView(0,0);
- #endif*/
}
-
/////////////////////////////////////////////////////////////////////
// Member Function : UninitGuiElements
// Type : Global
@@ -1521,6 +1496,7 @@ void InitGuiElements() {
// Developer : KN
/////////////////////////////////////////////////////////////////////
-void UnInitGuiElements() {
+void UnInitGuiElements()
+{
CloseHandle(hMainThread);
}
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp
index a885f8fe9f..0363d91c42 100644
--- a/plugins/HTTPServer/src/main.cpp
+++ b/plugins/HTTPServer/src/main.cpp
@@ -923,10 +923,9 @@ extern "C" __declspec(dllexport) int Load()
if (db_get_b(NULL, MODULE, "AddAcceptConMenuItem", 1)) {
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
- mi.pszContactOwner = NULL; //all contacts
- mi.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
+ mi.icolibItem = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
mi.position = 1000085000;
- mi.pszName = LPGENT("Enable HTTP server");
+ mi.name.a = LPGENT("Enable HTTP server");
mi.pszService = MS_HTTP_ACCEPT_CONNECTIONS;
hAcceptConnectionsMenuItem = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp
index 630b8d68ef..02e5bf8837 100644
--- a/plugins/HistoryLinkListPlus/src/linklist.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist.cpp
@@ -60,8 +60,8 @@ extern "C" __declspec(dllexport) int Load(void)
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON));
- mi.ptszName = LPGENT("&Create Linklist");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON));
+ mi.name.t = LPGENT("&Create Linklist");
mi.pszService = "Linklist/MenuCommand";
Menu_AddContactMenuItem(&mi);
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp
index 7c344b2738..077bdc8c1d 100644
--- a/plugins/HistoryStats/src/mu_common.cpp
+++ b/plugins/HistoryStats/src/mu_common.cpp
@@ -16,25 +16,24 @@ namespace mu
{
// TODO: support for unicode-core with unicode-aware CList
CLISTMENUITEM mi = { 0 };
- mi.ptszName = (TCHAR*)pszName;
+ mi.name.t = (TCHAR*)pszName;
mi.flags = flags | CMIF_TCHAR;
mi.position = position;
- mi.hIcon = hIcon;
+ mi.icolibItem = hIcon;
mi.pszService = const_cast<char*>(pszService);
mi.hParentMenu = hRoot;
return Menu_AddMainMenuItem(&mi);
}
- HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const char* pszContactOwner /* = NULL */)
+ HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService)
{
// TODO: support for unicode-core with unicode-aware CList
CLISTMENUITEM mi = { 0 };
- mi.ptszName = (TCHAR*)pszName;
+ mi.name.t = (TCHAR*)pszName;
mi.flags = flags | CMIF_TCHAR;
mi.position = position;
- mi.hIcon = hIcon;
+ mi.icolibItem = hIcon;
mi.pszService = const_cast<char*>(pszService);
- mi.pszContactOwner = const_cast<char*>(pszContactOwner);
return Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/HistoryStats/src/mu_common.h b/plugins/HistoryStats/src/mu_common.h
index 9e1bf12eae..0f760cfcfe 100644
--- a/plugins/HistoryStats/src/mu_common.h
+++ b/plugins/HistoryStats/src/mu_common.h
@@ -14,7 +14,7 @@ namespace mu
namespace clist
{
HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, HGENMENU hRoot = 0);
- HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const char* pszContactOwner = NULL);
+ HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService);
const TCHAR* getContactDisplayName(MCONTACT hContact);
const TCHAR* getStatusModeDescription(int nStatusMode);
}
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp
index b7d5222cd5..78c6b1c537 100644
--- a/plugins/IEHistory/src/IEHistory.cpp
+++ b/plugins/IEHistory/src/IEHistory.cpp
@@ -75,16 +75,17 @@ extern "C" int __declspec(dllexport) Load(void)
InitServices();
/// menu items
- CLISTMENUITEM menuItem = { 0 };
- menuItem.ptszName = LPGENT("View &history");
- menuItem.flags = CMIF_TCHAR;
- menuItem.position = 1000090000;
- menuItem.hIcon = hIcon;
- menuItem.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
- Menu_AddContactMenuItem(&menuItem);
+ CLISTMENUITEM mi = { 0 };
+ mi.name.t = LPGENT("View &history");
+ mi.flags = CMIF_TCHAR;
+ mi.position = 1000090000;
+ mi.icolibItem = hIcon;
+ mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
+ Menu_AddContactMenuItem(&mi);
+
/// @todo (White-Tiger#1#08/19/14): fully implement System History someday^^
- menuItem.ptszName = LPGENT("&System History");
- Menu_AddMainMenuItem(&menuItem);
+ mi.name.t = LPGENT("&System History");
+ Menu_AddMainMenuItem(&mi);
HookEvents();
return 0;
diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp
index 1925a1bcf5..077367fa98 100644
--- a/plugins/Import/src/main.cpp
+++ b/plugins/Import/src/main.cpp
@@ -116,7 +116,7 @@ extern "C" __declspec(dllexport) int Load(void)
// menu item
CLISTMENUITEM mi = { 0 };
mi.icolibItem = GetIconHandle(IDI_IMPORT);
- mi.pszName = LPGEN("&Import...");
+ mi.name.a = LPGEN("&Import...");
mi.position = 500050000;
mi.pszService = IMPORT_SERVICE;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index c37f1de785..76de84c315 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -197,7 +197,7 @@ void RebuildMenu()
mi.hParentMenu = hMainMenuGroup;
mi.position = 500080000 + i;
mi.pszService = MS_LISTENINGTO_MAINMENU;
- mi.ptszName = text;
+ mi.name.t = text;
mi.flags = CMIF_TCHAR
| (ListeningToEnabled(info->proto, TRUE) ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
@@ -295,7 +295,7 @@ int ModulesLoaded(WPARAM, LPARAM)
// Add main menu item
CLISTMENUITEM mi = { 0 };
mi.position = 500080000;
- mi.ptszName = LPGENT("Listening to");
+ mi.name.t = LPGENT("Listening to");
mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[0].hIcolib;
hMainMenuGroup = Menu_AddMainMenuItem(&mi);
@@ -304,10 +304,10 @@ int ModulesLoaded(WPARAM, LPARAM)
// mi.popupPosition = 500080000; !!!!!!!!!!!!!!!
mi.position = 0;
mi.pszService = MS_LISTENINGTO_MAINMENU;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
// Add all protos
- mi.ptszName = LPGENT("Send to all protocols");
+ mi.name.t = LPGENT("Send to all protocols");
mi.flags = CMIF_TCHAR
| (ListeningToEnabled(NULL, true) ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp
index 6ae5ed72e9..9ecaec708c 100644
--- a/plugins/LotusNotify/src/LotusNotify.cpp
+++ b/plugins/LotusNotify/src/LotusNotify.cpp
@@ -1730,8 +1730,8 @@ extern "C" int __declspec(dllexport) Load(void)
CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF; //on top menu position
mi.flags = CMIF_TCHAR;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON1));
- mi.ptszName = LPGENT("&Check Lotus");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON1));
+ mi.name.t = LPGENT("&Check Lotus");
mi.pszService = "LotusNotify/MenuCommand"; //service name thet listning for menu call
hMenuHandle = Menu_AddMainMenuItem(&mi); //create menu pos.
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 55a3e2782c..bf686a5028 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -738,8 +738,8 @@ static HGENMENU AddSubmenuItem(HGENMENU hRoot, TCHAR* name, HICON icon, DWORD fl
CLISTMENUITEM mi = { 0 };
mi.hParentMenu = hRoot;
mi.position = pos;
- mi.ptszName = name;
- mi.hIcon = icon;
+ mi.name.t = name;
+ mi.icolibItem = icon;
mi.flags = CMIF_UNICODE | flag;
mi.pszService = service;
@@ -964,24 +964,24 @@ static int PluginInit(WPARAM, LPARAM)
mi.flags = CMIF_UNICODE;
mi.position = 120000;
- mi.ptszName = LPGENT("Always visible");
+ mi.name.t = LPGENT("Always visible");
mi.pszService = MS_SETVIS;
hmenuVis = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Never visible");
+ mi.name.t = LPGENT("Never visible");
mi.pszService = MS_SETINVIS;
hmenuOff = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Hide from list");
+ mi.name.t = LPGENT("Hide from list");
mi.pszService = MS_HIDE;
hmenuHide = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Ignore");
+ mi.name.t = LPGENT("Ignore");
mi.pszService = 0;
- mi.hIcon = IcoLib_GetIcon("miex_ignore");
+ mi.icolibItem = IcoLib_GetIcon("miex_ignore");
hmenuIgnore = Menu_AddContactMenuItem(&mi);
hIgnoreItem[0] = AddSubmenuItem(hmenuIgnore, ii[0].name, Skin_LoadIcon(ii[0].icon), 0, MS_IGNORE, pos, ii[0].type);
@@ -996,9 +996,9 @@ static int PluginInit(WPARAM, LPARAM)
AddSubmenuItem(hmenuIgnore, LPGENT("Open ignore settings"), IcoLib_GetIcon("miex_ignore"), 0, "Opt/OpenOptions", pos, (int)&ood);
mi.position++;
- mi.ptszName = LPGENT("Copy to Account");
+ mi.name.t = LPGENT("Copy to Account");
mi.pszService = MS_PROTO;
- mi.hIcon = IcoLib_GetIcon("miex_protocol");
+ mi.icolibItem = IcoLib_GetIcon("miex_protocol");
hmenuProto = Menu_AddContactMenuItem(&mi);
EnumProtoSubmenu(0, 0);
@@ -1006,41 +1006,41 @@ static int PluginInit(WPARAM, LPARAM)
mi.flags = CMIF_UNICODE;
mi.position++;
- mi.ptszName = LPGENT("Send 'You were added'");
+ mi.name.t = LPGENT("Send 'You were added'");
mi.pszService = MS_ADDED;
- mi.hIcon = Skin_LoadIcon(SKINICON_AUTH_ADD);
+ mi.icolibItem = Skin_LoadIcon(SKINICON_AUTH_ADD);
hmenuAdded = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Request authorization");
+ mi.name.t = LPGENT("Request authorization");
mi.pszService = MS_AUTHREQ;
- mi.hIcon = Skin_LoadIcon(SKINICON_AUTH_REQUEST);
+ mi.icolibItem = Skin_LoadIcon(SKINICON_AUTH_REQUEST);
hmenuAuthReq = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Copy ID");
+ mi.name.t = LPGENT("Copy ID");
mi.pszService = MS_COPYID;
hmenuCopyID = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Browse Received Files");
+ mi.name.t = LPGENT("Browse Received Files");
mi.pszService = MS_RECVFILES;
- mi.hIcon = IcoLib_GetIcon("miex_recfiles");
+ mi.icolibItem = IcoLib_GetIcon("miex_recfiles");
hmenuRecvFiles = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Copy Status Message");
+ mi.name.t = LPGENT("Copy Status Message");
mi.pszService = MS_STATUSMSG;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
hmenuStatusMsg = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Copy IP");
+ mi.name.t = LPGENT("Copy IP");
mi.pszService = MS_COPYIP;
hmenuCopyIP = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.ptszName = LPGENT("Copy MirVer");
+ mi.name.t = LPGENT("Copy MirVer");
mi.pszService = MS_COPYMIRVER;
hmenuCopyMirVer = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp
index d40922b0f6..184b563265 100644
--- a/plugins/MirLua/src/m_genmenu.cpp
+++ b/plugins/MirLua/src/m_genmenu.cpp
@@ -15,7 +15,7 @@ static CLISTMENUITEM* MakeMenuItem(lua_State *L)
lua_pushstring(L, "Name");
lua_gettable(L, -2);
- pmi->ptszName = mir_utf8decodeT((char*)luaL_checkstring(L, -1));
+ pmi->name.t = mir_utf8decodeT((char*)luaL_checkstring(L, -1));
lua_pop(L, 1);
lua_pushstring(L, "Position");
@@ -101,7 +101,7 @@ static int lua_ModifyMenuItem(lua_State *L)
mir_ptr<CLISTMENUITEM> pmi(MakeMenuItem(L));
- INT_PTR res = ::Menu_ModifyItem(hMenuItem, pmi->ptszName, pmi->hIcon, pmi->flags);
+ INT_PTR res = ::Menu_ModifyItem(hMenuItem, pmi->name.t, pmi->icolibItem, pmi->flags);
lua_pushinteger(L, res);
return 1;
}
diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp
index a7657a247c..2bd606c90e 100644
--- a/plugins/MirOTR/src/svcs_menu.cpp
+++ b/plugins/MirOTR/src/svcs_menu.cpp
@@ -162,13 +162,13 @@ void InitMenu()
mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
mi.position = -400000;
- mi.ptszName = _T(LANG_STOP_OTR);
+ mi.name.t = _T(LANG_STOP_OTR);
mi.pszService = MS_OTR_MENUSTOP;
mi.icolibItem = IcoLib_GetIconHandle(ICON_PRIVATE);
hStopItem = Menu_AddContactMenuItem(&mi);
- mi.ptszName = _T(LANG_START_OTR);
+ mi.name.t = _T(LANG_START_OTR);
mi.pszService = MS_OTR_MENUSTART;
mi.icolibItem = IcoLib_GetIconHandle(ICON_NOT_PRIVATE);
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp
index 7a0b2e571d..e8ccc6572c 100755
--- a/plugins/Msg_Export/src/main.cpp
+++ b/plugins/Msg_Export/src/main.cpp
@@ -115,9 +115,9 @@ int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/)
if (!bReplaceHistory)
{
CLISTMENUITEM mi = { 0 };
- mi.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_EXPORT_MESSAGE));
+ mi.icolibItem = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_EXPORT_MESSAGE));
mi.position = 1000090100;
- mi.pszName = LPGEN("Open E&xported History");
+ mi.name.a = LPGEN("Open E&xported History");
mi.pszService = MS_SHOW_EXPORT_HISTORY;
hOpenHistoryMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp
index 3345092557..0f507c95fd 100644
--- a/plugins/MyDetails/src/frame.cpp
+++ b/plugins/MyDetails/src/frame.cpp
@@ -331,8 +331,8 @@ int CreateFrame()
mi.flags = CMIF_TCHAR;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("My details"), 500010000);
mi.position = 1;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_USERDETAILS);
- mi.ptszName = LPGENT("Show my details");
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_USERDETAILS);
+ mi.name.t = LPGENT("Show my details");
mi.pszService = MODULE_NAME"/ShowHideMyDetails";
hMenuShowHideFrame = Menu_AddMainMenuItem(&mi);
Menu_ConfigureItem(hMenuShowHideFrame, MCI_OPT_EXECPARAM, -0x7FFFFFFF);
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp
index 974b57a644..0182ea778f 100644
--- a/plugins/MyDetails/src/mydetails.cpp
+++ b/plugins/MyDetails/src/mydetails.cpp
@@ -91,7 +91,7 @@ static int MainInit(WPARAM, LPARAM)
mi.position = 500050000;
mi.flags = CMIF_TCHAR;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
- mi.ptszName = LPGENT("My details");
+ mi.name.t = LPGENT("My details");
HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
mi.flags = CMIF_TCHAR;
@@ -100,27 +100,27 @@ static int MainInit(WPARAM, LPARAM)
if (protocols->CanSetAvatars()) {
mi.position = 100001;
- mi.ptszName = LPGENT("Set my avatar...");
+ mi.name.t = LPGENT("Set my avatar...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYAVATARUI, Menu_SetMyAvatarUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYAVATARUI;
Menu_AddMainMenuItem(&mi);
}
mi.position = 100002;
- mi.ptszName = LPGENT("Set my nickname...");
+ mi.name.t = LPGENT("Set my nickname...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYNICKNAMEUI, Menu_SetMyNicknameUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYNICKNAMEUI;
Menu_AddMainMenuItem(&mi);
mi.position = 100003;
- mi.ptszName = LPGENT("Set my status message...");
+ mi.name.t = LPGENT("Set my status message...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYSTATUSMESSAGEUI, Menu_SetMyStatusMessageUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYSTATUSMESSAGEUI;
Menu_AddMainMenuItem(&mi);
// Set protocols to show frame
mi.position = 200001;
- mi.ptszName = LPGENT("Show next account");
+ mi.name.t = LPGENT("Show next account");
mi.pszService = MS_MYDETAILS_SHOWNEXTPROTOCOL;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp
index 72c63abb58..7c22280e2d 100644
--- a/plugins/NewAwaySysMod/src/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/src/AwaySys.cpp
@@ -615,31 +615,31 @@ int MirandaLoaded(WPARAM, LPARAM)
mi.position = 1000020000;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
mi.icolibItem = iconList[SendOnEvent ? 1 : 0].hIcolib;
- mi.ptszName = SendOnEvent ? DISABLE_SOE_COMMAND : ENABLE_SOE_COMMAND;
+ mi.name.t = SendOnEvent ? DISABLE_SOE_COMMAND : ENABLE_SOE_COMMAND;
mi.pszService = MS_AWAYSYS_AUTOREPLY_TOGGLE;
g_hToggleSOEMenuItem = Menu_AddMainMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
mi.position = -2000005000;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE | CMIF_HIDDEN;
- mi.ptszName = LPGENT("Read status message"); // never seen...
+ mi.name.t = LPGENT("Read status message"); // never seen...
mi.pszService = MS_AWAYMSG_SHOWAWAYMSG;
g_hReadStatMenuItem = Menu_AddContactMenuItem(&mi);
if (g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_USEMENUITEM)) {
memset(&mi, 0, sizeof(mi));
mi.flags = CMIF_TCHAR | CMIF_HIDDEN;
- mi.ptszName = LPGENT("Set status message"); // will never be shown
+ mi.name.t = LPGENT("Set status message"); // will never be shown
mi.position = 1000020000;
- mi.hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_MSGICON));
+ mi.icolibItem = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_MSGICON));
mi.pszService = MS_AWAYSYS_SETCONTACTSTATMSG;
g_hContactMenuItem = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
mi.flags = CMIF_TCHAR;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.position = 1000020000;
- mi.ptszName = LPGENT("Autoreply");
+ mi.name.t = LPGENT("Autoreply");
g_hToggleSOEContactMenuItem = Menu_AddContactMenuItem(&mi);
mi.flags = CMIF_TCHAR;
@@ -647,17 +647,17 @@ int MirandaLoaded(WPARAM, LPARAM)
mi.position = 1000020000;
mi.icolibItem = iconList[1].hIcolib;
- mi.ptszName = LPGENT("On");
+ mi.name.t = LPGENT("On");
mi.pszService = MS_AWAYSYS_AUTOREPLY_ON;
g_hAutoreplyOnContactMenuItem = Menu_AddContactMenuItem(&mi);
mi.icolibItem = iconList[0].hIcolib;
- mi.ptszName = LPGENT("Off");
+ mi.name.t = LPGENT("Off");
mi.pszService = MS_AWAYSYS_AUTOREPLY_OFF;
g_hAutoreplyOffContactMenuItem = Menu_AddContactMenuItem(&mi);
- mi.hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_DOT));
- mi.ptszName = LPGENT("Use the default setting");
+ mi.icolibItem = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_DOT));
+ mi.name.t = LPGENT("Use the default setting");
mi.pszService = MS_AWAYSYS_AUTOREPLY_USEDEFAULT;
g_hAutoreplyUseDefaultContactMenuItem = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/NewEventNotify/src/menuitem.cpp b/plugins/NewEventNotify/src/menuitem.cpp
index 34e2fa4b4b..26cd6248b1 100644
--- a/plugins/NewEventNotify/src/menuitem.cpp
+++ b/plugins/NewEventNotify/src/menuitem.cpp
@@ -53,7 +53,7 @@ int MenuitemInit(BOOL bStatus)
CLISTMENUITEM mi = { 0 };
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
mi.position = 1;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ENABLED));
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ENABLED));
mi.pszService = MS_NEN_MENUNOTIFY;
mi.flags = 0;
hMenuitemNotify = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index 3a97c32aae..d4bfdbefae 100644
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -180,40 +180,40 @@ extern "C" int __declspec(dllexport) Load()
CLISTMENUITEM mi = { 0 };
mi.position=-0x7FFFFFFF;
mi.flags=CMIF_TCHAR;
- mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Load GPG public key");
+ mi.icolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t=LPGENT("Load GPG public key");
mi.pszService="/LoadPubKey";
hLoadPubKey = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
mi.position=-0x7FFFFFFe;
mi.flags=CMIF_TCHAR;
- mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Toggle GPG encryption");
+ mi.icolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t=LPGENT("Toggle GPG encryption");
mi.pszService="/ToggleEncryption";
hToggleEncryption = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
mi.position=-0x7FFFFFFd;
mi.flags=CMIF_TCHAR;
- mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Send public key");
+ mi.icolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t=LPGENT("Send public key");
mi.pszService="/SendKey";
hSendKey = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
mi.position=-0x7FFFFFFe;
mi.flags=CMIF_TCHAR;
- mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Export GPG Public keys");
+ mi.icolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t=LPGENT("Export GPG Public keys");
mi.pszService="/ExportGPGKeys";
hExportGpgKeys = Menu_AddMainMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
mi.position=-0x7FFFFFFF;
mi.flags=CMIF_TCHAR;
- mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName=LPGENT("Import GPG Public keys");
+ mi.icolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t=LPGENT("Import GPG Public keys");
mi.pszService="/ImportGPGKeys";
hImportGpgKeys = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/NewsAggregator/Src/Menus.cpp b/plugins/NewsAggregator/Src/Menus.cpp
index 1748792c4e..97a8d72adc 100644
--- a/plugins/NewsAggregator/Src/Menus.cpp
+++ b/plugins/NewsAggregator/Src/Menus.cpp
@@ -24,52 +24,52 @@ HGENMENU hService2[7];
void InitMenu()
{
CLISTMENUITEM mi = { 0 };
- mi.pszContactOwner = MODULE;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("News Aggregator"), 500099000);
mi.position = 10100001;
if (db_get_b(NULL, MODULE, "AutoUpdate", 1))
- mi.ptszName = LPGENT("Auto Update Enabled");
+ mi.name.t = LPGENT("Auto Update Enabled");
else
- mi.ptszName = LPGENT("Auto Update Disabled");
+ mi.name.t = LPGENT("Auto Update Disabled");
mi.icolibItem = GetIconHandle("main");
mi.pszService = MS_NEWSAGGREGATOR_ENABLED;
hService2[0] = Menu_AddMainMenuItem(&mi);
mi.position = 20100001;
- mi.ptszName = LPGENT("Check All Feeds");
+ mi.name.t = LPGENT("Check All Feeds");
mi.pszService = MS_NEWSAGGREGATOR_CHECKALLFEEDS;
hService2[1] = Menu_AddMainMenuItem(&mi);
mi.position = 20100002;
mi.icolibItem = GetIconHandle("addfeed");
- mi.ptszName = LPGENT("Add Feed");
+ mi.name.t = LPGENT("Add Feed");
mi.pszService = MS_NEWSAGGREGATOR_ADDFEED;
hService2[2] = Menu_AddMainMenuItem(&mi);
mi.position = 20100003;
mi.icolibItem = GetIconHandle("importfeeds");
- mi.ptszName = LPGENT("Import Feeds");
+ mi.name.t = LPGENT("Import Feeds");
mi.pszService = MS_NEWSAGGREGATOR_IMPORTFEEDS;
hService2[3] = Menu_AddMainMenuItem(&mi);
mi.position = 20100004;
mi.icolibItem = GetIconHandle("exportfeeds");
- mi.ptszName = LPGENT("Export Feeds");
+ mi.name.t = LPGENT("Export Feeds");
mi.pszService = MS_NEWSAGGREGATOR_EXPORTFEEDS;
hService2[4] = Menu_AddMainMenuItem(&mi);
// adding contact menu items
+ mi.hParentMenu = NULL;
mi.position = -0x7FFFFFFA;
mi.icolibItem = GetIconHandle("checkfeed");
- mi.ptszName = LPGENT("Check feed");
+ mi.name.t = LPGENT("Check feed");
mi.pszService = MS_NEWSAGGREGATOR_CHECKFEED;
- hService2[5] = Menu_AddContactMenuItem(&mi);
+ hService2[5] = Menu_AddContactMenuItem(&mi, MODULE);
- mi.ptszName = LPGENT("Change feed");
+ mi.name.t = LPGENT("Change feed");
mi.pszService = MS_NEWSAGGREGATOR_CHANGEFEED;
- hService2[6] = Menu_AddContactMenuItem(&mi);
+ hService2[6] = Menu_AddContactMenuItem(&mi, MODULE);
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/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index 73a1d70c2a..9fdbb1dba3 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -249,15 +249,15 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
mi.flags = CMIF_TCHAR;
mi.position = -300010;
- mi.ptszName = LPGENT("Disable History");
+ mi.name.t = LPGENT("Disable History");
mi.pszService = MS_NOHISTORY_TOGGLE;
- mi.hIcon = hIconRemove;
+ mi.icolibItem = hIconRemove;
hMenuToggle = Menu_AddContactMenuItem(&mi);
mi.position = -300005;
- mi.ptszName = LPGENT("Clear History");
+ mi.name.t = LPGENT("Clear History");
mi.pszService = MS_NOHISTORY_CLEAR;
- mi.hIcon = hIconClear;
+ mi.icolibItem = hIconClear;
hMenuClear = Menu_AddContactMenuItem(&mi);
// add icon to srmm status icons
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp
index 4cdc4b3504..d3fb864733 100644
--- a/plugins/Non-IM Contact/src/main.cpp
+++ b/plugins/Non-IM Contact/src/main.cpp
@@ -144,38 +144,38 @@ extern "C" __declspec(dllexport) int Load()
CLISTMENUITEM mi = { 0 };
mi.position = 600090000;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("&Non-IM Contact"), 600090000);
- mi.pszName = LPGEN("&Add Non-IM Contact");
+ mi.name.a = LPGEN("&Add Non-IM Contact");
mi.pszService = "AddLCcontact";
mi.icolibItem = icoList[0].hIcolib;
Menu_AddMainMenuItem(&mi);
mi.position = 600090001;
- mi.pszName = LPGEN("&View/Edit Files");
+ mi.name.a = LPGEN("&View/Edit Files");
mi.pszService = "LoadFilesDlg";
Menu_AddMainMenuItem(&mi);
if (db_get_b(NULL, MODNAME, "Beta", 0)) {
mi.position = 600090002;
- mi.pszName = LPGEN("&Export all Non-IM Contacts");
+ mi.name.a = LPGEN("&Export all Non-IM Contacts");
mi.pszService = "ExportLCcontacts";
Menu_AddMainMenuItem(&mi);
mi.position = 600090003;
- mi.pszName = LPGEN("&Import Non-IM Contacts");
+ mi.name.a = LPGEN("&Import Non-IM Contacts");
mi.pszService = "ImportLCcontacts";
Menu_AddMainMenuItem(&mi);
}
mi.position = 600090000;
- mi.pszName = LPGEN("&String Maker");
+ mi.name.a = LPGEN("&String Maker");
mi.pszService = "TestStringReplaceLine";
Menu_AddMainMenuItem(&mi);
+ mi.hParentMenu = NULL;
mi.position = -2000080000;
- mi.pszContactOwner = MODNAME;
- mi.pszName = LPGEN("E&dit Contact Settings");
+ mi.name.a = LPGEN("E&dit Contact Settings");
mi.pszService = "EditLCcontact";
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, MODNAME);
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp
index b3654f4e39..7a0489fc49 100644
--- a/plugins/NotesAndReminders/src/main.cpp
+++ b/plugins/NotesAndReminders/src/main.cpp
@@ -189,56 +189,56 @@ int OnModulesLoaded(WPARAM wparam, LPARAM lparam)
mi.position = 1600000000;
mi.icolibItem = iconList[2].hIcolib;
- mi.ptszName = LPGENT("New &Note");
+ mi.name.t = LPGENT("New &Note");
mi.pszService = MODULENAME"/MenuCommandAddNew";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600000001;
mi.icolibItem = iconList[0].hIcolib;
- mi.ptszName = LPGENT("New &Reminder");
+ mi.name.t = LPGENT("New &Reminder");
mi.pszService = MODULENAME"/MenuCommandNewReminder";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600100000;
mi.icolibItem = iconList[3].hIcolib;
- mi.ptszName = LPGENT("&Show / Hide Notes");
+ mi.name.t = LPGENT("&Show / Hide Notes");
mi.pszService = MODULENAME"/MenuCommandShowHide";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600100001;
mi.icolibItem = iconList[13].hIcolib;
- mi.ptszName = LPGENT("Vie&w Notes");
+ mi.name.t = LPGENT("Vie&w Notes");
mi.pszService = MODULENAME"/MenuCommandViewNotes";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600100002;
mi.icolibItem = iconList[1].hIcolib;
- mi.ptszName = LPGENT("&Delete All Notes");
+ mi.name.t = LPGENT("&Delete All Notes");
mi.pszService = MODULENAME"/MenuCommandDeleteAll";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600100003;
mi.icolibItem = iconList[11].hIcolib;
- mi.ptszName = LPGENT("&Bring All to Front");
+ mi.name.t = LPGENT("&Bring All to Front");
mi.pszService = MODULENAME"/MenuCommandBringAllFront";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600200000;
mi.icolibItem = iconList[6].hIcolib;
- mi.ptszName = LPGENT("&View Reminders");
+ mi.name.t = LPGENT("&View Reminders");
mi.pszService = MODULENAME"/MenuCommandViewReminders";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
mi.position = 1600200001;
mi.icolibItem = iconList[5].hIcolib;
- mi.ptszName = LPGENT("D&elete All Reminders");
+ mi.name.t = LPGENT("D&elete All Reminders");
mi.pszService = MODULENAME"/MenuCommandDeleteReminders";
if (g_AddContListMI) Menu_AddContactMenuItem(&mi);
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index 16aa865de1..0757e7a389 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -341,7 +341,7 @@ extern "C" int __declspec(dllexport) Load(void)
mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
mi.position = -500050004;
mi.icolibItem = iconList[0].hIcolib;
- mi.ptszName = LPGENT("Send &Nudge");
+ mi.name.t = LPGENT("Send &Nudge");
mi.pszService = MS_NUDGE_SEND;
g_hContactMenu = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp
index 7d7be76a58..f25d17ffad 100644
--- a/plugins/OpenFolder/src/openFolder.cpp
+++ b/plugins/OpenFolder/src/openFolder.cpp
@@ -101,7 +101,7 @@ extern "C" int __declspec(dllexport) Load()
mi.position = 0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
mi.icolibItem = icon.hIcolib;
- mi.ptszName = LPGENT("Open Folder");
+ mi.name.t = LPGENT("Open Folder");
mi.pszService = MS_OPENFOLDER_OPEN;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp
index c84da5c676..80f6e60718 100644
--- a/plugins/PackUpdater/Src/PackUpdater.cpp
+++ b/plugins/PackUpdater/Src/PackUpdater.cpp
@@ -73,8 +73,8 @@ extern "C" __declspec(dllexport) int Load(void)
CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = IcoLib_GetIcon("check_update");
- mi.ptszName = LPGENT("Check for pack updates");
+ mi.icolibItem = IcoLib_GetIcon("check_update");
+ mi.name.t = LPGENT("Check for pack updates");
mi.pszService = MODNAME"/CheckUpdates";
Menu_AddMainMenuItem(&mi);
// Add empty updates folder menu item
@@ -82,8 +82,8 @@ extern "C" __declspec(dllexport) int Load(void)
memset(&mi, 0, sizeof(mi));
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = IcoLib_GetIcon("empty_folder");
- mi.ptszName = LPGENT("Clear pack updates folder");
+ mi.icolibItem = IcoLib_GetIcon("empty_folder");
+ mi.name.t = LPGENT("Clear pack updates folder");
mi.pszService = MODNAME"/EmptyFolder";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index bd251a3ec4..6ba4cf795c 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -295,7 +295,7 @@ void InitMenuItems()
mi.flags = CMIF_TCHAR;
mi.icolibItem = icon.hIcolib;
mi.position = 3000090005;
- mi.ptszName = LPGENT("Paste It");
+ mi.name.t = LPGENT("Paste It");
hContactMenu = Menu_AddContactMenuItem(&mi);
@@ -303,13 +303,13 @@ void InitMenuItems()
mi.flags = CMIF_TCHAR;
mi.pszService = MS_PASTEIT_CONTACTMENU;
mi.hParentMenu = hContactMenu;
- mi.ptszName = LPGENT("Paste from clipboard");
+ mi.name.t = LPGENT("Paste from clipboard");
Menu_ConfigureItem(Menu_AddContactMenuItem(&mi), MCI_OPT_EXECPARAM, FROM_CLIPBOARD);
- mi.ptszName = LPGENT("Paste from file");
+ mi.name.t = LPGENT("Paste from file");
Menu_ConfigureItem(Menu_AddContactMenuItem(&mi), MCI_OPT_EXECPARAM, FROM_FILE);
- mi.ptszName = LPGENT("Default web page");
+ mi.name.t = LPGENT("Default web page");
HGENMENU hDefWebMenu = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hDefWebMenu, MCI_OPT_EXECPARAM, DEF_PAGES_START - 1);
@@ -321,7 +321,7 @@ void InitMenuItems()
mi2.flags = CMIF_TCHAR;
if (Options::instance->defWeb == i)
mi2.flags |= CMIF_CHECKED;
- mi2.ptszName = pasteToWebs[i]->GetName();
+ mi2.name.t = pasteToWebs[i]->GetName();
hWebPageMenus[i] = Menu_AddContactMenuItem(&mi2);
Menu_ConfigureItem(hWebPageMenus[i], MCI_OPT_EXECPARAM, mi2.position = DEF_PAGES_START + i);
}
diff --git a/plugins/Ping/src/menu.cpp b/plugins/Ping/src/menu.cpp
index 263edf9656..4906dceeb4 100644
--- a/plugins/Ping/src/menu.cpp
+++ b/plugins/Ping/src/menu.cpp
@@ -11,14 +11,14 @@ void InitMenus()
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Ping"), 500099900);
mi.position = 2000060000;
- mi.hIcon = hIconResponding;
- mi.ptszName = LPGENT("Enable all pings");
+ mi.icolibItem = hIconResponding;
+ mi.name.t = LPGENT("Enable all pings");
mi.pszService = PLUG "/EnableAll";
Menu_AddMainMenuItem(&mi);
mi.position = 2000060001;
- mi.hIcon = hIconDisabled;
- mi.ptszName = LPGENT("Disable all pings");
+ mi.icolibItem = hIconDisabled;
+ mi.name.t = LPGENT("Disable all pings");
mi.pszService = PLUG "/DisableAll";
Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp
index a8ec7c89e1..b4cd9b967f 100644
--- a/plugins/Ping/src/pingthread.cpp
+++ b/plugins/Ping/src/pingthread.cpp
@@ -995,7 +995,7 @@ void InitList()
mi.flags = CMIF_TCHAR;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Ping"), 1000200001);
mi.position = 3000320001;
- mi.ptszName = LPGENT("Show/Hide &Ping Window");
+ mi.name.t = LPGENT("Show/Hide &Ping Window");
mi.pszService = PLUG "/ShowWindow";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp
index 9aceb57cb0..b482a634a6 100644
--- a/plugins/PluginUpdater/src/PluginUpdater.cpp
+++ b/plugins/PluginUpdater/src/PluginUpdater.cpp
@@ -91,7 +91,7 @@ extern "C" __declspec(dllexport) int Load(void)
#else
mi.icolibItem = IcoLib_GetIconHandle("check_update");
#endif
- mi.pszName = LPGEN("Check for updates");
+ mi.name.a = LPGEN("Check for updates");
mi.pszService = MS_PU_CHECKUPDATES;
Menu_AddMainMenuItem(&mi);
@@ -100,7 +100,7 @@ extern "C" __declspec(dllexport) int Load(void)
mi.position++;
mi.icolibItem = iconList[2].hIcolib;
- mi.pszName = LPGEN("Available components list");
+ mi.name.a = LPGEN("Available components list");
mi.pszService = MS_PU_SHOWLIST;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index ba6a9d21fc..0a2619e581 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -185,23 +185,23 @@ void InitMenuItems(void)
// Build main menu
mi.position = -1000000000 /*1000001*/;
- mi.ptszName = LPGENT(MODULNAME_PLU);
- mi.hIcon = IcoLib_GetIcon(PopupOptions.ModuleIsEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0);
+ mi.name.t = LPGENT(MODULNAME_PLU);
+ mi.icolibItem = IcoLib_GetIcon(PopupOptions.ModuleIsEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0);
hMenuRoot = Menu_AddMainMenuItem(&mi);
// Add item to main menu
mi.hParentMenu = (HGENMENU)hMenuRoot;
CreateServiceFunction(MENUCOMMAND_SVC, svcEnableDisableMenuCommand);
- mi.ptszName = PopupOptions.ModuleIsEnabled ? LPGENT("Disable Popups") : LPGENT("Enable Popups");
+ mi.name.t = PopupOptions.ModuleIsEnabled ? LPGENT("Disable Popups") : LPGENT("Enable Popups");
mi.pszService = MENUCOMMAND_SVC;
hMenuItem = Menu_AddMainMenuItem(&mi);
// Popup History
CreateServiceFunction(MENUCOMMAND_HISTORY, svcShowHistory);
mi.position = 1000000000;
- mi.ptszName = LPGENT("Popup History");
- mi.hIcon = IcoLib_GetIcon(ICO_HISTORY, 0);
+ mi.name.t = LPGENT("Popup History");
+ mi.icolibItem = IcoLib_GetIcon(ICO_HISTORY, 0);
mi.pszService = MENUCOMMAND_HISTORY;
hMenuItemHistory = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp
index 6679d13b15..50e0e8ad20 100644
--- a/plugins/ProfileManager/src/pmanagerEx.cpp
+++ b/plugins/ProfileManager/src/pmanagerEx.cpp
@@ -98,7 +98,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), -500200000);
for (int i = 0; i < _countof(iconList); i++) {
- mi.pszName = iconList[i].szDescr;
+ mi.name.a = iconList[i].szDescr;
mi.pszService = iconList[i].szName;
mi.icolibItem = iconList[i].hIcolib;
if (i == 3)
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 9f52e186bd..314ddb1740 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -187,7 +187,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
CLISTMENUITEM mi = { 0 };
mi.position = 500100001;
mi.flags = CMIF_TCHAR;
- mi.ptszName = LPGENT("Quick Contacts...");
+ mi.name.t = LPGENT("Quick Contacts...");
mi.pszService = MS_QC_SHOW_DIALOG;
Menu_AddMainMenuItem(&mi);
return 0;
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp
index 9dcc4a8618..0fa62f0270 100644
--- a/plugins/Quotes/src/Forex.cpp
+++ b/plugins/Quotes/src/Forex.cpp
@@ -87,7 +87,7 @@ namespace
mi.flags = CMIF_TCHAR;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Quotes"), 0, Quotes_GetIconHandle(IDI_ICON_MAIN));
- mi.ptszName = LPGENT("Enable/Disable Auto Update");
+ mi.name.t = LPGENT("Enable/Disable Auto Update");
mi.position = 10100001;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
mi.pszService = g_pszAutoUpdateCmd;
@@ -95,28 +95,28 @@ namespace
CreateServiceFunction(mi.pszService, QuotesMenu_EnableDisable);
UpdateMenu(g_bAutoUpdate);
- mi.ptszName = LPGENT("Refresh All Quotes\\Rates");
+ mi.name.t = LPGENT("Refresh All Quotes\\Rates");
mi.position = 20100001;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
mi.pszService = "Quotes/RefreshAll";
Menu_AddMainMenuItem(&mi);
CreateServiceFunction(mi.pszService, QuotesMenu_RefreshAll);
- mi.ptszName = LPGENT("Currency Converter...");
+ mi.name.t = LPGENT("Currency Converter...");
mi.position = 20100002;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_CURRENCY_CONVERTER);
mi.pszService = g_pszCurrencyConverter;
Menu_AddMainMenuItem(&mi);
CreateServiceFunction(mi.pszService, QuotesMenu_CurrencyConverter);
- mi.ptszName = LPGENT("Export All Quotes");
+ mi.name.t = LPGENT("Export All Quotes");
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_EXPORT);
mi.pszService = "Quotes/ExportAll";
mi.position = 20100003;
Menu_AddMainMenuItem(&mi);
CreateServiceFunction(mi.pszService, QuotesMenu_ExportAll);
- mi.ptszName = LPGENT("Import All Quotes");
+ mi.name.t = LPGENT("Import All Quotes");
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_IMPORT);
mi.pszService = "Quotes/ImportAll";
mi.position = 20100004;
@@ -132,14 +132,14 @@ namespace
else
mi.hParentMenu = NULL;
- mi.ptszName = LPGENT("Refresh");
+ mi.name.t = LPGENT("Refresh");
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_REFRESH);
mi.pszService = "Quotes/RefreshContact";
g_hMenuRefresh = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(g_hMenuRefresh, MCI_OPT_EXECPARAM, INT_PTR(0));
CreateServiceFunction(mi.pszService, QuotesMenu_RefreshContact);
- mi.ptszName = LPGENT("Open Log File...");
+ mi.name.t = LPGENT("Open Log File...");
mi.icolibItem = NULL;
mi.pszService = "Quotes/OpenLogFile";
g_hMenuOpenLogFile = Menu_AddContactMenuItem(&mi);
@@ -147,7 +147,7 @@ namespace
CreateServiceFunction(mi.pszService, QuotesMenu_OpenLogFile);
#ifdef CHART_IMPLEMENT
- mi.ptszName = LPGENT("Chart...");
+ mi.name.t = LPGENT("Chart...");
mi.popupPosition = 2;
mi.icolibItem = NULL;
mi.pszService = "Quotes/Chart";
@@ -155,7 +155,7 @@ namespace
CreateServiceFunction(mi.pszService, QuotesMenu_Chart);
#endif
- mi.ptszName = LPGENT("Edit Settings...");
+ mi.name.t = LPGENT("Edit Settings...");
mi.icolibItem = NULL;
mi.pszService = "Quotes/EditSettings";
g_hMenuEditSettings = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index fdad9f0104..1b1fa73cbd 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -462,13 +462,13 @@ int Create_MenuitemShowList(void)
{
CLISTMENUITEM mi = { 0 };
mi.icolibItem = icon.hIcolib;
- mi.pszName = msLastUC_ShowListName;
+ mi.name.a = msLastUC_ShowListName;
mi.pszService = msLastUC_ShowList;
Menu_AddMainMenuItem(&mi);
mi.position = 0xFFFFF;
mi.icolibItem = icon.hIcolib;
- mi.pszName = LPGEN("Toggle Ignore");
+ mi.name.a = LPGEN("Toggle Ignore");
mi.pszService = V_RECENTCONTACTS_TOGGLE_IGNORE;
hMenuItemRemove = Menu_AddContactMenuItem(&mi);
return 0;
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp
index dde56c4f29..1cbeaf5b21 100644
--- a/plugins/RemovePersonalSettings/src/rps.cpp
+++ b/plugins/RemovePersonalSettings/src/rps.cpp
@@ -127,8 +127,8 @@ extern "C" int __declspec(dllexport) Load()
CreateServiceFunction("RemovePersonalSettings/RemoveAll",RemoveAllService);
memset(&mi, 0, sizeof(mi));
mi.position = -0x7FFFFFFF;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.pszName = LPGEN("Remove Personal Settings...");
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.a = LPGEN("Remove Personal Settings...");
mi.pszService="RemovePersonalSettings/RemoveAll";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Restart/src/restart.cpp b/plugins/Restart/src/restart.cpp
index 8d7d267b97..b29e34ca9b 100644
--- a/plugins/Restart/src/restart.cpp
+++ b/plugins/Restart/src/restart.cpp
@@ -49,7 +49,7 @@ extern "C" __declspec(dllexport) int Load(void)
CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.icolibItem = icon.hIcolib;
- mi.pszName = LPGEN("Restart");
+ mi.name.a = LPGEN("Restart");
mi.pszService = "System/RestartMe";
Menu_AddMainMenuItem(&mi);
Menu_AddTrayMenuItem(&mi);
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp
index b2d2d5f340..640a696925 100644
--- a/plugins/SMS/src/SMS_svc.cpp
+++ b/plugins/SMS/src/SMS_svc.cpp
@@ -30,15 +30,15 @@ int LoadModules(void)
CLISTMENUITEM mi = { 0 };
mi.position = 300050000;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_SMS);
- mi.ptszName = SMS_SEND_STR;
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_SMS);
+ mi.name.t = SMS_SEND_STR;
mi.pszService = szServiceFunction;
mi.flags = CMIF_TCHAR;
Menu_AddMainMenuItem(&mi);
mi.position = -2000070000;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_SMS);
- mi.ptszName = SMS_SEND_CM_STR;
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_SMS);
+ mi.name.t = SMS_SEND_CM_STR;
mi.pszService = szServiceFunction;
mi.flags = CMIF_TCHAR;
ssSMSSettings.hContactMenuItems[0] = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 017091d033..85362d0906 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -445,16 +445,16 @@ static int OnModulesLoaded(WPARAM, LPARAM)
ReloadGlobals();
LoadGlobalIcons();
LoadMsgLogIcons();
- ModuleLoad(0, 0);
+ ModuleLoad(0, 0);
CLISTMENUITEM mi = { 0 };
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
- mi.icolibItem = Skin_GetIconHandle( SKINICON_EVENT_MESSAGE );
- mi.pszName = LPGEN("&Message");
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
+ mi.name.a = LPGEN("&Message");
mi.pszService = MS_MSG_SENDMESSAGE;
hMsgMenuItem = Menu_AddContactMenuItem(&mi);
- IcoLib_ReleaseIcon(mi.hIcon);
+ IcoLib_ReleaseIcon((HICON)mi.icolibItem);
HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileySettingsChanged);
HookEvent(ME_IEVIEW_OPTIONSCHANGED, SmileySettingsChanged);
@@ -548,7 +548,7 @@ int OnLoadModule(void)
SkinAddNewSoundEx("AlertMsg", LPGEN("Instant messages"), LPGEN("Incoming (new session)"));
SkinAddNewSoundEx("SendMsg", LPGEN("Instant messages"), LPGEN("Outgoing"));
SkinAddNewSoundEx("TNStart", LPGEN("Instant messages"), LPGEN("Contact started typing"));
- SkinAddNewSoundEx("TNStop", LPGEN("Instant messages"), LPGEN("Contact stopped typing"));
+ SkinAddNewSoundEx("TNStop", LPGEN("Instant messages"), LPGEN("Contact stopped typing"));
hCurSplitNS = LoadCursor(NULL, IDC_SIZENS);
hCurSplitWE = LoadCursor(NULL, IDC_SIZEWE);
@@ -566,11 +566,11 @@ int OnLoadModule(void)
CREOleCallback reOleCallback;
CREOleCallback2 reOleCallback2;
-STDMETHODIMP CREOleCallback::QueryInterface(REFIID riid, LPVOID * ppvObj)
-{
- if (IsEqualIID(riid, IID_IRichEditOleCallback)) {
- *ppvObj = this;
- AddRef();
+STDMETHODIMP CREOleCallback::QueryInterface(REFIID riid, LPVOID * ppvObj)
+{
+ if (IsEqualIID(riid, IID_IRichEditOleCallback)) {
+ *ppvObj = this;
+ AddRef();
return S_OK;
}
*ppvObj = NULL;
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp
index e2980834c9..b3515a2d38 100644
--- a/plugins/SecureIM/src/main.cpp
+++ b/plugins/SecureIM/src/main.cpp
@@ -41,8 +41,8 @@ static HGENMENU AddMenuItem(LPCSTR name, int pos, HICON hicon, LPCSTR service, i
CLISTMENUITEM mi = { 0 };
mi.flags = flags | CMIF_HIDDEN;
mi.position = pos;
- mi.hIcon = hicon;
- mi.pszName = (char*)name;
+ mi.icolibItem = hicon;
+ mi.name.a = (char*)name;
mi.pszService = (char*)service;
return Menu_AddContactMenuItem(&mi);
}
@@ -52,7 +52,7 @@ static HGENMENU AddSubItem(HGENMENU hRoot, LPCSTR name, int pos, int poppos, LPC
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_HIDDEN;
mi.position = pos;
- mi.pszName = (char*)name;
+ mi.name.a = (char*)name;
mi.hParentMenu = hRoot;
mi.pszService = (char*)service;
HGENMENU res = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp
index 58d0c1818b..1bb5192552 100644
--- a/plugins/SeenPlugin/src/menu.cpp
+++ b/plugins/SeenPlugin/src/menu.cpp
@@ -72,12 +72,11 @@ void InitMenuitem()
{
CreateServiceFunction("LastSeenUserDetails", MenuitemClicked);
- CLISTMENUITEM cmi = { 0 };
- cmi.position = -0x7FFFFFFF;
- cmi.flags = CMIF_TCHAR;
- cmi.ptszName = LPGENT("<none>");
- cmi.pszService = "LastSeenUserDetails";
- hmenuitem = Menu_AddContactMenuItem(&cmi);
+ CLISTMENUITEM mi = { 0 };
+ mi.position = -0x7FFFFFFF;
+ mi.name.a = LPGEN("Last seen");
+ mi.pszService = "LastSeenUserDetails";
+ hmenuitem = Menu_AddContactMenuItem(&mi);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, BuildContactMenu);
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index 1d7e4b25c5..82cb8e4cfa 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -274,11 +274,22 @@ DLL_EXPORT int Load(void)
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.icolibItem = GetIconHandle(ICO_MAINXS);
- #define _Menu_AddMainMenuItemEx(name,srv,pos) do{mi.ptszName=name;mi.pszService=srv;mi.position=pos;Menu_AddMainMenuItem(&mi);}while(0)
- #define _Menu_AddContactMenuItemEx(name,srv,pos) do{mi.ptszName=name;mi.pszService=srv;mi.position=pos;Menu_AddContactMenuItem(&mi);}while(0)
- _Menu_AddMainMenuItemEx(LPGENT("Take a screenshot"),MS_SENDSS_OPENDIALOG,1000001);
- _Menu_AddContactMenuItemEx(LPGENT("Send screenshot"),MS_SENDSS_OPENDIALOG,1000000);
- _Menu_AddContactMenuItemEx(LPGENT("Send desktop screenshot"),MS_SENDSS_SENDDESKTOP,1000001);
+
+ mi.name.t = LPGENT("Take a screenshot");
+ mi.pszService = MS_SENDSS_OPENDIALOG;
+ mi.position = 1000001;
+ Menu_AddMainMenuItem(&mi);
+
+ mi.name.t = LPGENT("Send screenshot");
+ mi.pszService = MS_SENDSS_OPENDIALOG;
+ mi.position = 1000000;
+ Menu_AddContactMenuItem(&mi);
+
+ mi.name.t = LPGENT("Send desktop screenshot");
+ mi.pszService = MS_SENDSS_SENDDESKTOP;
+ mi.position = 1000001;
+ Menu_AddContactMenuItem(&mi);
+
/// hotkey's
HOTKEYDESC hkd={sizeof(hkd)};
hkd.pszName="Open SendSS+";
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 525e276465..69ee00a7ff 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -797,22 +797,22 @@ static int PluginInit(WPARAM, LPARAM)
mi.position = 1000000000;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Sessions Manager"), 1000000000);
- mi.pszName = LPGEN("Save session...");
+ mi.name.a = LPGEN("Save session...");
mi.icolibItem = iconList[4].hIcolib;
mi.pszService = MS_SESSIONS_SAVEUSERSESSION;
hmSaveCurrentSession = Menu_AddMainMenuItem(&mi);
- mi.pszName = LPGEN("Load session...");
+ mi.name.a = LPGEN("Load session...");
mi.pszService = MS_SESSIONS_OPENMANAGER;
mi.icolibItem = iconList[3].hIcolib;
Menu_AddMainMenuItem(&mi);
- mi.pszName = LPGEN("Close session");
+ mi.name.a = LPGEN("Close session");
mi.pszService = MS_SESSIONS_CLOSESESSION;
mi.icolibItem = 0;
Menu_AddMainMenuItem(&mi);
- mi.pszName = LPGEN("Load last session");
+ mi.name.a = LPGEN("Load last session");
mi.pszService = MS_SESSIONS_RESTORELASTSESSION;
mi.icolibItem = iconList[5].hIcolib;
mi.position = 10100000;
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp
index 27195caeaf..9e446616bf 100644
--- a/plugins/SimpleAR/src/Main.cpp
+++ b/plugins/SimpleAR/src/Main.cpp
@@ -267,12 +267,12 @@ extern "C" int __declspec(dllexport)Load(void)
CLISTMENUITEM mi = { 0 };
mi.position = 500090000;
- mi.ptszName = _T("");
+ mi.name.t = _T("");
mi.pszService = protocolname"/ToggleEnable";
hEnableMenu = Menu_AddMainMenuItem(&mi);
mi.position = -0x7FFFFFFF;
- mi.ptszName = _T("");
+ mi.name.t = _T("");
mi.pszService = protocolname"/ToggleAutoanswer";
hToggle = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index 4b12971e99..98a9ca6e50 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -421,21 +421,21 @@ int LoadAwayMsgModule(void)
CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
mi.position = -2000005000;
- mi.ptszName = LPGENT("Re&ad Away message");
+ mi.name.t = LPGENT("Re&ad Away message");
mi.pszService = MS_AWAYMSG_SHOWAWAYMSG;
hAwayMsgMenuItem = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(MS_SIMPLESTATUSMSG_COPYMSG, CopyAwayMsgCommand);
mi.position = -2000006000;
mi.icolibItem = GetIconHandle(IDI_COPY);
- mi.ptszName = LPGENT("Copy Away message");
+ mi.name.t = LPGENT("Copy Away message");
mi.pszService = MS_SIMPLESTATUSMSG_COPYMSG;
hCopyMsgMenuItem = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(MS_SIMPLESTATUSMSG_GOTOURLMSG, GoToURLMsgCommand);
mi.position = -2000007000;
mi.icolibItem = GetIconHandle(IDI_GOTOURL);
- mi.ptszName = LPGENT("&Go to URL in Away message");
+ mi.name.t = LPGENT("&Go to URL in Away message");
mi.pszService = MS_SIMPLESTATUSMSG_GOTOURLMSG;
hGoToURLMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index 9bf3cb4eb0..6281cde036 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -1459,7 +1459,7 @@ static int ChangeStatusMsgPrebuild(WPARAM wParam, LPARAM lParam)
mi.flags |= CMIF_HIDDEN;
mi.icolibItem = GetIconHandle(IDI_CSMSG);
mi.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT;
- mi.ptszName = LPGENT("Status message...");
+ mi.name.t = LPGENT("Status message...");
mi.position = 2000200000;
Menu_AddStatusMenuItem(&mi);
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp
index 1cc9974b79..506d4be669 100644
--- a/plugins/SmileyAdd/src/main.cpp
+++ b/plugins/SmileyAdd/src/main.cpp
@@ -53,7 +53,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
CLISTMENUITEM mi = { 0 };
mi.position = 2000070050;
mi.icolibItem = icon.hIcolib;
- mi.pszName = LPGEN("Assign smiley category");
+ mi.name.a = LPGEN("Assign smiley category");
hContactMenuItem = Menu_AddContactMenuItem(&mi);
DownloadInit();
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp
index 2cc5413753..773c7cccc9 100644
--- a/plugins/SmileyAdd/src/services.cpp
+++ b/plugins/SmileyAdd/src/services.cpp
@@ -306,7 +306,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM)
const int ind = i + 3;
mi.position = ind;
- mi.ptszName = (TCHAR*)smc[i].GetDisplayName().c_str();
+ mi.name.t = (TCHAR*)smc[i].GetDisplayName().c_str();
if (cat == smc[i].GetName()) {
mi.flags |= CMIF_CHECKED;
@@ -320,7 +320,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM)
}
mi.position = 1;
- mi.ptszName = _T("<None>");
+ mi.name.t = _T("<None>");
if (cat == _T("<None>")) {
mi.flags |= CMIF_CHECKED;
nonecheck = false;
@@ -331,7 +331,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM)
menuHandleArray.insert(hMenu);
mi.position = 2;
- mi.ptszName = LPGENT("Protocol specific");
+ mi.name.t = LPGENT("Protocol specific");
if (nonecheck) mi.flags |= CMIF_CHECKED; else mi.flags &= ~CMIF_CHECKED;
hMenu = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp
index 2d4aaaa8d6..ab3aa9401b 100644
--- a/plugins/StartupSilence/src/main.cpp
+++ b/plugins/StartupSilence/src/main.cpp
@@ -292,7 +292,7 @@ static INT_PTR InitMenu()
CLISTMENUITEM mi = { 0 };
mi.position = 100000000;
mi.icolibItem = GetIconHandle(MENU_NAME);
- mi.pszName = MENU_NAME;
+ mi.name.a = MENU_NAME;
mi.pszService = SS_SERVICE_NAME;
hSSMenuToggleOnOff = Menu_AddMainMenuItem(&mi);
UpdateMenu();
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp
index 957836adcd..2f74d8cbc1 100644
--- a/plugins/StatusPlugins/StartupStatus/profiles.cpp
+++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp
@@ -105,7 +105,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM)
if (db_get_b(NULL, MODULENAME, OptName(i, SETTING_INSUBMENU), 1))
mi.hParentMenu = Menu_CreateRoot(MO_STATUS, LPGENT("Status profiles"), 2000100000);
- mi.ptszName = profilename;
+ mi.name.t = profilename;
mi.position = 2000100000 + mcount;
mir_snprintf(servicename, _countof(servicename), "%s%d", MS_SS_MENUSETPROFILEPREFIX, mcount);
switch(mcount) {
diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp
index 916d4b9123..4e59ed963e 100755
--- a/plugins/StopSpamMod/src/init.cpp
+++ b/plugins/StopSpamMod/src/init.cpp
@@ -151,8 +151,8 @@ extern "C" int __declspec(dllexport) Load()
CLISTMENUITEM mi = { 0 };
mi.position=-0x7FFFFFFF;
mi.flags=0;
- mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.pszName=LPGEN("Remove Temporary Contacts");
+ mi.icolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.a=LPGEN("Remove Temporary Contacts");
mi.pszService="/RemoveTmp";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp
index ace2300843..d36e5f709a 100644
--- a/plugins/StopSpamPlus/src/stopspam.cpp
+++ b/plugins/StopSpamPlus/src/stopspam.cpp
@@ -51,8 +51,8 @@ extern "C" int __declspec(dllexport) Load(void)
CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName = LPGENT("Remove Temporary Contacts");
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t = LPGENT("Remove Temporary Contacts");
mi.pszService = pluginName"/RemoveTempContacts";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index 470ba6ec37..6098edf5c4 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -139,7 +139,7 @@ void CGlobals::reloadSystemModulesChanged()
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
- mi.pszName = LPGEN("&Message");
+ mi.name.a = LPGEN("&Message");
mi.pszService = MS_MSG_SENDMESSAGE;
PluginConfig.m_hMenuItem = Menu_AddContactMenuItem(&mi);
@@ -327,15 +327,15 @@ int CGlobals::ModulesLoaded(WPARAM, LPARAM)
CLISTMENUITEM mi = { 0 };
mi.position = -500050005;
- mi.hIcon = PluginConfig.g_iconContainer;
- mi.pszName = LPGEN("&Messaging settings...");
+ mi.icolibItem = PluginConfig.g_iconContainer;
+ mi.name.a = LPGEN("&Messaging settings...");
mi.pszService = MS_TABMSG_SETUSERPREFS;
PluginConfig.m_UserMenuItem = Menu_AddContactMenuItem(&mi);
if (sendLater->isAvail()) {
mi.position = -500050006;
- mi.hIcon = 0;
- mi.pszName = LPGEN("&Send later job list...");
+ mi.icolibItem = 0;
+ mi.name.a = LPGEN("&Send later job list...");
mi.pszService = MS_TABMSG_SLQMGR;
PluginConfig.m_UserMenuItem = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index c1637a6f0f..e64e83ddee 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -538,12 +538,12 @@ int TN_ModuleInit()
CLISTMENUITEM mi = { 0 };
if (!Disabled) {
- mi.pszName = LPGEN("Disable &typing notification");
- mi.hIcon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ENABLED));
+ mi.name.a = LPGEN("Disable &typing notification");
+ mi.icolibItem = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ENABLED));
}
else {
- mi.pszName = LPGEN("Enable &typing notification");
- mi.hIcon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_DISABLED));
+ mi.name.a = LPGEN("Enable &typing notification");
+ mi.icolibItem = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_DISABLED));
}
mi.pszService = "TypingNotify/EnableDisableMenuCommand";
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index cf769d01ee..a21efb2458 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -1050,8 +1050,8 @@ void Traffic_AddMainMenuItem(void)
CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = 0;
- mi.hIcon = NULL;
- mi.pszName = LPGEN("Toggle traffic counter");
+ mi.icolibItem = NULL;
+ mi.name.a = LPGEN("Toggle traffic counter");
mi.pszService = "TrafficCounter/ShowHide";
hTrafficMainMenuItem = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp
index a3cb2e2e1b..45d97293a0 100644
--- a/plugins/UserGuide/src/main.cpp
+++ b/plugins/UserGuide/src/main.cpp
@@ -87,8 +87,8 @@ extern "C" __declspec(dllexport) int Load(void)
CLISTMENUITEM mi = { 0 };
mi.position = 500000;
mi.flags = CMIF_TCHAR;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_HELP);
- mi.ptszName = LPGENT("User Guide");
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_HELP);
+ mi.name.t = LPGENT("User Guide");
mi.pszService = "UserGuide/ShowGuide";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/UserInfoEx/src/mir_menuitems.cpp b/plugins/UserInfoEx/src/mir_menuitems.cpp
index e3891a5f65..925fdcf23f 100644
--- a/plugins/UserInfoEx/src/mir_menuitems.cpp
+++ b/plugins/UserInfoEx/src/mir_menuitems.cpp
@@ -96,8 +96,8 @@ void RebuildContact()
case 5:
//cascade all
mi.position = 1000050000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
- mi.pszName = MODULELONGNAME;
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.name.a = MODULELONGNAME;
mhRoot = Menu_AddContactMenuItem(&mi);
hMenuItem[0] = mhRoot;
mhExIm = mhRoot;
@@ -105,8 +105,8 @@ void RebuildContact()
case 9:
//cascade Ex/Import
mi.position = 1000050100;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
- mi.pszName = LPGEN("Export/import contact");
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
+ mi.name.a = LPGEN("Export/import contact");
mhExIm = Menu_AddContactMenuItem(&mi);
hMenuItem[0] = mhExIm;
mhRoot = NULL;
@@ -119,9 +119,9 @@ void RebuildContact()
// ContactDetailsPS's menuitem
mi.hParentMenu = mhRoot;
mi.pszService = MS_USERINFO_SHOWDIALOG;
- mi.pszName = LPGEN("User &details");
+ mi.name.a = LPGEN("User &details");
mi.position = 1000050000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
hMenuItem[1] = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hMenuItem[1], MCI_OPT_HOTKEY, MAKELPARAM(VK_F3, MOD_ALT));
@@ -131,16 +131,16 @@ void RebuildContact()
// Export
mi.pszService = MS_USERINFO_VCARD_EXPORT;
- mi.pszName = mhExIm != NULL ? LPGEN("&Export") : LPGEN("&Export user details");
+ mi.name.a = mhExIm != NULL ? LPGEN("&Export") : LPGEN("&Export user details");
mi.position = 1000050200;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXPORT);
hMenuItem[2] = Menu_AddContactMenuItem(&mi);
// Import
mi.pszService = MS_USERINFO_VCARD_IMPORT;
- mi.pszName = mhExIm != NULL ? LPGEN("&Import") : LPGEN("&Import user details");
+ mi.name.a = mhExIm != NULL ? LPGEN("&Import") : LPGEN("&Import user details");
mi.position = 1000050300;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_IMPORT);
hMenuItem[3] = Menu_AddContactMenuItem(&mi);
}
@@ -184,8 +184,8 @@ void RebuildMain()
case 5:
//cascade all
mi.position = 500050000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
- mi.pszName = MODULELONGNAME;
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.name.a = MODULELONGNAME;
mhRoot = Menu_AddMainMenuItem(&mi);
hMenuItem[item++] = mhRoot;
mhExIm = mhRoot;
@@ -193,8 +193,8 @@ void RebuildMain()
case 9:
//cascade Ex/Import
mi.position = 500050000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
- mi.pszName = LPGEN("Export/import contact");
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
+ mi.name.a = LPGEN("Export/import contact");
mhExIm = Menu_AddMainMenuItem(&mi);
hMenuItem[item++] = mhExIm;
mhRoot = NULL;
@@ -208,9 +208,9 @@ void RebuildMain()
{
mi.hParentMenu = mhRoot;
mi.pszService = MS_USERINFO_SHOWDIALOG;
- mi.pszName = LPGEN("View/change my &details...");
+ mi.name.a = LPGEN("View/change my &details...");
mi.position = 500050000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
}
@@ -219,16 +219,16 @@ void RebuildMain()
// Export
mi.pszService = MS_USERINFO_VCARD_EXPORTALL;
- mi.pszName = LPGEN("Export all contacts");
+ mi.name.a = LPGEN("Export all contacts");
mi.position = 500150000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXPORT);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
// Import
mi.pszService = MS_USERINFO_VCARD_IMPORTALL;
- mi.pszName = LPGEN("Import all contacts");
+ mi.name.a = LPGEN("Import all contacts");
mi.position = 500151000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_IMPORT);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
}
@@ -242,15 +242,15 @@ void RebuildMain()
if (bRemindMenus) {
// make backup of each protocol based birthday
mi.pszService = MS_USERINFO_REMINDER_AGGRASIVEBACKUP;
- mi.pszName = LPGEN("Backup birthdays");
+ mi.name.a = LPGEN("Backup birthdays");
mi.position = 500253000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_BDAY_BACKUP);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_BDAY_BACKUP);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
// Check anniversaries
mi.pszService = MS_USERINFO_REMINDER_CHECK;
- mi.pszName = LPGEN("Check anniversaries");
+ mi.name.a = LPGEN("Check anniversaries");
mi.position = 500251000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_SEARCH);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_SEARCH);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
}
else {
@@ -259,18 +259,18 @@ void RebuildMain()
}
// Refresh Contact Details
mi.pszService = MS_USERINFO_REFRESH;
- mi.pszName = LPGEN("Refresh contact details");
+ mi.name.a = LPGEN("Refresh contact details");
mi.position = 500254000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_UPDATE);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_UPDATE);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
}
// anniversary list
{
mi.pszService = MS_USERINFO_REMINDER_LIST;
- mi.pszName = LPGEN("Anniversary list");
+ mi.name.a = LPGEN("Anniversary list");
mi.position = 500252000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_ANNIVERSARY);
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_ANNIVERSARY);
hMenuItem[item++] = Menu_AddMainMenuItem(&mi);
}
}
@@ -322,8 +322,8 @@ void RebuildGroup()
case 5:
//cascade all
mi.position = 250000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
- mi.pszName = MODULELONGNAME;
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.name.a = MODULELONGNAME;
mhRoot = Menu_AddGroupMenuItem(0, &mi);
hMenuItem[item++] = mhRoot;
mhExIm = mhRoot;
@@ -331,8 +331,8 @@ void RebuildGroup()
case 9:
//cascade Ex/Import
mi.position = 250100;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
- mi.pszName = LPGEN("Export/import contact");
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
+ mi.name.a = LPGEN("Export/import contact");
mhExIm = Menu_AddGroupMenuItem(0, &mi);
hMenuItem[item++] = mhExIm;
mhRoot = NULL;
@@ -347,16 +347,16 @@ void RebuildGroup()
// Export
mi.pszService = MS_USERINFO_VCARD_EXPORTALL;
- mi.pszName = LPGEN("Export all contacts");
+ mi.name.a = LPGEN("Export all contacts");
mi.position = 250200;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXPORT);
hMenuItem[item++] = Menu_AddGroupMenuItem(0, &mi);
// Import
mi.pszService = MS_USERINFO_VCARD_IMPORTALL;
- mi.pszName = LPGEN("Import all contacts");
+ mi.name.a = LPGEN("Import all contacts");
mi.position = 250300;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_IMPORT);
hMenuItem[item++] = Menu_AddGroupMenuItem(0, &mi);
}
}
@@ -412,8 +412,8 @@ void RebuildSubGroup()
case 5:
//cascade all
mi.position = 1050000;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
- mi.pszName = MODULELONGNAME;
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.name.a = MODULELONGNAME;
mhRoot = Menu_AddSubGroupMenuItem(0, &mi);
hMenuItem[item++] = mhRoot;
mhExIm = mhRoot;
@@ -421,8 +421,8 @@ void RebuildSubGroup()
case 9:
//cascade Ex/Import
mi.position = 1050100;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
- mi.pszName = LPGEN("Export/import group");
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
+ mi.name.a = LPGEN("Export/import group");
mhExIm = Menu_AddSubGroupMenuItem(0, &mi);
hMenuItem[item++] = mhExIm;
mhRoot = NULL;
@@ -438,9 +438,9 @@ void RebuildSubGroup()
// Export
mir_strcpy(tDest, "/ExportGroup"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Group_Service);
- mi.pszName = mhExIm != NULL ? LPGEN("&Export") : LPGEN("&Export group");
+ mi.name.a = mhExIm != NULL ? LPGEN("&Export") : LPGEN("&Export group");
mi.position = 1050200;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXPORT);
gmp.lParam=0;
gmp.wParam=TRUE;
hMenuItem[item++] = Menu_AddSubGroupMenuItem(&gmp, &mi);
@@ -448,9 +448,9 @@ void RebuildSubGroup()
// Import
mir_strcpy(tDest, "/ImportGroup"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Group_Service);
- mi.pszName = mhExIm != NULL ? LPGEN("&Import") : LPGEN("&Import group");
+ mi.name.a = mhExIm != NULL ? LPGEN("&Import") : LPGEN("&Import group");
mi.position = 1050300;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_IMPORT);
gmp.lParam=0;
gmp.wParam=FALSE;
hMenuItem[item++] = Menu_AddSubGroupMenuItem(&gmp, &mi);
@@ -539,8 +539,8 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam)
case 5:
//cascade all
mi.position = 50100;
- mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN);
- mi.pszName = MODULELONGNAME;
+ mi.icolibItem = IcoLib_GetIcon(ICO_COMMON_MAIN);
+ mi.name.a = MODULELONGNAME;
hMenuItemAccount[mItems*i + item] = Menu_AddStatusMenuItem(&mi);
mhRoot = hMenuItemAccount[mItems*i + item++];
mhExIm = mhRoot;
@@ -548,8 +548,8 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam)
case 9:
//cascade Ex/Import
mi.position = 50100;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
- mi.pszName = LPGEN("Export/import");
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXIMPORT);
+ mi.name.a = LPGEN("Export/import");
hMenuItemAccount[mItems*i + item] = Menu_AddStatusMenuItem(&mi);
mhRoot = hMenuItemAccount[mItems*i + item++];
mhExIm = mhRoot;
@@ -566,17 +566,17 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam)
// Export
mir_strcpy(tDest, "/ExportAccount"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Account_Service);
- mi.pszName = LPGEN("&Export xml");
+ mi.name.a = LPGEN("&Export xml");
mi.position = 50200;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EXPORT);
hMenuItemAccount[mItems*i + item++] = Menu_AddStatusMenuItem(&mi);
// Import
mir_strcpy(tDest, "/ImportAccount"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Account_Service);
- mi.pszName = LPGEN("&Import xml");
+ mi.name.a = LPGEN("&Import xml");
mi.position = 50300;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_IMPORT);
hMenuItemAccount[mItems*i + item++] = Menu_AddStatusMenuItem(&mi);
}
}
diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp
index 5ad7c0935f..91a2515650 100644
--- a/plugins/UserInfoEx/src/svc_email.cpp
+++ b/plugins/UserInfoEx/src/svc_email.cpp
@@ -185,8 +185,8 @@ void SvcEMailRebuildMenu()
// insert contact menuitem
CLISTMENUITEM mi = { 0 };
mi.position = -2000010000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_EMAIL);
- mi.pszName = "&E-mail";
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_EMAIL);
+ mi.name.a = "&E-mail";
mi.pszService = MS_EMAIL_SENDEMAIL;
ghMenuItem = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/UserInfoEx/src/svc_homepage.cpp b/plugins/UserInfoEx/src/svc_homepage.cpp
index 9e1b7d10b8..0e47f1e8bd 100644
--- a/plugins/UserInfoEx/src/svc_homepage.cpp
+++ b/plugins/UserInfoEx/src/svc_homepage.cpp
@@ -155,8 +155,8 @@ void SvcHomepageRebuildMenu()
// insert contact menuitem
CLISTMENUITEM mi = { 0 };
mi.position = -2000010000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_GOTO);
- mi.pszName = LPGEN("&Homepage");
+ mi.icolibItem = IcoLib_GetIcon(ICO_BTN_GOTO);
+ mi.name.a = LPGEN("&Homepage");
mi.pszService = MS_USERINFO_HOMEPAGE_OPENURL;
ghMenuItem = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp
index fbd0d965ae..4ea8b9511d 100644
--- a/plugins/Weather/src/weather_svcs.cpp
+++ b/plugins/Weather/src/weather_svcs.cpp
@@ -269,63 +269,62 @@ INT_PTR MenuitemNotifyCmd(WPARAM wParam,LPARAM lParam)
void AddMenuItems(void)
{
CLISTMENUITEM mi = { 0 };
- mi.pszContactOwner = WEATHERPROTONAME;
// contact menu
CreateServiceFunction(MS_WEATHER_UPDATE, UpdateSingleStation);
mi.position = -0x7FFFFFFA;
mi.icolibItem = GetIconHandle("update");
- mi.pszName = LPGEN("Update Weather");
+ mi.name.a = LPGEN("Update Weather");
mi.pszService = MS_WEATHER_UPDATE;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
CreateServiceFunction(MS_WEATHER_REFRESH, UpdateSingleRemove);
mi.position = -0x7FFFFFF9;
mi.icolibItem = GetIconHandle("update2");
- mi.pszName = LPGEN("Remove Old Data then Update");
+ mi.name.a = LPGEN("Remove Old Data then Update");
mi.pszService = MS_WEATHER_REFRESH;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
CreateServiceFunction(MS_WEATHER_BRIEF, BriefInfoSvc);
mi.position = -0x7FFFFFF8;
mi.icolibItem = GetIconHandle("brief");
- mi.pszName = LPGEN("Brief Information");
+ mi.name.a = LPGEN("Brief Information");
mi.pszService = MS_WEATHER_BRIEF;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
CreateServiceFunction(MS_WEATHER_COMPLETE, LoadForecast);
mi.position = -0x7FFFFFF7;
mi.icolibItem = GetIconHandle("read");
- mi.pszName = LPGEN("Read Complete Forecast");
+ mi.name.a = LPGEN("Read Complete Forecast");
mi.pszService = MS_WEATHER_COMPLETE;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
CreateServiceFunction(MS_WEATHER_MAP, WeatherMap);
mi.position = -0x7FFFFFF6;
mi.icolibItem = GetIconHandle("map");
- mi.pszName = LPGEN("Weather Map");
+ mi.name.a = LPGEN("Weather Map");
mi.pszService = MS_WEATHER_MAP;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
CreateServiceFunction(MS_WEATHER_LOG, ViewLog);
mi.position = -0x7FFFFFF5;
mi.icolibItem = GetIconHandle("log");
- mi.pszName = LPGEN("View Log");
+ mi.name.a = LPGEN("View Log");
mi.pszService = MS_WEATHER_LOG;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
CreateServiceFunction(MS_WEATHER_EDIT, EditSettings);
mi.position = -0x7FFFFFF4;
mi.icolibItem = GetIconHandle("edit");
- mi.pszName = LPGEN("Edit Settings");
+ mi.name.a = LPGEN("Edit Settings");
mi.pszService = MS_WEATHER_EDIT;
- Menu_AddContactMenuItem(&mi);
+ Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
// adding main menu items
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Weather"), 500099000);
CreateServiceFunction(MS_WEATHER_ENABLED, EnableDisableCmd);
- mi.pszName = LPGEN("Enable/Disable Weather Update");
+ mi.name.a = LPGEN("Enable/Disable Weather Update");
mi.icolibItem = GetIconHandle("main");
mi.position = 10100001;
mi.pszService = MS_WEATHER_ENABLED;
@@ -335,21 +334,21 @@ void AddMenuItems(void)
CreateServiceFunction(MS_WEATHER_UPDATEALL, UpdateAllInfo);
mi.position = 20100001;
mi.icolibItem = GetIconHandle("update");
- mi.pszName = LPGEN("Update All Weather");
+ mi.name.a = LPGEN("Update All Weather");
mi.pszService = MS_WEATHER_UPDATEALL;
Menu_AddMainMenuItem(&mi);
CreateServiceFunction(MS_WEATHER_REFRESHALL, UpdateAllRemove);
mi.position = 20100002;
mi.icolibItem = GetIconHandle("update2");
- mi.pszName = LPGEN("Remove Old Data then Update All");
+ mi.name.a = LPGEN("Remove Old Data then Update All");
mi.pszService = MS_WEATHER_REFRESHALL;
Menu_AddMainMenuItem(&mi);
// only run if popup service exists
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
CreateServiceFunction(WEATHERPROTONAME "/PopupMenu", MenuitemNotifyCmd);
- mi.pszName = LPGEN("Weather Notification");
+ mi.name.a = LPGEN("Weather Notification");
mi.icolibItem = GetIconHandle("popup");
mi.position = 0;
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
@@ -361,9 +360,9 @@ void AddMenuItems(void)
if ( ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
CreateServiceFunction("Weather/mwin_menu", Mwin_MenuClicked);
mi.position = -0x7FFFFFF0;
- mi.hIcon = NULL;
+ mi.icolibItem = NULL;
mi.flags = 0;
- mi.pszName = LPGEN("Display in a frame");
+ mi.name.a = LPGEN("Display in a frame");
mi.pszService = "Weather/mwin_menu";
hMwinMenu = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp
index a0cb6460e7..b3367ff3d8 100644
--- a/plugins/WebView/src/main.cpp
+++ b/plugins/WebView/src/main.cpp
@@ -179,114 +179,96 @@ extern "C" int __declspec(dllexport) Load()
CreateServiceFunction("DisableWebview", AutoUpdateMCmd);
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, _T(MODULENAME), 20200001);
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
if (db_get_b(NULL, MODULENAME, DISABLE_AUTOUPDATE_KEY, 0))
- mi.ptszName = LPGENT("Auto update disabled");
+ mi.name.t = LPGENT("Auto update disabled");
else
- mi.ptszName = LPGENT("Auto update enabled");
+ mi.name.t = LPGENT("Auto update enabled");
mi.pszService = "DisableWebview";
hMenuItem1 = Menu_AddMainMenuItem(&mi);
- /*
- * Update all webview contacts
- */
-
+ // Update all webview contacts
CreateServiceFunction("UpdateAll", UpdateAllMenuCommand);
-
mi.position = 500090002;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_UPDATEALL));
- mi.ptszName = LPGENT("Update all Webview sites");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_UPDATEALL));
+ mi.name.t = LPGENT("Update all Webview sites");
mi.pszService = "UpdateAll";
Menu_AddMainMenuItem(&mi);
- /*
- * Mark All Webview Sites As Read
- */
-
+ // Mark All Webview Sites As Read
CreateServiceFunction("MarkAllSitesRead", MarkAllReadMenuCommand);
-
mi.position = 500090099;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_MARKALLREAD));
- mi.ptszName = LPGENT("Mark all Webview sites as read");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_MARKALLREAD));
+ mi.name.t = LPGENT("Mark all Webview sites as read");
mi.pszService = "MarkAllSitesRead";
Menu_AddMainMenuItem(&mi);
- /*
- * open cache directory
- */
+ // open cache directory
CreateServiceFunction("OpenCacheFolder", OpenCacheDir);
mi.position = 500090099;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_FOLDER));
- mi.ptszName = LPGENT("Open cache folder");
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_FOLDER));
+ mi.name.t = LPGENT("Open cache folder");
mi.pszService = "OpenCacheFolder";
Menu_AddMainMenuItem(&mi);
- /*
- * Countdown test
- */
-
+ // Countdown test
CreateServiceFunction("Countdown", CountdownMenuCommand);
-
mi.flags |= CMIF_KEEPUNTRANSLATED;
TCHAR countername[100];
mir_sntprintf(countername, _countof(countername), TranslateT("%d minutes to update"), db_get_dw(NULL, MODULENAME, COUNTDOWN_KEY, 0));
mi.position = 600090099;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_UPDATEALL));
- mi.pszContactOwner = NULL;
- mi.ptszName = countername;
-
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_UPDATEALL));
+ mi.name.t = countername;
mi.pszService = "Countdown";
hMenuItemCountdown = Menu_AddMainMenuItem(&mi);
}
- /*
- * contact menu
- */
+ // contact menu
mi.flags = CMIF_TCHAR;
+
CreateServiceFunction("Open web page", WebsiteMenuCommand);
mi.position = 100;
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_URL));
- mi.pszContactOwner = MODULENAME;
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_URL));
mi.pszService = "Open web page";
- mi.ptszName = LPGENT("Open web page");
- Menu_AddContactMenuItem(&mi);
+ mi.name.t = LPGENT("Open web page");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
CreateServiceFunction("OpenClose Window", DataWndMenuCommand);
mi.pszService = "OpenClose Window";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SHOW_HIDE));
- mi.ptszName = LPGENT("Open/Close window");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SHOW_HIDE));
+ mi.name.t = LPGENT("Open/Close window");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
mi.position = 2222220;
mi.pszService = "UpdateData";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_UPDATE));
- mi.ptszName = LPGENT("Update data");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_UPDATE));
+ mi.name.t = LPGENT("Update data");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
CreateServiceFunction("ContactOptions", CntOptionsMenuCommand);
mi.pszService = "ContactOptions";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_OPTIONS));
- mi.ptszName = LPGENT("Contact options");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_OPTIONS));
+ mi.name.t = LPGENT("Contact options");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
CreateServiceFunction("ContactAlertOpts", CntAlertMenuCommand);
mi.pszService = "ContactAlertOpts";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ALERT));
- mi.ptszName = LPGENT("Contact alert options");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ALERT));
+ mi.name.t = LPGENT("Contact alert options");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
CreateServiceFunction("PingWebsite", PingWebsiteMenuCommand);
mi.pszService = "PingWebsite";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_PING));
- mi.ptszName = LPGENT("Ping web site");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_PING));
+ mi.name.t = LPGENT("Ping web site");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
CreateServiceFunction("StopDataProcessing", StpPrcssMenuCommand);
mi.pszService = "StopDataProcessing";
- mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_STOP));
- mi.ptszName = LPGENT("Stop data processing");
- Menu_AddContactMenuItem(&mi);
+ mi.icolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_STOP));
+ mi.name.t = LPGENT("Stop data processing");
+ Menu_AddContactMenuItem(&mi, MODULENAME);
hWindowList = WindowList_Create();
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp
index b47593aaeb..d2c224f0c8 100644
--- a/plugins/WhenWasIt/src/WhenWasIt.cpp
+++ b/plugins/WhenWasIt/src/WhenWasIt.cpp
@@ -78,28 +78,28 @@ extern "C" int __declspec(dllexport) Load(void)
mi.pszService = MS_WWI_CHECK_BIRTHDAYS;
mi.icolibItem = hCheckMenu;
- mi.pszName = LPGEN("Check for birthdays");
+ mi.name.a = LPGEN("Check for birthdays");
Menu_AddMainMenuItem(&mi);
mi.pszService = MS_WWI_LIST_SHOW;
- mi.pszName = LPGEN("Birthday list");
+ mi.name.a = LPGEN("Birthday list");
mi.icolibItem = hListMenu;
Menu_AddMainMenuItem(&mi);
mi.pszService = MS_WWI_REFRESH_USERDETAILS;
mi.position = 10100000;
- mi.pszName = LPGEN("Refresh user details");
+ mi.name.a = LPGEN("Refresh user details");
mi.icolibItem = hRefreshUserDetails;
Menu_AddMainMenuItem(&mi);
mi.pszService = MS_WWI_IMPORT_BIRTHDAYS;
mi.position = 10200000;
- mi.pszName = LPGEN("Import birthdays");
+ mi.name.a = LPGEN("Import birthdays");
mi.icolibItem = hImportBirthdays;
Menu_AddMainMenuItem(&mi);
mi.pszService = MS_WWI_EXPORT_BIRTHDAYS;
- mi.pszName = LPGEN("Export birthdays");
+ mi.name.a = LPGEN("Export birthdays");
mi.icolibItem = hExportBirthdays;
Menu_AddMainMenuItem(&mi);
@@ -107,7 +107,7 @@ extern "C" int __declspec(dllexport) Load(void)
mi.pszService = MS_WWI_ADD_BIRTHDAY;
mi.position = 10000000;
mi.icolibItem = hAddBirthdayContact;
- mi.pszName = LPGEN("Add/change user &birthday");
+ mi.name.a = LPGEN("Add/change user &birthday");
Menu_AddContactMenuItem(&mi);
// Register hotkeys
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
index fe9ce91b60..d641f612f2 100644
--- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp
+++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
@@ -495,19 +495,19 @@ extern "C" __declspec(dllexport) int Load(void)
CLISTMENUITEM mi = { 0 };
mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 1999990000);
if (WumfOptions.PopupsEnabled == FALSE) {
- mi.pszName = LPGEN("Enable WUMF popups");
- mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_NOPOPUP));
+ mi.name.a = LPGEN("Enable WUMF popups");
+ mi.icolibItem = LoadIcon(hInst,MAKEINTRESOURCE(IDI_NOPOPUP));
}
else {
- mi.pszName = LPGEN("Disable WUMF popups");
- mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_POPUP));
+ mi.name.a = LPGEN("Disable WUMF popups");
+ mi.icolibItem = LoadIcon(hInst,MAKEINTRESOURCE(IDI_POPUP));
}
mi.pszService = MS_WUMF_SWITCHPOPUP;
hMenuItem = Menu_AddMainMenuItem(&mi);
- mi.pszName = LPGEN("WUMF: Show connections");
- mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_DRIVE));
+ mi.name.a = LPGEN("WUMF: Show connections");
+ mi.icolibItem = LoadIcon(hInst,MAKEINTRESOURCE(IDI_DRIVE));
mi.pszService = MS_WUMF_CONNECTIONSSHOW;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp
index d94d9ea4c8..fb46121077 100644
--- a/plugins/XSoundNotify/src/xsn_main.cpp
+++ b/plugins/XSoundNotify/src/xsn_main.cpp
@@ -179,8 +179,8 @@ static int OnLoadInit(WPARAM, LPARAM)
CLISTMENUITEM mi = { 0 };
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.ptszName = LPGENT("Custom contact sound");
+ mi.icolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t = LPGENT("Custom contact sound");
mi.pszService = "XSoundNotify/ContactMenuCommand";
hChangeSound = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp
index ecb739d653..c657a7a5ce 100644
--- a/plugins/YAMN/src/main.cpp
+++ b/plugins/YAMN/src/main.cpp
@@ -144,20 +144,18 @@ int SystemModulesLoaded(WPARAM, LPARAM)
CLISTMENUITEM mi = { 0 };
mi.position = 0xb0000000;
mi.icolibItem = g_GetIconHandle(0);
- mi.pszName = LPGEN("Check &mail (All Account)");
+ mi.name.a = LPGEN("Check &mail (All Account)");
mi.pszService = MS_YAMN_FORCECHECK;
hMenuItemMain = Menu_AddMainMenuItem(&mi);
- mi.pszName = LPGEN("Check &mail (This Account)");
- mi.pszContactOwner = YAMN_DBMODULE;
+ mi.name.a = LPGEN("Check &mail (This Account)");
mi.pszService = MS_YAMN_CLISTCONTEXT;
- hMenuItemCont = Menu_AddContactMenuItem(&mi);
+ hMenuItemCont = Menu_AddContactMenuItem(&mi, YAMN_DBMODULE);
mi.icolibItem = g_GetIconHandle(1);
- mi.pszName = LPGEN("Launch application");
- mi.pszContactOwner = YAMN_DBMODULE;
+ mi.name.a = LPGEN("Launch application");
mi.pszService = MS_YAMN_CLISTCONTEXTAPP;
- hMenuItemContApp = Menu_AddContactMenuItem(&mi);
+ hMenuItemContApp = Menu_AddContactMenuItem(&mi, YAMN_DBMODULE);
CheckMenuItems();
diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp
index c937996dcf..dc8bb1074e 100644
--- a/plugins/YAPP/src/yapp.cpp
+++ b/plugins/YAPP/src/yapp.cpp
@@ -174,14 +174,14 @@ void InitMenuItems(void)
mi.flags = CMIF_TCHAR;
mi.hParentMenu = hMenuRoot;
- mi.hIcon = IcoLib_GetIcon(ICO_HISTORY, 0);
+ mi.icolibItem = IcoLib_GetIcon(ICO_HISTORY, 0);
mi.pszService= MS_POPUP_SHOWHISTORY;
- mi.ptszName = LPGENT("Popup History");
+ mi.name.t = LPGENT("Popup History");
hMenuItemHistory = Menu_AddMainMenuItem(&mi);
- mi.hIcon = IcoLib_GetIcon(isEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0);
+ mi.icolibItem = IcoLib_GetIcon(isEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0);
mi.pszService = "Popup/EnableDisableMenuCommand";
- mi.ptszName = (isEnabled ? LPGENT("Disable Popups") : LPGENT("Enable Popups"));
+ mi.name.t = (isEnabled ? LPGENT("Disable Popups") : LPGENT("Enable Popups"));
hMenuItem = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/mRadio/i_tray.inc b/plugins/mRadio/i_tray.inc
index 0406bf311f..5312e6b26b 100644
--- a/plugins/mRadio/i_tray.inc
+++ b/plugins/mRadio/i_tray.inc
@@ -90,7 +90,7 @@ begin
// build menu from sorted list
FillChar(mi,SizeOf(mi),0);
- mi.Flags :=CMIF_KEEPUNTRANSLATED or CMIF_UNICODE or CMIF_ROOTHANDLE;
+ mi.Flags :=CMIF_KEEPUNTRANSLATED or CMIF_UNICODE;
mi.hParentMenu:=trayparent;
pc:=StrCopyE(@buf,'mRadio/Choose');
for i:=0 to trayStations.realCount-1 do
@@ -156,7 +156,7 @@ begin
begin
mi.szName.w :='mRadio on';
end;
- mi.flags:=CMIF_UNICODE or CMIF_ROOTHANDLE;
+ mi.flags:=CMIF_UNICODE;
mi.position :=0;
srvtraystop:=CreateServiceFunction('mRadio/TrayProto',@TrayProto);
mi.pszService:='mRadio/TrayProto';
@@ -167,12 +167,12 @@ begin
if gVolume<0 then
begin
- mi.flags:=CMIF_UNICODE or CMIF_ROOTHANDLE or CMIF_CHECKED;
+ mi.flags:=CMIF_UNICODE or CMIF_CHECKED;
ico:=IcoBtnOff;
end
else
begin
- mi.flags:=CMIF_UNICODE or CMIF_ROOTHANDLE;
+ mi.flags:=CMIF_UNICODE;
ico:=IcoBtnOn;
end;
mi.hIcon :=IcoLib_GetIcon(ico,0);
@@ -185,7 +185,7 @@ begin
traymute:=Menu_AddMainMenuItem(@mi);
mi.hIcon:=0;
- mi.flags:=CMIF_UNICODE or CMIF_ROOTHANDLE;
+ mi.flags:=CMIF_UNICODE;
if CallService(MS_RADIO_COMMAND,MRC_STATUS,RD_STATUS_GET)<>RD_STATUS_PLAYING then
begin
playstr:='Play'