summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin10/lib/mir_app.libbin63102 -> 63088 bytes
-rw-r--r--bin12/lib/mir_app.libbin63102 -> 63088 bytes
-rw-r--r--include/delphi/m_genmenu.inc8
-rw-r--r--include/delphi/m_helpers.inc12
-rw-r--r--include/m_clist.h8
-rw-r--r--include/m_genmenu.h11
-rw-r--r--plugins/AddContactPlus/src/main.cpp2
-rw-r--r--plugins/Alarms/src/frame.cpp2
-rw-r--r--plugins/Alarms/src/options.cpp2
-rw-r--r--plugins/AuthState/src/main.cpp2
-rw-r--r--plugins/AutoShutdown/src/settingsdlg.cpp2
-rw-r--r--plugins/AvatarHistory/src/AvatarDlg.cpp2
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp6
-rw-r--r--plugins/Boltun/src/boltun.cpp2
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp2
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp2
-rw-r--r--plugins/BuddyPounce/src/main.cpp2
-rw-r--r--plugins/CSList/src/cslist.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp2
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp4
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clistmenus.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clisttray.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp2
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp4
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp4
-rw-r--r--plugins/Clist_nicer/src/clistmenus.cpp2
-rw-r--r--plugins/Console/src/Console.cpp2
-rw-r--r--plugins/ContactsPlus/src/main.cpp2
-rw-r--r--plugins/CrashDumper/src/crshdmp.cpp2
-rw-r--r--plugins/CyrTranslit/src/MirandaContact.cpp2
-rw-r--r--plugins/Db3x_mmap/src/ui.cpp2
-rw-r--r--plugins/DbEditorPP/src/main.cpp2
-rw-r--r--plugins/Db_autobackups/src/main.cpp2
-rw-r--r--plugins/Dropbox/src/dropbox_menus.cpp2
-rw-r--r--plugins/Exchange/src/hooked_events.cpp2
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp6
-rw-r--r--plugins/FileAsMessage/src/main.cpp2
-rw-r--r--plugins/FloatingContacts/src/main.cpp2
-rw-r--r--plugins/GmailNotifier/src/main.cpp3
-rw-r--r--plugins/HTTPServer/src/GuiElements.cpp2
-rw-r--r--plugins/HTTPServer/src/main.cpp2
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist.cpp2
-rw-r--r--plugins/HistoryStats/src/mu_common.cpp4
-rw-r--r--plugins/IEHistory/src/IEHistory.cpp2
-rw-r--r--plugins/Import/src/main.cpp2
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp4
-rw-r--r--plugins/LotusNotify/src/LotusNotify.cpp2
-rw-r--r--plugins/MenuItemEx/src/main.cpp4
-rw-r--r--plugins/MirLua/src/m_genmenu.cpp38
-rw-r--r--plugins/MirOTR/src/mirotrmenu.cpp68
-rw-r--r--plugins/MirOTR/src/svcs_menu.cpp2
-rwxr-xr-xplugins/Msg_Export/src/main.cpp2
-rw-r--r--plugins/MyDetails/src/frame.cpp2
-rw-r--r--plugins/MyDetails/src/mydetails.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/AwaySys.cpp2
-rw-r--r--plugins/NewEventNotify/src/menuitem.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp2
-rw-r--r--plugins/New_GPG/src/init.cpp53
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp2
-rw-r--r--plugins/NewsAggregator/Src/Menus.cpp2
-rw-r--r--plugins/NoHistory/src/dllmain.cpp2
-rw-r--r--plugins/Non-IM Contact/src/main.cpp2
-rw-r--r--plugins/NotesAndReminders/src/main.cpp4
-rw-r--r--plugins/Nudge/src/main.cpp3
-rw-r--r--plugins/OpenFolder/src/openFolder.cpp2
-rw-r--r--plugins/PackUpdater/Src/PackUpdater.cpp2
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp6
-rw-r--r--plugins/Ping/src/menu.cpp2
-rw-r--r--plugins/Ping/src/pingthread.cpp2
-rw-r--r--plugins/PluginUpdater/src/PluginUpdater.cpp2
-rw-r--r--plugins/Popup/src/main.cpp4
-rw-r--r--plugins/ProfileManager/src/pmanagerEx.cpp2
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp2
-rw-r--r--plugins/Quotes/src/Forex.cpp4
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp2
-rw-r--r--plugins/RemovePersonalSettings/src/rps.cpp5
-rw-r--r--plugins/Restart/src/restart.cpp2
-rw-r--r--plugins/SMS/src/SMS_svc.cpp2
-rw-r--r--plugins/Scriver/src/msgs.cpp2
-rw-r--r--plugins/SecureIM/src/main.cpp4
-rw-r--r--plugins/SeenPlugin/src/menu.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp5
-rw-r--r--plugins/Sessions/Src/Main.cpp2
-rw-r--r--plugins/SimpleAR/src/Main.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp2
-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.cpp11
-rw-r--r--plugins/StopSpamPlus/src/stopspam.cpp2
-rw-r--r--plugins/TabSRMM/src/globals.cpp4
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp2
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp3
-rw-r--r--plugins/UserGuide/src/main.cpp2
-rw-r--r--plugins/UserInfoEx/src/mir_menuitems.cpp10
-rw-r--r--plugins/UserInfoEx/src/svc_email.cpp2
-rw-r--r--plugins/UserInfoEx/src/svc_homepage.cpp2
-rw-r--r--plugins/Weather/src/weather_svcs.cpp2
-rw-r--r--plugins/WebView/src/main.cpp2
-rw-r--r--plugins/WhenWasIt/src/WhenWasIt.cpp2
-rw-r--r--plugins/WhoUsesMyFiles/src/wumfplug.cpp2
-rw-r--r--plugins/XSoundNotify/src/xsn_main.cpp2
-rw-r--r--plugins/YAMN/src/main.cpp2
-rw-r--r--plugins/YAPP/src/yapp.cpp2
-rw-r--r--plugins/ZeroNotification/src/main.cpp2
-rw-r--r--protocols/AimOscar/src/theme.cpp6
-rw-r--r--protocols/FacebookRM/src/theme.cpp6
-rw-r--r--protocols/GTalkExt/src/menu.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/image.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/import.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/links.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/sessions.cpp2
-rw-r--r--protocols/IRCG/src/services.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icq_menu.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp4
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp33
-rw-r--r--protocols/JabberG/src/jabber_privacy.cpp4
-rw-r--r--protocols/JabberG/src/jabber_xstatus.cpp2
-rw-r--r--protocols/MRA/src/Mra_menus.cpp12
-rw-r--r--protocols/MSN/src/msn_menu.cpp4
-rw-r--r--protocols/Sametime/src/conference.cpp2
-rw-r--r--protocols/Sametime/src/sametime_session.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_menus.cpp6
-rw-r--r--protocols/Steam/src/steam_menus.cpp6
-rw-r--r--protocols/Tlen/src/tlen.cpp2
-rw-r--r--protocols/Tox/src/tox_menus.cpp6
-rw-r--r--protocols/Twitter/src/proto.cpp2
-rw-r--r--protocols/Twitter/src/theme.cpp2
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp2
-rw-r--r--protocols/WhatsApp/src/theme.cpp4
-rw-r--r--protocols/Xfire/src/Xfire_game.cpp2
-rw-r--r--protocols/Xfire/src/Xfire_gamelist.cpp2
-rw-r--r--protocols/Xfire/src/main.cpp2
-rw-r--r--protocols/Yahoo/src/services.cpp5
-rw-r--r--src/core/stdaway/src/awaymsg.cpp2
-rw-r--r--src/core/stdemail/src/email.cpp2
-rw-r--r--src/core/stdfile/src/file.cpp4
-rw-r--r--src/core/stdhelp/src/help.cpp2
-rw-r--r--src/core/stdmsg/src/msgs.cpp2
-rw-r--r--src/core/stduihist/src/history.cpp2
-rw-r--r--src/core/stdurl/url.cpp2
-rw-r--r--src/core/stduserinfo/src/userinfo.cpp2
-rw-r--r--src/mir_app/src/chat_svc.cpp2
-rw-r--r--src/mir_app/src/clc.h64
-rw-r--r--src/mir_app/src/clistmenus.cpp23
-rw-r--r--src/mir_app/src/clui.cpp8
-rw-r--r--src/mir_app/src/findadd.cpp2
-rw-r--r--src/mir_app/src/genmenu.cpp5
-rw-r--r--src/mir_app/src/genmenu.h1
-rw-r--r--src/mir_app/src/meta_menu.cpp2
-rw-r--r--src/mir_app/src/movetogroup.cpp4
-rw-r--r--src/mir_app/src/options.cpp2
-rw-r--r--src/mir_app/src/proto_opts.cpp2
158 files changed, 367 insertions, 372 deletions
diff --git a/bin10/lib/mir_app.lib b/bin10/lib/mir_app.lib
index 17885d1af3..aae1acd3af 100644
--- a/bin10/lib/mir_app.lib
+++ b/bin10/lib/mir_app.lib
Binary files differ
diff --git a/bin12/lib/mir_app.lib b/bin12/lib/mir_app.lib
index 17885d1af3..aae1acd3af 100644
--- a/bin12/lib/mir_app.lib
+++ b/bin12/lib/mir_app.lib
Binary files differ
diff --git a/include/delphi/m_genmenu.inc b/include/delphi/m_genmenu.inc
index ad49a1c160..6246276244 100644
--- a/include/delphi/m_genmenu.inc
+++ b/include/delphi/m_genmenu.inc
@@ -167,16 +167,16 @@ type
hLangpack :int;
end;
-function _AddMainMenuItem(mi:PMO_MenuItem; hlang:integer) : HGENMENU; stdcall;
+function _AddMainMenuItem(mi:PMO_MenuItem) : HGENMENU; stdcall;
external AppDll name 'Menu_AddMainMenuItem';
-function _AddContactMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar; hlang:integer) : HGENMENU; stdcall;
+function _AddContactMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall;
external AppDll name 'Menu_AddContactMenuItem';
-function _AddProtoMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar; hlang:integer) : HGENMENU; stdcall;
+function _AddProtoMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall;
external AppDll name 'Menu_AddProtoMenuItem';
-function _AddStatusMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar; hlang:integer) : HGENMENU; stdcall;
+function _AddStatusMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall;
external AppDll name 'Menu_AddStatusMenuItem';
{
diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc
index ac89dd005f..2d1cdadeeb 100644
--- a/include/delphi/m_helpers.inc
+++ b/include/delphi/m_helpers.inc
@@ -392,22 +392,26 @@ end;
function Menu_AddMainMenuItem(mi:PMO_MenuItem):HGENMENU;
begin
- result:=_AddMainMenuItem(mi, hLangpack);
+ mi^.hLangpack:=hLangpack;
+ result:=_AddMainMenuItem(mi);
end;
function Menu_AddContactMenuItem(mi:PMO_MenuItem):HGENMENU;
begin
- result:=_AddContactMenuItem(mi, nil, hLangpack);
+ mi^.hLangpack:=hLangpack;
+ result:=_AddContactMenuItem(mi, nil);
end;
function Menu_AddStatusMenuItem(mi:PMO_MenuItem):HGENMENU;
begin
- result:=_AddStatusMenuItem(mi, nil, hLangpack);
+ mi^.hLangpack:=hLangpack;
+ result:=_AddStatusMenuItem(mi, nil);
end;
function Menu_AddProtoMenuItem(mi:PMO_MenuItem):HGENMENU;
begin
- result:=_AddProtoMenuItem(mi, nil, hLangpack);
+ mi^.hLangpack:=hLangpack;
+ result:=_AddProtoMenuItem(mi, nil);
end;
function Menu_AddTrayMenuItem(mi:PMO_MenuItem):HGENMENU;
diff --git a/include/m_clist.h b/include/m_clist.h
index 803fe25ba5..64105858b8 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -79,7 +79,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// MAIN MENU
// adds a new element into main menu
-EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(TMO_MenuItem *mi, int = hLangpack);
+EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(TMO_MenuItem *mi);
// gets a handle to the main Miranda menu
// returns a HMENU. This need not to be freed since it's owned by clist
@@ -98,7 +98,7 @@ EXTERN_C MIR_APP_DLL(HMENU) Menu_BuildMainMenu(void);
// CONTACT MENU
// adds a new element into contact menu
-EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddContactMenuItem(TMO_MenuItem *mi, const char *pszProto = NULL, int = hLangpack);
+EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddContactMenuItem(TMO_MenuItem *mi, const char *pszProto = NULL);
// builds the context menu for a specific contact
// returns a HMENU identifying the menu. This should be DestroyMenu()ed when
@@ -118,7 +118,7 @@ EXTERN_C MIR_APP_DLL(HMENU) Menu_BuildContactMenu(MCONTACT hContact);
EXTERN_C MIR_APP_DLL(HMENU) Menu_GetStatusMenu(void);
// adds an item to a status menu
-EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddStatusMenuItem(TMO_MenuItem *mi, const char *pszProto = NULL, int = hLangpack);
+EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddStatusMenuItem(TMO_MenuItem *mi, const char *pszProto = NULL);
// the status menu is about to be built
// wParam = lParam = 0
@@ -128,7 +128,7 @@ EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddStatusMenuItem(TMO_MenuItem *mi, const ch
// PROTOCOL MENU
// adds an item to status or main menu, according to the option
-EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddProtoMenuItem(TMO_MenuItem *mi, const char *pszProto = NULL, int = hLangpack);
+EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddProtoMenuItem(TMO_MenuItem *mi, const char *pszProto = NULL);
/////////////////////////////////////////////////////////////////////////////////////////
// GROUP MENU
diff --git a/include/m_genmenu.h b/include/m_genmenu.h
index 20ca70b020..2ea11b239b 100644
--- a/include/m_genmenu.h
+++ b/include/m_genmenu.h
@@ -50,6 +50,17 @@ struct TMO_MenuItem
int hLangpack;
};
+#ifdef __cplusplus
+struct CMenuItem : public TMO_MenuItem
+{
+ CMenuItem()
+ {
+ memset(this, 0, sizeof(CMenuItem));
+ this->hLangpack = ::hLangpack;
+ }
+};
+#endif
+
/*
This structure passed to CheckService.
*/
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp
index a14f14b0a5..b95aa09c46 100644
--- a/plugins/AddContactPlus/src/main.cpp
+++ b/plugins/AddContactPlus/src/main.cpp
@@ -92,7 +92,7 @@ static int OnAccListChanged(WPARAM, LPARAM)
if (hMainMenuItem)
return 0;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 500020001;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = icon.hIcolib;
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp
index 3425b91ab2..2df0dc3414 100644
--- a/plugins/Alarms/src/frame.cpp
+++ b/plugins/Alarms/src/frame.cpp
@@ -541,7 +541,7 @@ int CreateFrame()
// create menu item
CreateServiceFunction(MODULE "/ShowHideReminders", ShowHideMenuFunc);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.hIcolibItem = hIconMenuShowHide;
mi.name.a = LPGEN("Show reminders");
mi.pszService = MODULE "/ShowHideReminders";
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp
index 1207c1c0dc..af14fdceaa 100644
--- a/plugins/Alarms/src/options.cpp
+++ b/plugins/Alarms/src/options.cpp
@@ -692,7 +692,7 @@ void AddMenuItem()
{
if (hMainMenuItem) return;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.hIcolibItem = IcoLib_GetIconHandle("alarms_menu_set");
mi.name.a = "Set alarm";
mi.pszService = MODULE "/NewAlarm";
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp
index 21f2855cf7..ec7224b259 100644
--- a/plugins/AuthState/src/main.cpp
+++ b/plugins/AuthState/src/main.cpp
@@ -197,7 +197,7 @@ extern "C" int __declspec(dllexport) Load(void)
if (bContactMenuItem) {
hAuthMenuSelected = CreateServiceFunction("AuthState/MenuItem", onAuthMenuSelected);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -1999901005;
mi.flags = CMIF_TCHAR;
mi.name.t = LPGENT("Enable AuthState icons");
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp
index b5ae256e82..fa22315402 100644
--- a/plugins/AutoShutdown/src/settingsdlg.cpp
+++ b/plugins/AutoShutdown/src/settingsdlg.cpp
@@ -436,7 +436,7 @@ static HGENMENU hMainMenuItem,hTrayMenuItem;
void SetShutdownMenuItem(bool fActive)
{
/* main menu */
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 2001090000;
if (fActive)
{
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp
index 5e8df39842..3d88738d1e 100644
--- a/plugins/AvatarHistory/src/AvatarDlg.cpp
+++ b/plugins/AvatarHistory/src/AvatarDlg.cpp
@@ -514,7 +514,7 @@ void InitMenuItem()
{
CreateServiceFunction(MS_AVATARHISTORY_SHOWDIALOG, ShowDialogSvc);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.name.t = LPGENT("View Avatar History");
mi.flags = CMIF_TCHAR;
mi.position = 1000090010;
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index 0b23c19211..3c372011a4 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -96,7 +96,7 @@ int ToolbarModuleLoaded(WPARAM wParam,LPARAM lParam)
void InitMenuItems()
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 1000090000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
mi.name.a = LPGEN("View &History");
@@ -120,7 +120,7 @@ void InitTaskMenuItems()
{
if (Options::instance->taskOptions.size() > 0) {
if (hTaskMainMenu == NULL) {
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 500060005;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
mi.name.a = LPGEN("Execute history task");
@@ -137,7 +137,7 @@ void InitTaskMenuItems()
int pos = (int)taskMenus.size();
for (; taskIt != Options::instance->taskOptions.end(); ++taskIt) {
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.pszService = MS_HISTORY_EXECUTE_TASK;
mi.root = hTaskMainMenu;
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp
index 5868bb3d0b..a1dc7f0a8c 100644
--- a/plugins/Boltun/src/boltun.cpp
+++ b/plugins/Boltun/src/boltun.cpp
@@ -597,7 +597,7 @@ extern "C" int __declspec(dllexport) Load(void)
CreateServiceFunction(SERV_CONTACT_NOT_TO_CHAT, ContactClickNotToChat);
CreateServiceFunction(SERV_CONTACT_START_CHATTING, ContactClickStartChatting);
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -50010002; //TODO: check the warning
mi.name.a = BOLTUN_AUTO_CHAT;
mi.pszService = SERV_CONTACT_AUTO_CHAT;
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index 39f892024f..5fd094b91d 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -530,7 +530,7 @@ static int GenMenuInit(WPARAM, LPARAM) // Modify menu item text before to show t
void BossKeyMenuItemInit(void) // Add menu item
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.position = 2000100000;
mi.hIcolibItem = IcoLib_GetIcon("hidemim");
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 89d4c65dda..8e84683491 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -611,7 +611,7 @@ int ModulesLoaded(WPARAM, LPARAM)
if (options.enableMissYou) {
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, onPrebuildContactMenu);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = iconList[2].hIcolib;
mi.position = 200000;
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index 4178be4dc9..23c1d0142f 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -43,7 +43,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
int MainInit(WPARAM, LPARAM)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 10;
mi.hIcolibItem = LoadIcon(hInst,MAKEINTRESOURCE(IDI_POUNCE));
mi.name.a = LPGEN("&Buddy Pounce");
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp
index 342bdb9c09..2c5adcd426 100644
--- a/plugins/CSList/src/cslist.cpp
+++ b/plugins/CSList/src/cslist.cpp
@@ -238,7 +238,7 @@ void addProtoStatusMenuItem(char *protoName)
if (!ServiceExists(buf))
CreateServiceFunctionParam(buf, showList, (LPARAM)protoName);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = forms[0].hIcoLibItem;
mi.name.t = _T(MODULENAME);
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index 1ba947c761..582a1d711e 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -327,7 +327,7 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam)
CreateServiceFunction(MS_CCN_TOGGLEPOPUPS, srvTogglePopups);
HookEvent(ME_CLIST_PREBUILDMAINMENU, PrebuildMainMenu);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
mi.flags = CMIF_TCHAR;
if (g_PopupOptPage.GetDBValueCopy(IDC_POPUPOPTDLG_POPUPNOTIFY))
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
index 00c1caa893..23f7be034e 100644
--- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
@@ -767,7 +767,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp
int framepos = id2pos(frameid);
FrameMenuHandles &fmh = (frameid == -1) ? cont : g_pfwFrames[framepos].MenuHandles;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = root;
mi.position = popuppos++;
mi.name.a = LPGEN("&Visible");
@@ -1487,7 +1487,7 @@ static int CLUIFramesLoadMainMenu()
}
// create root menu
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME);
mi.position = 3000090000;
mi.name.a = LPGEN("Frames");
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
index 163d920fcd..48554635ce 100644
--- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
@@ -222,7 +222,7 @@ void InitGroupMenus(void)
Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSGroup/GroupMenuonAddService");
// add exit command to menu
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 1900000;
mi.pszService = "CloseAction";
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
@@ -460,7 +460,7 @@ void InitSubGroupMenus(void)
// add exit command to menu
GroupMenuParam gmp;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 1000;
mi.hIcolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp
index 90850f414b..068a34b237 100644
--- a/plugins/Clist_modern/src/modern_clistmenus.cpp
+++ b/plugins/Clist_modern/src/modern_clistmenus.cpp
@@ -99,7 +99,7 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM)
BOOL bModifyMenu = FALSE;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.hIcolibItem = iconList[bContactRate].hIcolib;
mi.flags = CMIF_TCHAR;
if (!bContactRate)
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp
index f66e4c2456..7e2fcf48e5 100644
--- a/plugins/Clist_modern/src/modern_clisttray.cpp
+++ b/plugins/Clist_modern/src/modern_clisttray.cpp
@@ -309,7 +309,7 @@ void InitTrayMenus(void)
Menu_ConfigureObject(hTrayMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSTRAY/TrayMenuonAddService");
// add exit command to menu
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 900000;
mi.pszService = "CloseAction";
mi.name.a = LPGEN("E&xit");
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 0c02b4fb12..d3711780ac 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -335,7 +335,7 @@ HRESULT CLUI::RegisterAvatarMenu()
{
Icon_RegisterT(g_hInst, LPGENT("Contact list"), iconItem, _countof(iconItem));
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
CreateServiceFunction("CList/ShowContactAvatar", CLUI::Service_Menu_ShowContactAvatar);
mi.position = 2000150000;
mi.hIcolibItem = iconItem[0].hIcolib;
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
index d8b1a8c031..7d8c2a83dc 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
@@ -582,7 +582,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, boo
int framepos = id2pos(frameid);
FrameMenuHandles &fmh = (frameid == -1) ? cont : Frames[framepos].MenuHandles;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.root = root;
mi.position = popuppos++;
@@ -1338,7 +1338,7 @@ static int CLUIFramesLoadMainMenu()
}
// create root menu
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME);
mi.position = 3000090000;
mi.name.a = LPGEN("Frames");
diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
index 137fe1b888..7f7a15e2a7 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
@@ -227,7 +227,7 @@ void InitGroupMenus(void)
// add exit command to menu
GroupMenuParam gmp;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 1900000;
mi.pszService = "CloseAction";
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
@@ -451,7 +451,7 @@ void InitSubGroupMenus(void)
// add exit command to menu
GroupMenuParam gmp;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 1000;
mi.hIcolibItem = iconItem[0].hIcolib;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp
index 458f460bc0..19b39e3c06 100644
--- a/plugins/Clist_nicer/src/clistmenus.cpp
+++ b/plugins/Clist_nicer/src/clistmenus.cpp
@@ -381,7 +381,7 @@ int InitCustomMenus(void)
CreateServiceFunction("CloseAction", CloseAction);
CreateServiceFunction("CList/SetContactIgnore", SetContactIgnore);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 200000;
mi.pszService = "CList/SetContactIgnore";
mi.hIcolibItem = iconItem[1].hIcolib;
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp
index d6493662f7..59237178d6 100644
--- a/plugins/Console/src/Console.cpp
+++ b/plugins/Console/src/Console.cpp
@@ -1159,7 +1159,7 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM)
if (hwndConsole && IsWindow(hwndConsole)) {
HookEvent(ME_TTB_MODULELOADED, OnTTBLoaded);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = hIcons[0];
mi.position = 1900000000;
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp
index 5e6ea3876d..fbe9646e7b 100644
--- a/plugins/ContactsPlus/src/main.cpp
+++ b/plugins/ContactsPlus/src/main.cpp
@@ -135,7 +135,7 @@ static int HookModulesLoaded(WPARAM, LPARAM)
modules[0] = MODULENAME;
CallService("DBEditorpp/RegisterModule", (WPARAM)modules, 1);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.name.a = LPGEN("Contacts");
mi.position = -2000009990; //position in menu
mi.pszService = MS_CONTACTS_SEND;
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp
index 178a79af61..df5d273ae1 100644
--- a/plugins/CrashDumper/src/crshdmp.cpp
+++ b/plugins/CrashDumper/src/crshdmp.cpp
@@ -255,7 +255,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
FoldersPathChanged(0, 0);
}
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Version Information"), 2000089999, GetIconHandle(IDI_VI));
mi.position = 2000089995;
diff --git a/plugins/CyrTranslit/src/MirandaContact.cpp b/plugins/CyrTranslit/src/MirandaContact.cpp
index 0b5d76a1de..a14a6fcbd8 100644
--- a/plugins/CyrTranslit/src/MirandaContact.cpp
+++ b/plugins/CyrTranslit/src/MirandaContact.cpp
@@ -63,7 +63,7 @@ void MirandaContact::save(MCONTACT hContact, bool bValue)
void MirandaContact::addMenuItem()
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.name.a = MENU_ITEM_TEXT;
mi.position = 65535;
mi.pszService = MENU_COMMAND_CALLBACK_SERVICE;
diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp
index 9a89d770e0..37ba22f78a 100644
--- a/plugins/Db3x_mmap/src/ui.cpp
+++ b/plugins/Db3x_mmap/src/ui.cpp
@@ -311,7 +311,7 @@ static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM)
HookEventObj(ME_OPT_INITIALISE, OnOptionsInit, db);
// main menu item
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.name.t = LPGENT("Database");
mi.position = 500000000;
mi.flags = CMIF_TCHAR;
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp
index 32e9f17afc..09ac4ea105 100644
--- a/plugins/DbEditorPP/src/main.cpp
+++ b/plugins/DbEditorPP/src/main.cpp
@@ -113,7 +113,7 @@ int ModulesLoaded(WPARAM, LPARAM)
IcoLibRegister();
// Register menu item
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), 1900000001);
mi.position = 1900000001;
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp
index fc9443facd..8696288cd5 100644
--- a/plugins/Db_autobackups/src/main.cpp
+++ b/plugins/Db_autobackups/src/main.cpp
@@ -99,7 +99,7 @@ int ModulesLoad(WPARAM, LPARAM)
CreateServiceFunction(MS_AB_BACKUP, ABService);
CreateServiceFunction(MS_AB_SAVEAS, DBSaveAs);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), 500100000);
mi.name.a = LPGEN("Backup profile");
diff --git a/plugins/Dropbox/src/dropbox_menus.cpp b/plugins/Dropbox/src/dropbox_menus.cpp
index 0a9326c4b2..d9a0a13555 100644
--- a/plugins/Dropbox/src/dropbox_menus.cpp
+++ b/plugins/Dropbox/src/dropbox_menus.cpp
@@ -15,7 +15,7 @@ INT_PTR CDropbox::SendFilesToDropboxCommand(void *obj, WPARAM hContact, LPARAM)
void CDropbox::InitializeMenus()
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.pszService = MODULE"/SendFilesToDropbox";
mi.name.a = LPGEN("Upload files to Dropbox");
mi.position = -2000020000 + CMI_SEND_FILES;
diff --git a/plugins/Exchange/src/hooked_events.cpp b/plugins/Exchange/src/hooked_events.cpp
index b703411029..2771de7682 100644
--- a/plugins/Exchange/src/hooked_events.cpp
+++ b/plugins/Exchange/src/hooked_events.cpp
@@ -60,7 +60,7 @@ int OnModulesLoaded(WPARAM, LPARAM)
{
UpdateTimers();
- TMO_MenuItem mi = {0};
+ CMenuItem mi;
mi.hIcolibItem = hiMailIcon;
mi.position = 10000000;
mi.pszService = MS_EXCHANGE_CHECKEMAIL;
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index 8efff07d42..46a8998de9 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -91,8 +91,8 @@ void InitMenuItems()
{
TCHAR stzName[256];
- TMO_MenuItem mi = { 0 };
- mi.flags = CMIF_TCHAR;
+ CMenuItem mi;
+ mi.flags = CMIF_TCHAR;
mi.hIcolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
mi.name.t = LPGENT("FTP File");
@@ -104,7 +104,7 @@ void InitMenuItems()
memset(&mi, 0, sizeof(mi));
mi.name.t = stzName;
- TMO_MenuItem mi2 = { 0 };
+ CMenuItem mi2;
mi2.flags = CMIF_TCHAR;
mi2.pszService = MS_FTPFILE_CONTACTMENU;
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp
index ba4e89ce5d..3bd42de919 100644
--- a/plugins/FileAsMessage/src/main.cpp
+++ b/plugins/FileAsMessage/src/main.cpp
@@ -174,7 +174,7 @@ static int OnModulesLoaded(WPARAM wparam, LPARAM lparam)
hHookSkinIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, OnSkinIconsChanged);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 200011;
mi.hIcolibItem = hIcons[ICON_MAIN];
mi.name.a = LPGEN("File As Message...");
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp
index fbb50fda32..42d089bbcc 100644
--- a/plugins/FloatingContacts/src/main.cpp
+++ b/plugins/FloatingContacts/src/main.cpp
@@ -716,7 +716,7 @@ static void LoadMenus()
// Remove thumb menu item
CreateServiceFunction(MODULE "/RemoveThumb", OnContactMenu_Remove);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 0xFFFFF;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_HIDE));
diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp
index a88f53d9ac..d6c8413266 100644
--- a/plugins/GmailNotifier/src/main.cpp
+++ b/plugins/GmailNotifier/src/main.cpp
@@ -134,9 +134,8 @@ extern "C" int __declspec(dllexport) Load()
CreateServiceFunction(MODULE_NAME "/MenuCommand", PluginMenuCommand);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -0x7FFFFFFF;
- mi.flags = 0;
mi.hIcolibItem = Skin_LoadProtoIcon(MODULE_NAME, ID_STATUS_ONLINE);
mi.name.a = LPGEN("&Check all Gmail inboxes");
mi.pszService = MODULE_NAME "/MenuCommand";
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp
index dfa4e02adb..176e0894cf 100644
--- a/plugins/HTTPServer/src/GuiElements.cpp
+++ b/plugins/HTTPServer/src/GuiElements.cpp
@@ -1461,7 +1461,7 @@ void InitGuiElements()
hShareNewFileService = CreateServiceFunction(MS_SHARE_NEW_FILE, nShareNewFile);
hShowStatisticsViewService = CreateServiceFunction(MS_SHOW_STATISTICS_VIEW, nShowStatisticsView);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.hIcolibItem = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
mi.position = -2000019955;
mi.name.t = LPGENT("HTTP Share new file");
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp
index 2d6d70b2c1..d7ff1aa033 100644
--- a/plugins/HTTPServer/src/main.cpp
+++ b/plugins/HTTPServer/src/main.cpp
@@ -921,7 +921,7 @@ extern "C" __declspec(dllexport) int Load()
indexCreationMode = (eIndexCreationMode) db_get_b(NULL, MODULE, "IndexCreationMode", 2);
if (db_get_b(NULL, MODULE, "AddAcceptConMenuItem", 1)) {
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
mi.position = 1000085000;
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp
index e610ebac92..346b948eb0 100644
--- a/plugins/HistoryLinkListPlus/src/linklist.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist.cpp
@@ -58,7 +58,7 @@ extern "C" __declspec(dllexport) int Load(void)
CreateServiceFunction("Linklist/MenuCommand", LinkList_Main);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON));
mi.name.t = LPGENT("&Create Linklist");
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp
index 393bf4ef5e..e5508dade9 100644
--- a/plugins/HistoryStats/src/mu_common.cpp
+++ b/plugins/HistoryStats/src/mu_common.cpp
@@ -15,7 +15,7 @@ namespace mu
HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, HGENMENU hRoot)
{
// TODO: support for unicode-core with unicode-aware CList
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.name.t = (TCHAR*)pszName;
mi.flags = flags | CMIF_TCHAR;
mi.position = position;
@@ -28,7 +28,7 @@ namespace mu
HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService)
{
// TODO: support for unicode-core with unicode-aware CList
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.name.t = (TCHAR*)pszName;
mi.flags = flags | CMIF_TCHAR;
mi.position = position;
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp
index a89a5b20b0..47e54052ec 100644
--- a/plugins/IEHistory/src/IEHistory.cpp
+++ b/plugins/IEHistory/src/IEHistory.cpp
@@ -75,7 +75,7 @@ extern "C" int __declspec(dllexport) Load(void)
InitServices();
/// menu items
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.name.t = LPGENT("View &history");
mi.flags = CMIF_TCHAR;
mi.position = 1000090000;
diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp
index a67ba073b1..d588c56c25 100644
--- a/plugins/Import/src/main.cpp
+++ b/plugins/Import/src/main.cpp
@@ -114,7 +114,7 @@ extern "C" __declspec(dllexport) int Load(void)
RegisterIcons();
// menu item
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.hIcolibItem = GetIconHandle(IDI_IMPORT);
mi.name.a = LPGEN("&Import...");
mi.position = 500050000;
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index cf48eb104d..a097967f22 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -192,7 +192,7 @@ void RebuildMenu()
TCHAR text[512];
mir_sntprintf(text, TranslateT("Send to %s"), info->account);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 100000 + i;
mi.root = hMainMenuGroup;
mi.position = 500080000 + i;
@@ -293,7 +293,7 @@ int ModulesLoaded(WPARAM, LPARAM)
}
// Add main menu item
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 500080000;
mi.name.t = LPGENT("Listening to");
mi.flags = CMIF_TCHAR;
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp
index 854ad888c3..677c6f9ae5 100644
--- a/plugins/LotusNotify/src/LotusNotify.cpp
+++ b/plugins/LotusNotify/src/LotusNotify.cpp
@@ -1727,7 +1727,7 @@ extern "C" int __declspec(dllexport) Load(void)
//function that will be called on menu click
hMenuService = CreateServiceFunction("LotusNotify/MenuCommand", PluginMenuCommand);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -0x7FFFFFFF; //on top menu position
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ICON1));
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index ddb951e06e..a917c63bcd 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -735,7 +735,7 @@ INT_PTR onIgnore(WPARAM wparam, LPARAM lparam)
static HGENMENU AddSubmenuItem(HGENMENU hRoot, TCHAR* name, HICON icon, DWORD flag, char* service, int pos, int param)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = hRoot;
mi.position = pos;
mi.name.t = name;
@@ -960,7 +960,7 @@ static int PluginInit(WPARAM, LPARAM)
ModuleLoad(0, 0);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_UNICODE;
mi.position = 120000;
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp
index f2839d9a82..ac53d9b070 100644
--- a/plugins/MirLua/src/m_genmenu.cpp
+++ b/plugins/MirLua/src/m_genmenu.cpp
@@ -1,44 +1,41 @@
#include "stdafx.h"
-static TMO_MenuItem* MakeMenuItem(lua_State *L)
+static void MakeMenuItem(lua_State *L, CMenuItem &mi)
{
- TMO_MenuItem *pmi = (TMO_MenuItem*)mir_calloc(sizeof(TMO_MenuItem));
- pmi->hLangpack = hScriptsLangpack;
+ mi.hLangpack = hScriptsLangpack;
lua_pushstring(L, "Flags");
lua_gettable(L, -2);
- pmi->flags = lua_tointeger(L, -1);
+ mi.flags = lua_tointeger(L, -1);
lua_pop(L, 1);
- if (!(pmi->flags & CMIF_UNICODE))
- pmi->flags |= CMIF_UNICODE;
+ if (!(mi.flags & CMIF_UNICODE))
+ mi.flags |= CMIF_UNICODE;
lua_pushstring(L, "Name");
lua_gettable(L, -2);
- pmi->name.t = mir_utf8decodeT((char*)luaL_checkstring(L, -1));
+ mi.name.t = mir_utf8decodeT((char*)luaL_checkstring(L, -1));
lua_pop(L, 1);
lua_pushstring(L, "Position");
lua_gettable(L, -2);
- pmi->position = lua_tointeger(L, -1);
+ mi.position = lua_tointeger(L, -1);
lua_pop(L, 1);
lua_pushstring(L, "Icon");
lua_gettable(L, -2);
- pmi->hIcolibItem = (HANDLE)lua_touserdata(L, -1);
+ mi.hIcolibItem = (HANDLE)lua_touserdata(L, -1);
lua_pop(L, 1);
lua_pushstring(L, "Service");
lua_gettable(L, -2);
- pmi->pszService = (char*)lua_tostring(L, -1);
+ mi.pszService = (char*)lua_tostring(L, -1);
lua_pop(L, 1);
lua_pushstring(L, "Parent");
lua_gettable(L, -2);
- pmi->root = (HGENMENU)lua_touserdata(L, -1);
+ mi.root = (HGENMENU)lua_touserdata(L, -1);
lua_pop(L, 1);
-
- return pmi;
}
static int lua_AddMainMenuItem(lua_State *L)
@@ -49,9 +46,10 @@ static int lua_AddMainMenuItem(lua_State *L)
return 1;
}
- mir_ptr<TMO_MenuItem> pmi(MakeMenuItem(L));
+ CMenuItem mi;
+ MakeMenuItem(L, mi);
- HGENMENU res = ::Menu_AddMainMenuItem(pmi, hScriptsLangpack);
+ HGENMENU res = ::Menu_AddMainMenuItem(&mi);
lua_pushlightuserdata(L, res);
return 1;
@@ -65,9 +63,10 @@ static int lua_AddContactMenuItem(lua_State *L)
return 1;
}
- mir_ptr<TMO_MenuItem> pmi(MakeMenuItem(L));
+ CMenuItem mi;
+ MakeMenuItem(L, mi);
- HGENMENU res = ::Menu_AddContactMenuItem(pmi, NULL, hScriptsLangpack);
+ HGENMENU res = ::Menu_AddContactMenuItem(&mi, NULL);
lua_pushlightuserdata(L, res);
return 1;
@@ -81,9 +80,10 @@ static int lua_AddTrayMenuItem(lua_State *L)
return 1;
}
- mir_ptr<TMO_MenuItem> pmi(MakeMenuItem(L));
+ CMenuItem mi;
+ MakeMenuItem(L, mi);
- HGENMENU res = (HGENMENU)::CallService("CList/AddTrayMenuItem", 0, (LPARAM)pmi);
+ HGENMENU res = (HGENMENU)::CallService("CList/AddTrayMenuItem", 0, (LPARAM)&mi);
lua_pushlightuserdata(L, res);
return 1;
diff --git a/plugins/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/src/mirotrmenu.cpp
index b4459382f4..e946b25199 100644
--- a/plugins/MirOTR/src/mirotrmenu.cpp
+++ b/plugins/MirOTR/src/mirotrmenu.cpp
@@ -169,40 +169,40 @@ void InitMirOTRMenu(void)
Menu_ConfigureObject(hMirOTRMenuObject, MCO_OPT_ONADD_SERVICE, "MIROTRMENUS/OnAddMenuItemMirOTRMenu");
// menu items
- TMO_MenuItem tmi = { 0 };
- tmi.flags = CMIF_DISABLED | CMIF_TCHAR;
- tmi.name.t = LPGENT("OTR Status");
- tmi.position = 0;
- hStatusInfoItem = AddMirOTRMenuItem(&tmi, NULL);
-
- tmi.flags = CMIF_TCHAR | CMIF_NOTPRIVATE | CMIF_NOTUNVERIFIED;
- tmi.name.t = LANG_MENU_START;
- tmi.position = 100001;
- tmi.hIcolibItem = IcoLib_GetIconHandle(ICON_UNVERIFIED);
- AddMirOTRMenuItem(&tmi, MS_OTR_MENUSTART);
-
- tmi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED;
- tmi.name.t = LANG_MENU_REFRESH;
- tmi.position = 100002;
- tmi.hIcolibItem = IcoLib_GetIconHandle(ICON_FINISHED);
- AddMirOTRMenuItem(&tmi, MS_OTR_MENUREFRESH);
-
- tmi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE;
- tmi.name.t = LANG_MENU_STOP;
- tmi.position = 100003;
- tmi.hIcolibItem = IcoLib_GetIconHandle(ICON_NOT_PRIVATE);
- AddMirOTRMenuItem(&tmi, MS_OTR_MENUSTOP);
-
- tmi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED;
- tmi.name.t = LANG_MENU_VERIFY;
- tmi.position = 200001;
- tmi.hIcolibItem = IcoLib_GetIconHandle(ICON_PRIVATE);
- AddMirOTRMenuItem(&tmi, MS_OTR_MENUVERIFY);
-
- tmi.flags = CMIF_TCHAR | CMIF_CHECKED;
- tmi.name.t = LANG_MENU_TOGGLEHTML;
- tmi.position = 300001;
- hHTMLConvMenuItem = AddMirOTRMenuItem(&tmi, MS_OTR_MENUTOGGLEHTML);
+ CMenuItem mi;
+ mi.flags = CMIF_DISABLED | CMIF_TCHAR;
+ mi.name.t = LPGENT("OTR Status");
+ mi.position = 0;
+ hStatusInfoItem = AddMirOTRMenuItem(&mi, NULL);
+
+ mi.flags = CMIF_TCHAR | CMIF_NOTPRIVATE | CMIF_NOTUNVERIFIED;
+ mi.name.t = LANG_MENU_START;
+ mi.position = 100001;
+ mi.hIcolibItem = IcoLib_GetIconHandle(ICON_UNVERIFIED);
+ AddMirOTRMenuItem(&mi, MS_OTR_MENUSTART);
+
+ mi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED;
+ mi.name.t = LANG_MENU_REFRESH;
+ mi.position = 100002;
+ mi.hIcolibItem = IcoLib_GetIconHandle(ICON_FINISHED);
+ AddMirOTRMenuItem(&mi, MS_OTR_MENUREFRESH);
+
+ mi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE;
+ mi.name.t = LANG_MENU_STOP;
+ mi.position = 100003;
+ mi.hIcolibItem = IcoLib_GetIconHandle(ICON_NOT_PRIVATE);
+ AddMirOTRMenuItem(&mi, MS_OTR_MENUSTOP);
+
+ mi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED;
+ mi.name.t = LANG_MENU_VERIFY;
+ mi.position = 200001;
+ mi.hIcolibItem = IcoLib_GetIconHandle(ICON_PRIVATE);
+ AddMirOTRMenuItem(&mi, MS_OTR_MENUVERIFY);
+
+ mi.flags = CMIF_TCHAR | CMIF_CHECKED;
+ mi.name.t = LANG_MENU_TOGGLEHTML;
+ mi.position = 300001;
+ hHTMLConvMenuItem = AddMirOTRMenuItem(&mi, MS_OTR_MENUTOGGLEHTML);
}
void UninitMirOTRMenu(void)
diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp
index 585463f2bd..bc905375aa 100644
--- a/plugins/MirOTR/src/svcs_menu.cpp
+++ b/plugins/MirOTR/src/svcs_menu.cpp
@@ -158,7 +158,7 @@ void InitMenu()
CreateServiceFunction(MS_OTR_MENUVERIFY, SVC_VerifyOTR);
CreateServiceFunction(MS_OTR_MENUTOGGLEHTML, SVC_ToggleHTMLOTR);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
mi.position = -400000;
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp
index 6ef3c4bd23..3d5f8b4258 100755
--- a/plugins/Msg_Export/src/main.cpp
+++ b/plugins/Msg_Export/src/main.cpp
@@ -114,7 +114,7 @@ int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/)
if (!bReplaceHistory)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.hIcolibItem = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_EXPORT_MESSAGE));
mi.position = 1000090100;
mi.name.a = LPGEN("Open E&xported History");
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp
index 4f51a056ce..e2ef8a528c 100644
--- a/plugins/MyDetails/src/frame.cpp
+++ b/plugins/MyDetails/src/frame.cpp
@@ -327,7 +327,7 @@ int CreateFrame()
// Create menu item
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("My details"), 500010000);
mi.position = 1;
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp
index cc23b3614b..bd24408f56 100644
--- a/plugins/MyDetails/src/mydetails.cpp
+++ b/plugins/MyDetails/src/mydetails.cpp
@@ -87,7 +87,7 @@ static int MainInit(WPARAM, LPARAM)
InitProtocolData();
// Add options to menu
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 500050000;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp
index 4d17b5c912..db811ac233 100644
--- a/plugins/NewAwaySysMod/src/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/src/AwaySys.cpp
@@ -611,7 +611,7 @@ int MirandaLoaded(WPARAM, LPARAM)
int SendOnEvent = CContactSettings(g_ProtoStates[(char*)NULL].Status).Autoreply;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 1000020000;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
mi.hIcolibItem = iconList[SendOnEvent ? 1 : 0].hIcolib;
diff --git a/plugins/NewEventNotify/src/menuitem.cpp b/plugins/NewEventNotify/src/menuitem.cpp
index 793d817400..1db8e070c0 100644
--- a/plugins/NewEventNotify/src/menuitem.cpp
+++ b/plugins/NewEventNotify/src/menuitem.cpp
@@ -50,7 +50,7 @@ int MenuitemInit(BOOL bStatus)
{
CreateServiceFunction(MS_NEN_MENUNOTIFY, MenuitemNotifyCmd);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
mi.position = 1;
mi.hIcolibItem = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ENABLED));
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 1526fb059a..b9e9943437 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -1073,7 +1073,7 @@ INT_PTR EnableDisableMenuCommand(WPARAM, LPARAM)
void InitMainMenuItem()
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
if (ServiceExists(MS_POPUP_ADDPOPUPT))
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index bc25e2f519..19d274ed51 100644
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -176,45 +176,36 @@ extern "C" int __declspec(dllexport) Load()
CreateServiceFunction("/ExportGPGKeys",ExportGpGKeys);
CreateServiceFunction("/ImportGPGKeys",ImportGpGKeys);
- // !!!!!!!! check it later
- TMO_MenuItem mi = { 0 };
- mi.position=-0x7FFFFFFF;
- mi.flags=CMIF_TCHAR;
- mi.hIcolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.name.t=LPGENT("Load GPG public key");
- mi.pszService="/LoadPubKey";
+ CMenuItem mi;
+ mi.position = -0x7FFFFFFF;
+ mi.flags = CMIF_TCHAR;
+ mi.hIcolibItem = 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.hIcolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.name.t=LPGENT("Toggle GPG encryption");
- mi.pszService="/ToggleEncryption";
+ mi.position = -0x7FFFFFFe;
+ mi.hIcolibItem = 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.hIcolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.name.t=LPGENT("Send public key");
- mi.pszService="/SendKey";
+ mi.position = -0x7FFFFFFd;
+ mi.hIcolibItem = 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.hIcolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.name.t=LPGENT("Export GPG Public keys");
- mi.pszService="/ExportGPGKeys";
+ mi.position = -0x7FFFFFFe;
+ mi.hIcolibItem = 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.hIcolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.name.t=LPGENT("Import GPG Public keys");
- mi.pszService="/ImportGPGKeys";
+ mi.position = -0x7FFFFFFF;
+ mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
+ mi.name.t = LPGENT("Import GPG Public keys");
+ mi.pszService = "/ImportGPGKeys";
hImportGpgKeys = Menu_AddMainMenuItem(&mi);
InitIconLib();
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index 9443362054..356657bb19 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -235,7 +235,7 @@ int OnPreBuildContactMenu(WPARAM w, LPARAM l)
{
MCONTACT hContact = db_mc_tryMeta(w);
{
- TMO_MenuItem mi2 = { 0 };
+ CMenuItem mi2;
LPSTR proto = GetContactProto(hContact);
PROTOACCOUNT *acc = Proto_GetAccount(proto);
std::string setting;
diff --git a/plugins/NewsAggregator/Src/Menus.cpp b/plugins/NewsAggregator/Src/Menus.cpp
index c4b49cfb77..8fcd74890f 100644
--- a/plugins/NewsAggregator/Src/Menus.cpp
+++ b/plugins/NewsAggregator/Src/Menus.cpp
@@ -23,7 +23,7 @@ HGENMENU hService2[7];
void InitMenu()
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("News Aggregator"), 500099000);
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index a788d5495e..02040b72c8 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -245,7 +245,7 @@ void SrmmMenu_Load()
int ModulesLoaded(WPARAM wParam, LPARAM lParam)
{
// create contact menu item
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.position = -300010;
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp
index bc0e18dddd..b456c1c839 100644
--- a/plugins/Non-IM Contact/src/main.cpp
+++ b/plugins/Non-IM Contact/src/main.cpp
@@ -141,7 +141,7 @@ extern "C" __declspec(dllexport) int Load()
CreateServiceFunction("TestStringReplaceLine", testStringReplacer);
CreateServiceFunction("NIM_Contact/DoubleClick", doubleClick);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 600090000;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("&Non-IM Contact"), 600090000);
mi.name.a = LPGEN("&Add Non-IM Contact");
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp
index 3d139845df..a2539f9eb5 100644
--- a/plugins/NotesAndReminders/src/main.cpp
+++ b/plugins/NotesAndReminders/src/main.cpp
@@ -175,7 +175,7 @@ static void InitServices()
/////////////////////////////////////////////////////////////////////////////////////////
-static void addMenuItem(TMO_MenuItem &mi)
+static void addMenuItem(CMenuItem &mi)
{
if (g_AddContListMI) {
HGENMENU save = mi.root; mi.root = NULL;
@@ -194,7 +194,7 @@ int OnModulesLoaded(WPARAM wparam, LPARAM lparam)
g_AddContListMI = (BOOL)db_get_dw(0,MODULENAME,"AddContactMenuItems",1);
// register menus
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Notes && Reminders"), 1600000000);
mi.flags = CMIF_TCHAR;
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index 36265315f0..d60b9901a3 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -336,8 +336,7 @@ extern "C" int __declspec(dllexport) Load(void)
CreateServiceFunction(MS_NUDGE_SHOWMENU, NudgeShowMenu);
// Add contact menu entry
- TMO_MenuItem mi = { 0 };
- // mi.popupPosition = 500085000; !!!!!!!!!!!!!!!!!!!!!
+ CMenuItem mi;
mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
mi.position = -500050004;
mi.hIcolibItem = iconList[0].hIcolib;
diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp
index 646cb0b0b8..fb2aea650f 100644
--- a/plugins/OpenFolder/src/openFolder.cpp
+++ b/plugins/OpenFolder/src/openFolder.cpp
@@ -97,7 +97,7 @@ extern "C" int __declspec(dllexport) Load()
hotkey.DefHotKey = MAKEWORD( 'O', HOTKEYF_SHIFT | HOTKEYF_ALT );
Hotkey_Register(&hotkey);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = icon.hIcolib;
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp
index 5f5934e58f..81c0ae8538 100644
--- a/plugins/PackUpdater/Src/PackUpdater.cpp
+++ b/plugins/PackUpdater/Src/PackUpdater.cpp
@@ -70,7 +70,7 @@ extern "C" __declspec(dllexport) int Load(void)
// Add cheking update menu item
CreateServiceFunction(MODNAME"/CheckUpdates", MenuCommand);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = IcoLib_GetIcon("check_update");
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index 7c0e1f1296..7091aa87c4 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -291,8 +291,8 @@ INT_PTR ContactMenuService(WPARAM hContact, LPARAM lParam)
void InitMenuItems()
{
- TMO_MenuItem mi = { 0 };
- mi.flags = CMIF_TCHAR;
+ CMenuItem mi;
+ mi.flags = CMIF_TCHAR;
mi.hIcolibItem = icon.hIcolib;
mi.position = 3000090005;
mi.name.t = LPGENT("Paste It");
@@ -313,7 +313,7 @@ void InitMenuItems()
HGENMENU hDefWebMenu = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hDefWebMenu, MCI_OPT_EXECPARAM, DEF_PAGES_START - 1);
- TMO_MenuItem mi2 = { 0 };
+ CMenuItem mi2;
mi2.pszService = MS_PASTEIT_CONTACTMENU;
mi2.root = hDefWebMenu;
for (int i = 0; i < PasteToWeb::pages; ++i)
diff --git a/plugins/Ping/src/menu.cpp b/plugins/Ping/src/menu.cpp
index d70e28aaa5..ad5a466e62 100644
--- a/plugins/Ping/src/menu.cpp
+++ b/plugins/Ping/src/menu.cpp
@@ -6,7 +6,7 @@ HANDLE hEventMenuBuild;
void InitMenus()
{
// main menu
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Ping"), 500099900);
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp
index 68a3821cb2..859383a892 100644
--- a/plugins/Ping/src/pingthread.cpp
+++ b/plugins/Ping/src/pingthread.cpp
@@ -991,7 +991,7 @@ void InitList()
CreateServiceFunction(PLUG "/ShowWindow", PingPlugShowWindow);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Ping"), 1000200001);
mi.position = 3000320001;
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp
index a1c87820d8..6a77bb1c49 100644
--- a/plugins/PluginUpdater/src/PluginUpdater.cpp
+++ b/plugins/PluginUpdater/src/PluginUpdater.cpp
@@ -86,7 +86,7 @@ extern "C" __declspec(dllexport) int Load(void)
InitCheck();
#if MIRANDA_VER >= 0x0A00
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.name.a = LPGEN("Check for updates");
mi.hIcolibItem = iconList[0].hIcolib;
#else
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index 88206532ed..287668c2b1 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -179,8 +179,7 @@ INT_PTR svcShowHistory(WPARAM, LPARAM)
void InitMenuItems(void)
{
- TMO_MenuItem mi = { 0 };
- // support new genmenu style
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
// Build main menu
@@ -191,7 +190,6 @@ void InitMenuItems(void)
// Add item to main menu
mi.root = (HGENMENU)hMenuRoot;
-
mi.pszService = MENUCOMMAND_SVC;
CreateServiceFunction(mi.pszService, svcEnableDisableMenuCommand);
mi.name.t = PopupOptions.ModuleIsEnabled ? LPGENT("Disable Popups") : LPGENT("Enable Popups");
diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp
index a0fb15e595..822c0e4c74 100644
--- a/plugins/ProfileManager/src/pmanagerEx.cpp
+++ b/plugins/ProfileManager/src/pmanagerEx.cpp
@@ -94,7 +94,7 @@ static IconItem iconList[] =
static int OnModulesLoaded(WPARAM, LPARAM)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), -500200000);
for (int i = 0; i < _countof(iconList); i++) {
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 3edd5741d8..8993b1578b 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -184,7 +184,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
hIml = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST,0,0);
// Add menu item
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 500100001;
mi.flags = CMIF_TCHAR;
mi.name.t = LPGENT("Quick Contacts...");
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp
index 6aea04d719..22ced59186 100644
--- a/plugins/Quotes/src/Forex.cpp
+++ b/plugins/Quotes/src/Forex.cpp
@@ -77,7 +77,7 @@ INT_PTR QuotesMenu_EnableDisable(WPARAM, LPARAM)
void InitMenu()
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Quotes"), 0, Quotes_GetIconHandle(IDI_ICON_MAIN));
@@ -122,7 +122,7 @@ void InitMenu()
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, Quotes_PrebuildContactMenu);
if (bSubGroups) {
- TMO_MenuItem miroot = { 0 };
+ CMenuItem miroot;
miroot.hIcolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
miroot.name.a = QUOTES_PROTOCOL_NAME;
mi.root = Menu_AddContactMenuItem(&miroot, QUOTES_PROTOCOL_NAME);
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index 080f226031..fea1c66b73 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -460,7 +460,7 @@ int Create_TopToolbarShowList(WPARAM wParam, LPARAM lParam)
int Create_MenuitemShowList(void)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.hIcolibItem = icon.hIcolib;
mi.name.a = msLastUC_ShowListName;
mi.pszService = msLastUC_ShowList;
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp
index e7be2f3975..5cf92686c0 100644
--- a/plugins/RemovePersonalSettings/src/rps.cpp
+++ b/plugins/RemovePersonalSettings/src/rps.cpp
@@ -121,16 +121,15 @@ extern "C" int __declspec(dllexport) Load()
{
mir_getLP(&pluginInfo);
- TMO_MenuItem mi;
char *strTmp;
- CreateServiceFunction("RemovePersonalSettings/RemoveAll",RemoveAllService);
- memset(&mi, 0, sizeof(mi));
+ CMenuItem mi;
mi.position = -0x7FFFFFFF;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.name.a = LPGEN("Remove Personal Settings...");
mi.pszService="RemovePersonalSettings/RemoveAll";
Menu_AddMainMenuItem(&mi);
+ CreateServiceFunction(mi.pszService, RemoveAllService);
// Get ini file name
gMirandaDir[0] = '\0';
diff --git a/plugins/Restart/src/restart.cpp b/plugins/Restart/src/restart.cpp
index f3dd444fcd..fc858e7a56 100644
--- a/plugins/Restart/src/restart.cpp
+++ b/plugins/Restart/src/restart.cpp
@@ -46,7 +46,7 @@ extern "C" __declspec(dllexport) int Load(void)
hRestartMe = CreateServiceFunction("System/RestartMe", RestartMe);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -0x7FFFFFFF;
mi.hIcolibItem = icon.hIcolib;
mi.name.a = LPGEN("Restart");
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp
index c7a6074922..a1b1dfa165 100644
--- a/plugins/SMS/src/SMS_svc.cpp
+++ b/plugins/SMS/src/SMS_svc.cpp
@@ -28,7 +28,7 @@ int LoadModules(void)
char szServiceFunction[MAX_PATH];
mir_snprintf(szServiceFunction,_countof(szServiceFunction),"%s%s",PROTOCOL_NAMEA,SMS_SEND);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 300050000;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_SMS);
mi.name.t = SMS_SEND_STR;
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 9ef34f2939..54ee67bdf7 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -447,7 +447,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
LoadMsgLogIcons();
ModuleLoad(0, 0);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp
index 0766716cd2..00d11bbb73 100644
--- a/plugins/SecureIM/src/main.cpp
+++ b/plugins/SecureIM/src/main.cpp
@@ -38,7 +38,7 @@ BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID)
static HGENMENU MyAddMenuItem(LPCWSTR name, int pos, HICON hicon, LPCSTR service, int flags = 0, WPARAM wParam = 0)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = flags | CMIF_HIDDEN;
mi.position = pos;
mi.hIcolibItem = hicon;
@@ -49,7 +49,7 @@ static HGENMENU MyAddMenuItem(LPCWSTR name, int pos, HICON hicon, LPCSTR service
static HGENMENU MyAddSubItem(HGENMENU hRoot, LPCSTR name, int pos, int poppos, LPCSTR service, WPARAM wParam = 0)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_HIDDEN;
mi.position = pos;
mi.name.a = (char*)name;
diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp
index aeeb10883c..e0ecfe71e7 100644
--- a/plugins/SeenPlugin/src/menu.cpp
+++ b/plugins/SeenPlugin/src/menu.cpp
@@ -72,7 +72,7 @@ void InitMenuitem()
{
CreateServiceFunction("LastSeenUserDetails", MenuitemClicked);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -0x7FFFFFFF;
mi.name.a = LPGEN("Last seen");
mi.pszService = "LastSeenUserDetails";
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index 92d3e2b25c..3b874fd311 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -270,8 +270,9 @@ DLL_EXPORT int Load(void)
srv_reg(SendDesktop);
srv_reg(EditBitmap);
srv_reg(Send2ImageShack);
- /// menu items
- TMO_MenuItem mi = { 0 };
+
+ // menu items
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = GetIconHandle(ICO_MAINXS);
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 8ebfc562ed..6790e1d553 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -793,7 +793,7 @@ static int PluginInit(WPARAM, LPARAM)
Hotkey_Register(&hkd);
// Main menu
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 1000000000;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Sessions Manager"), 1000000000);
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp
index 8224767e30..c4b35e8611 100644
--- a/plugins/SimpleAR/src/Main.cpp
+++ b/plugins/SimpleAR/src/Main.cpp
@@ -265,7 +265,7 @@ extern "C" int __declspec(dllexport)Load(void)
CreateServiceFunction(protocolname"/ToggleEnable", ToggleEnable);
CreateServiceFunction(protocolname"/ToggleAutoanswer",Toggle);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 500090000;
mi.name.t = _T("");
mi.pszService = protocolname"/ToggleEnable";
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index c01c5a5ea0..0b1a123f28 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -416,7 +416,7 @@ int LoadAwayMsgModule(void)
hWindowList = WindowList_Create();
hWindowList2 = WindowList_Create();
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index d3244f34be..72d7a95680 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -1453,7 +1453,7 @@ static int ChangeStatusMsgPrebuild(WPARAM wParam, LPARAM lParam)
if (!iStatusMsgFlags || !iStatusMenuItemCount)
return 0;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
if (!db_get_b(NULL, "SimpleStatusMsg", "ShowStatusMenuItem", 1))
mi.flags |= CMIF_HIDDEN;
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp
index fdbd12442b..b375da5499 100644
--- a/plugins/SmileyAdd/src/main.cpp
+++ b/plugins/SmileyAdd/src/main.cpp
@@ -50,7 +50,7 @@ static IconItem icon = { LPGEN("Button smiley"), "SmileyAdd_ButtonSmiley", IDI_S
static int ModulesLoaded(WPARAM, LPARAM)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 2000070050;
mi.hIcolibItem = icon.hIcolib;
mi.name.a = LPGEN("Assign smiley category");
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp
index f557f55256..0822108f9b 100644
--- a/plugins/SmileyAdd/src/services.cpp
+++ b/plugins/SmileyAdd/src/services.cpp
@@ -292,10 +292,10 @@ int RebuildContactMenu(WPARAM wParam, LPARAM)
CMString cat;
opt.ReadContactCategory(wParam, cat);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = hContactMenuItem;
- mi.flags = CMIF_TCHAR;
- mi.pszService = MS_SMILEYADD_CUSTOMCATMENU;
+ mi.flags = CMIF_TCHAR;
+ mi.pszService = MS_SMILEYADD_CUSTOMCATMENU;
bool nonecheck = true;
HGENMENU hMenu;
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp
index 864ca1bb5e..4aa9ae49ca 100644
--- a/plugins/StartupSilence/src/main.cpp
+++ b/plugins/StartupSilence/src/main.cpp
@@ -289,7 +289,7 @@ static INT_PTR SilenceConnection(WPARAM wParam, LPARAM lParam)
static INT_PTR InitMenu()
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 100000000;
mi.hIcolibItem = GetIconHandle(MENU_NAME);
mi.name.a = MENU_NAME;
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp
index c756889587..0742c34198 100644
--- a/plugins/StatusPlugins/StartupStatus/profiles.cpp
+++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp
@@ -92,7 +92,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM)
char servicename[128];
int i, count;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 2000100000;
mi.flags = CMIF_TCHAR;
mcount = 0;
diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp
index 473a5676ba..056f226816 100755
--- a/plugins/StopSpamMod/src/init.cpp
+++ b/plugins/StopSpamMod/src/init.cpp
@@ -148,12 +148,11 @@ extern "C" int __declspec(dllexport) Load()
CreateServiceFunction("/RemoveTmp", (MIRANDASERVICE)RemoveTmp);
HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded);
- TMO_MenuItem mi = { 0 };
- mi.position=-0x7FFFFFFF;
- mi.flags=0;
- mi.hIcolibItem=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- mi.name.a=LPGEN("Remove Temporary Contacts");
- mi.pszService="/RemoveTmp";
+ CMenuItem mi;
+ mi.position = -0x7FFFFFFF;
+ mi.hIcolibItem = 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 246b3f23cc..287026da00 100644
--- a/plugins/StopSpamPlus/src/stopspam.cpp
+++ b/plugins/StopSpamPlus/src/stopspam.cpp
@@ -48,7 +48,7 @@ extern "C" int __declspec(dllexport) Load(void)
// Add deliting temporary contacts
hTempRemove = CreateServiceFunction(MS_STOPSPAM_REMTEMPCONTACTS, RemoveTempContacts);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index d9db30b9d6..0134d30f61 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -135,7 +135,7 @@ void CGlobals::reloadSystemModulesChanged()
g_bPopupAvail = ServiceExists(MS_POPUP_ADDPOPUPT) != 0;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
@@ -324,7 +324,7 @@ int CGlobals::ModulesLoaded(WPARAM, LPARAM)
if (nen_options.bTraySupport)
::CreateSystrayIcon(TRUE);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -500050005;
mi.hIcolibItem = PluginConfig.g_iconContainer;
mi.name.a = LPGEN("&Messaging settings...");
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 8068bd44c8..9e2bda4007 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -536,7 +536,7 @@ int TN_ModuleInit()
if (PluginConfig.g_bPopupAvail && ShowMenu) {
hTypingNotify = CreateServiceFunction("TypingNotify/EnableDisableMenuCommand", EnableDisableMenuCommand);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
if (!Disabled) {
mi.name.a = LPGEN("Disable &typing notification");
mi.hIcolibItem = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ENABLED));
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index 9f54eb7782..8e04d461c6 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -1047,9 +1047,8 @@ INT_PTR MenuCommand_TrafficShowHide(WPARAM wParam, LPARAM lParam)
void Traffic_AddMainMenuItem(void)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -0x7FFFFFFF;
- mi.flags = 0;
mi.hIcolibItem = NULL;
mi.name.a = LPGEN("Toggle traffic counter");
mi.pszService = "TrafficCounter/ShowHide";
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp
index 36d8af5a7a..e739a54017 100644
--- a/plugins/UserGuide/src/main.cpp
+++ b/plugins/UserGuide/src/main.cpp
@@ -84,7 +84,7 @@ extern "C" __declspec(dllexport) int Load(void)
mir_getLP(&pluginInfo);
hShowGuide = CreateServiceFunction("UserGuide/ShowGuide", ShowGuideFile);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 500000;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_HELP);
diff --git a/plugins/UserInfoEx/src/mir_menuitems.cpp b/plugins/UserInfoEx/src/mir_menuitems.cpp
index d0eaa861ac..24822fa83c 100644
--- a/plugins/UserInfoEx/src/mir_menuitems.cpp
+++ b/plugins/UserInfoEx/src/mir_menuitems.cpp
@@ -85,7 +85,7 @@ void RebuildContact()
RemoveMenuItems(hMenuItem, _countof(hMenuItem));
// support new genmenu style
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
switch (flag) {
case 3:
@@ -172,7 +172,7 @@ void RebuildMain()
RemoveMenuItems(hMenuItem, _countof(hMenuItem));
// support new genmenu style
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
switch (flag) {
case 3:
@@ -300,7 +300,7 @@ void RebuildGroup()
char text[200];
mir_strcpy(text, "UserInfo");
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.pszService = text;
char* tDest = text + mir_strlen(text);
@@ -388,7 +388,7 @@ void RebuildSubGroup()
char text[200];
mir_strcpy(text, "UserInfo");
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.pszService = text;
char* tDest = text + mir_strlen(text);
@@ -501,7 +501,7 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam)
char text[200];
mir_strcpy(text, pcli->menuProtos[i].szProto);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.pszService = text;
char* tDest = text + mir_strlen(text);
diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp
index e431bf84bb..3a8128cc62 100644
--- a/plugins/UserInfoEx/src/svc_email.cpp
+++ b/plugins/UserInfoEx/src/svc_email.cpp
@@ -183,7 +183,7 @@ void SvcEMailRebuildMenu()
if (!ghMenuItem) {
// insert contact menuitem
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -2000010000;
mi.hIcolibItem = IcoLib_GetIcon(ICO_BTN_EMAIL);
mi.name.a = "&E-mail";
diff --git a/plugins/UserInfoEx/src/svc_homepage.cpp b/plugins/UserInfoEx/src/svc_homepage.cpp
index e0a2f9e01b..609eff8649 100644
--- a/plugins/UserInfoEx/src/svc_homepage.cpp
+++ b/plugins/UserInfoEx/src/svc_homepage.cpp
@@ -153,7 +153,7 @@ void SvcHomepageRebuildMenu()
if (!ghMenuItem) {
// insert contact menuitem
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -2000010000;
mi.hIcolibItem = IcoLib_GetIcon(ICO_BTN_GOTO);
mi.name.a = LPGEN("&Homepage");
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp
index 46ea0ce783..fdc93fdc06 100644
--- a/plugins/Weather/src/weather_svcs.cpp
+++ b/plugins/Weather/src/weather_svcs.cpp
@@ -268,7 +268,7 @@ INT_PTR MenuitemNotifyCmd(WPARAM wParam,LPARAM lParam)
// copied and modified form "modified MSN Protocol"
void AddMenuItems(void)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
// contact menu
CreateServiceFunction(MS_WEATHER_UPDATE, UpdateSingleStation);
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp
index 8f035e4ea3..cb46486ffe 100644
--- a/plugins/WebView/src/main.cpp
+++ b/plugins/WebView/src/main.cpp
@@ -169,7 +169,7 @@ extern "C" int __declspec(dllexport) Load()
//value is 1 if menu is disabled
db_set_b(NULL, MODULENAME, MENU_IS_DISABLED_KEY, 1);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
if ( db_get_b(NULL, MODULENAME, MENU_OFF, 0)) {
//value is 0 if menu is enabled
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp
index 0f629bad44..effd2d632f 100644
--- a/plugins/WhenWasIt/src/WhenWasIt.cpp
+++ b/plugins/WhenWasIt/src/WhenWasIt.cpp
@@ -72,7 +72,7 @@ extern "C" int __declspec(dllexport) Load(void)
hAddBirthdayWndsList = WindowList_Create();
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 10000000;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Birthdays (When Was It)"), mi.position);
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
index df611cb989..0bd9066d35 100644
--- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp
+++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
@@ -492,7 +492,7 @@ extern "C" __declspec(dllexport) int Load(void)
CreateServiceFunction(MS_WUMF_SWITCHPOPUP, WumfMenuCommand);
CreateServiceFunction(MS_WUMF_CONNECTIONSSHOW, WumfShowConnections);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 1999990000);
if (WumfOptions.PopupsEnabled == FALSE) {
mi.name.a = LPGEN("Enable WUMF popups");
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp
index 51a06b95a3..8d9a9f078c 100644
--- a/plugins/XSoundNotify/src/xsn_main.cpp
+++ b/plugins/XSoundNotify/src/xsn_main.cpp
@@ -176,7 +176,7 @@ static int OnLoadInit(WPARAM, LPARAM)
{
mir_getCI(NULL);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp
index ab5ba36e86..92fd9f4c2c 100644
--- a/plugins/YAMN/src/main.cpp
+++ b/plugins/YAMN/src/main.cpp
@@ -141,7 +141,7 @@ void CheckMenuItems()
int SystemModulesLoaded(WPARAM, LPARAM)
{
//Insert "Check mail (YAMN)" item to Miranda's menu
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 0xb0000000;
mi.hIcolibItem = g_GetIconHandle(0);
mi.name.a = LPGEN("Check &mail (All Account)");
diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp
index cd3f8ab1de..0db8062c1c 100644
--- a/plugins/YAPP/src/yapp.cpp
+++ b/plugins/YAPP/src/yapp.cpp
@@ -170,7 +170,7 @@ void InitMenuItems(void)
hMenuRoot = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 500010000, IcoLib_GetIcon(isEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0));
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.root = hMenuRoot;
diff --git a/plugins/ZeroNotification/src/main.cpp b/plugins/ZeroNotification/src/main.cpp
index 9d07895dcb..8b0cdf3c13 100644
--- a/plugins/ZeroNotification/src/main.cpp
+++ b/plugins/ZeroNotification/src/main.cpp
@@ -234,7 +234,7 @@ extern "C" __declspec(dllexport) int Load(void)
if (!db_get_b(NULL, MODNAME, "HideMenu", 1)) {
hSoundMenu = CreateServiceFunction(MODNAME "/MenuCommand", NoSoundMenuCommand);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
UpdateMenuItem();
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp
index 7a36990d79..de5f0a4220 100644
--- a/protocols/AimOscar/src/theme.cpp
+++ b/protocols/AimOscar/src/theme.cpp
@@ -211,7 +211,7 @@ void CAimProto::InitMainMenus(void)
{
HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.hIcolibItem = GetIconHandle("aim");
mi.name.t = m_tszUserName;
@@ -225,7 +225,7 @@ void CAimProto::InitMainMenus(void)
}
}
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = hRoot;
mi.pszService = "/ManageAccount";
@@ -252,7 +252,7 @@ void CAimProto::InitMainMenus(void)
void CAimProto::InitContactMenus(void)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
CreateProtoService("/GetHTMLAwayMsg",&CAimProto::GetHTMLAwayMsg);
mi.pszService = "/GetHTMLAwayMsg";
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp
index 3a4cbbf803..12109dfe9c 100644
--- a/protocols/FacebookRM/src/theme.cpp
+++ b/protocols/FacebookRM/src/theme.cpp
@@ -107,7 +107,7 @@ void InitContactMenus()
{
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -2000006000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.name.a = LPGEN("Visit profile");
@@ -210,7 +210,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM)
{
HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
- TMO_MenuItem miRoot = { 0 };
+ CMenuItem miRoot;
miRoot.position = 500085000;
miRoot.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | (this->isOnline() ? 0 : CMIF_GRAYED);
miRoot.hIcolibItem = GetIconHandle("facebook");
@@ -224,7 +224,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM)
}
}
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = (this->isOnline() ? 0 : CMIF_GRAYED);
mi.position = 201001;
mi.root = hRoot;
diff --git a/protocols/GTalkExt/src/menu.cpp b/protocols/GTalkExt/src/menu.cpp
index 549619069d..a4721aa652 100644
--- a/protocols/GTalkExt/src/menu.cpp
+++ b/protocols/GTalkExt/src/menu.cpp
@@ -37,14 +37,14 @@ INT_PTR OpenMailboxMenuHandler(WPARAM, LPARAM, LPARAM param)
int InitMenus(WPARAM wParam, LPARAM lParam)
{
- GoogleTalkAcc* pga = isGoogle(lParam);
+ GoogleTalkAcc *pga = isGoogle(lParam);
if (pga != NULL) {
LPCSTR szModuleName = pga->m_japi->GetModuleName();
char szServiceName[100];
mir_snprintf(szServiceName, _countof(szServiceName), "%s/%s", szModuleName, MS_GTALKEXT_OPENMAILBOX);
CreateServiceFunctionParam(szServiceName, OpenMailboxMenuHandler, (LPARAM)szModuleName);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = HGENMENU(wParam);
mi.hIcolibItem = g_hPopupIcon;
mi.position = 200101;
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index 3c496a0263..cdcca1a571 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -235,7 +235,7 @@ INT_PTR GGPROTO::blockuser(WPARAM hContact, LPARAM lParam)
#define GGS_BLOCKUSER "/BlockUser"
void GGPROTO::block_init()
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -500050000;
mi.hIcolibItem = iconList[8].hIcolib;
mi.name.a = LPGEN("&Block");
@@ -257,7 +257,7 @@ void GGPROTO::block_uninit()
// Menus initialization
void GGPROTO::menus_init()
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
HGENMENU hGCRoot, hCLRoot, hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index 5f1b0ec623..b76e4816cd 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -57,7 +57,7 @@ int GGPROTO::gc_init()
void GGPROTO::gc_menus_init(HGENMENU hRoot)
{
if (gc_enabled) {
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.root = hRoot;
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp
index 860cc2f965..8f03d5bd26 100644
--- a/protocols/Gadu-Gadu/src/image.cpp
+++ b/protocols/Gadu-Gadu/src/image.cpp
@@ -69,7 +69,7 @@ int gg_img_remove(GGIMAGEDLGDATA *dat);
int GGPROTO::img_init()
{
// Send image contact menu item
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -2000010000;
mi.hIcolibItem = iconList[11].hIcolib;
mi.name.a = LPGEN("&Image");
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp
index c44e098383..3e8ba768a2 100644
--- a/protocols/Gadu-Gadu/src/import.cpp
+++ b/protocols/Gadu-Gadu/src/import.cpp
@@ -514,7 +514,7 @@ INT_PTR GGPROTO::export_server(WPARAM wParam, LPARAM lParam)
void GGPROTO::import_init(HGENMENU hRoot)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.root = hRoot;
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp
index f8f04874d1..5a5b75df90 100644
--- a/protocols/Gadu-Gadu/src/links.cpp
+++ b/protocols/Gadu-Gadu/src/links.cpp
@@ -97,7 +97,7 @@ void gg_links_instancemenu_init()
CreateServiceFunction(GGS_MENUCHOOSE, gg_menuchoose);
hInstanceMenu = Menu_AddObject("GGAccountChooser", LPGEN("Gadu-Gadu account chooser"), 0, GGS_MENUCHOOSE);
- TMO_MenuItem mi = {0};
+ CMenuItem mi;
mi.name.a = "Cancel";
mi.position = 9999999;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
@@ -115,7 +115,7 @@ void gg_links_init()
void GGPROTO::links_instance_init()
{
if (ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE)) {
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.ownerdata = this;
mi.position = g_Instances.getCount();
diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp
index 6364386820..640aec001d 100644
--- a/protocols/Gadu-Gadu/src/sessions.cpp
+++ b/protocols/Gadu-Gadu/src/sessions.cpp
@@ -416,7 +416,7 @@ BOOL GGPROTO::sessions_closedlg()
void GGPROTO::sessions_menus_init(HGENMENU hRoot)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.root = hRoot;
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index f77fa7312f..83f25fec4b 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -26,7 +26,7 @@ void CIrcProto::InitMainMenus(void)
HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
// Root popupmenuitem
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.name.t = m_tszUserName;
mi.position = -1999901010;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
@@ -40,7 +40,7 @@ void CIrcProto::InitMainMenus(void)
}
}
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = hRoot;
mi.name.a = LPGEN("&Quick connect");
@@ -135,7 +135,7 @@ void InitContactMenus(void)
char temp[MAXMODULELABELLENGTH];
char *d = temp + mir_snprintf(temp, _countof(temp), "IRC");
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.pszService = temp;
mi.name.a = LPGEN("Channel &settings");
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp
index 055ab5ecde..b058bac425 100644
--- a/protocols/IcqOscarJ/src/icq_menu.cpp
+++ b/protocols/IcqOscarJ/src/icq_menu.cpp
@@ -111,7 +111,7 @@ void g_MenuInit(void)
char str[MAXMODULELABELLENGTH], *pszDest = str + 3;
mir_strcpy(str, "ICQ");
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.pszService = str;
// "Request authorization"
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp
index 725eb5ca87..abdcbb0400 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -853,14 +853,14 @@ void CIcqProto::InitXStatusItems(BOOL bAllowStatus)
TCHAR szItem[MAX_PATH + 64];
mir_sntprintf(szItem, _countof(szItem), TranslateT("%s Custom Status"), m_tszUserName);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_GetProtocolRoot(m_szModuleName);
mi.name.t = szItem;
mi.position = 10001;
hRoot = Menu_AddStatusMenuItem(&mi);
}
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 2000040000;
mi.root = hRoot;
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp
index ebf46c4838..11b651c68e 100644
--- a/protocols/JabberG/src/jabber_menu.cpp
+++ b/protocols/JabberG/src/jabber_menu.cpp
@@ -188,17 +188,18 @@ void g_MenuInit(void)
CreateServiceFunction("Jabber/MenuChoose", JabberMenuChooseService);
hChooserMenu = Menu_AddObject("JabberAccountChooser", LPGEN("Jabber account chooser"), 0, "Jabber/MenuChoose");
-
- TMO_MenuItem tmi = { sizeof(tmi) };
- tmi.name.a = "Cancel";
- tmi.position = 9999999;
- tmi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
- Menu_AddItem(hChooserMenu, &tmi);
+ {
+ CMenuItem mi;
+ mi.name.a = "Cancel";
+ mi.position = 9999999;
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
+ Menu_AddItem(hChooserMenu, &mi);
+ }
//////////////////////////////////////////////////////////////////////////////////////
// Contact menu initialization
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
// "Request authorization"
mi.name.a = LPGEN("Request authorization");
@@ -417,7 +418,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
}
char text[256];
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.pszService = text;
CMString szTmp;
@@ -580,7 +581,7 @@ void CJabberProto::MenuInit()
{
HGENMENU hJabberRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hJabberRoot == NULL) {
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.name.t = m_tszUserName;
mi.position = -1999901006;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
@@ -594,7 +595,7 @@ void CJabberProto::MenuInit()
}
}
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = hJabberRoot;
// "Bookmarks..."
@@ -781,12 +782,12 @@ void CJabberProto::GlobalMenuInit()
//////////////////////////////////////////////////////////////////////////////////////
// Account chooser menu
- TMO_MenuItem tmi = { sizeof(tmi) };
- tmi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- tmi.ownerdata = this;
- tmi.position = iChooserMenuPos++;
- tmi.name.t = m_tszUserName;
- m_hChooseMenuItem = Menu_AddItem(hChooserMenu, &tmi);
+ CMenuItem mi;
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.ownerdata = this;
+ mi.position = iChooserMenuPos++;
+ mi.name.t = m_tszUserName;
+ m_hChooseMenuItem = Menu_AddItem(hChooserMenu, &mi);
//////////////////////////////////////////////////////////////////////////////////////
// Hotkeys
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp
index f102978ef8..35fdcde2f6 100644
--- a/protocols/JabberG/src/jabber_privacy.cpp
+++ b/protocols/JabberG/src/jabber_privacy.cpp
@@ -2090,7 +2090,7 @@ INT_PTR __cdecl CJabberProto::menuSetPrivacyList(WPARAM, LPARAM, LPARAM iList)
void CJabberProto::BuildPrivacyMenu()
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 200005;
mi.hIcolibItem = GetIconHandle(IDI_AGENTS);
mi.flags = CMIF_HIDDEN;
@@ -2120,7 +2120,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld)
char srvFce[MAX_PATH + 64];
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 2000040000;
mi.flags = CMIF_TCHAR;
mi.root = m_hPrivacyMenuRoot;
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp
index a9454ec559..f28aa0abc4 100644
--- a/protocols/JabberG/src/jabber_xstatus.cpp
+++ b/protocols/JabberG/src/jabber_xstatus.cpp
@@ -465,7 +465,7 @@ void CPepGuiService::RebuildMenu()
char szService[128];
mir_snprintf(szService, "/AdvStatusSet/%s", m_name);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = hJabberRoot;
mi.pszService = szService;
mi.position = 200010;
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp
index 41563e74bb..32c6eeda27 100644
--- a/protocols/MRA/src/Mra_menus.cpp
+++ b/protocols/MRA/src/Mra_menus.cpp
@@ -284,14 +284,14 @@ int CMraProto::MraRebuildStatusMenu(WPARAM, LPARAM)
TCHAR szItem[MAX_PATH + 64];
mir_sntprintf(szItem, _countof(szItem), _T("%s Custom Status"), m_tszUserName);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_GetProtocolRoot(m_szModuleName);
mi.name.t = szItem;
mi.position = 10001;
hRoot = Menu_AddStatusMenuItem(&mi);
}
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 2000060000;
mi.root = hRoot;
mi.flags = CMIF_UNICODE;
@@ -332,9 +332,9 @@ HGENMENU CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bI
char szServiceFunction[MAX_PATH];
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
- HGENMENU hRootMenu, (__stdcall *fnAddFunc)(TMO_MenuItem*, const char*, int);
+ HGENMENU hRootMenu, (__stdcall *fnAddFunc)(TMO_MenuItem*, const char*);
if (bIsMain) {
fnAddFunc = Menu_AddProtoMenuItem;
@@ -357,7 +357,7 @@ HGENMENU CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bI
mi.flags = 0;
mi.name.a = LPGEN("Services...");
mi.hIcolibItem = g_hMainIcon;
- hRootMenu = fnAddFunc(&mi, m_szModuleName, hLangpack);
+ hRootMenu = fnAddFunc(&mi, m_szModuleName);
mi.root = hRootMenu;
mi.pszService = szServiceFunction;
@@ -367,7 +367,7 @@ HGENMENU CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bI
mi.position = int(lPosition + i);
mi.hIcolibItem = pgdiItems[i].hIcolib;
mi.name.a = pgdiItems[i].szDescr;
- hResult[i] = fnAddFunc(&mi, m_szModuleName, hLangpack);
+ hResult[i] = fnAddFunc(&mi, m_szModuleName);
Menu_ConfigureItem(hResult[i], MCI_OPT_EXECPARAM, lPopupPosition);
}
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp
index 877c5a2f5d..2458b7aeb1 100644
--- a/protocols/MSN/src/msn_menu.cpp
+++ b/protocols/MSN/src/msn_menu.cpp
@@ -268,7 +268,7 @@ INT_PTR CMsnProto::SetNicknameUI(WPARAM, LPARAM)
void CMsnProto::MsnInitMainMenu(void)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
@@ -398,7 +398,7 @@ void MSN_InitContactMenu(void)
mir_strcpy(servicefunction, "MSN");
char* tDest = servicefunction + mir_strlen(servicefunction);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.pszService = servicefunction;
mir_strcpy(tDest, MSN_BLOCK);
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp
index 0eebe780b6..4aaf949a27 100644
--- a/protocols/Sametime/src/conference.cpp
+++ b/protocols/Sametime/src/conference.cpp
@@ -508,7 +508,7 @@ void CSametimeProto::InitConferenceMenu()
CreateProtoService(MS_SAMETIME_MENULEAVECHAT, &CSametimeProto::onMenuLeaveChat);
CreateProtoService(MS_SAMETIME_MENUCREATECHAT, &CSametimeProto::onMenuCreateChat);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
mi.name.t = LPGENT("Leave conference");
diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp
index 4b49c436ea..74fede1541 100644
--- a/protocols/Sametime/src/sametime_session.cpp
+++ b/protocols/Sametime/src/sametime_session.cpp
@@ -560,7 +560,7 @@ void CSametimeProto::InitSessionMenu()
CreateProtoService(MS_SAMETIME_MENUANNOUNCESESSION, &CSametimeProto::SessionAnnounce);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.position = 2000060000;
mi.name.t = LPGENT("Send announcement...");
diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp
index 8400cc483a..47c9138cd4 100644
--- a/protocols/SkypeWeb/src/skype_menus.cpp
+++ b/protocols/SkypeWeb/src/skype_menus.cpp
@@ -60,7 +60,7 @@ void CSkypeProto::InitMenus()
//hChooserMenu = Menu_AddObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
// Request authorization
@@ -111,7 +111,7 @@ int CSkypeProto::OnInitStatusMenu()
HGENMENU hStatusMenuRoot = Menu_GetProtocolRoot(m_szModuleName);
if (!hStatusMenuRoot)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.name.t = m_tszUserName;
mi.position = -1999901006;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
@@ -119,7 +119,7 @@ int CSkypeProto::OnInitStatusMenu()
hStatusMenuRoot = Menu_AddProtoMenuItem(&mi);
}
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = hStatusMenuRoot;
mi.pszService = "/CreateNewChat";
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp
index 9675edfde3..d975b21872 100644
--- a/protocols/Steam/src/steam_menus.cpp
+++ b/protocols/Steam/src/steam_menus.cpp
@@ -98,7 +98,7 @@ void CSteamProto::OnInitStatusMenu()
{
HGENMENU hSteamRoot = Menu_GetProtocolRoot(m_szModuleName);
if (!hSteamRoot) {
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.name.t = m_tszUserName;
mi.position = -1999901006;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
@@ -109,7 +109,7 @@ void CSteamProto::OnInitStatusMenu()
m_hMenuRoot = NULL;
}
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.root = hSteamRoot;
@@ -127,7 +127,7 @@ void CSteamProto::InitMenus()
//////////////////////////////////////////////////////////////////////////////////////
// Contact menu initialization
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
// "Request authorization"
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp
index da55e2f5f2..b7d055cfb9 100644
--- a/protocols/Tlen/src/tlen.cpp
+++ b/protocols/Tlen/src/tlen.cpp
@@ -264,7 +264,7 @@ void TlenProtocol::initMenuItems()
strncpy_s(text, m_szModuleName, _TRUNCATE);
char *pSvcName = text + mir_strlen(text);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = hMenuRoot = Menu_CreateRoot(MO_MAIN, m_tszUserName, -1999901009, GetIconHandle(IDI_TLEN));
mi.pszService = text;
diff --git a/protocols/Tox/src/tox_menus.cpp b/protocols/Tox/src/tox_menus.cpp
index 78f372e9be..c7c77ba163 100644
--- a/protocols/Tox/src/tox_menus.cpp
+++ b/protocols/Tox/src/tox_menus.cpp
@@ -41,7 +41,7 @@ void CToxProto::InitMenus()
//hChooserMenu = Menu_AddObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
// Request authorization
@@ -78,7 +78,7 @@ int CToxProto::OnInitStatusMenu()
HGENMENU hStatusMenuRoot = Menu_GetProtocolRoot(m_szModuleName);
if (!hStatusMenuRoot)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.name.t = m_tszUserName;
mi.position = -1999901006;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
@@ -86,7 +86,7 @@ int CToxProto::OnInitStatusMenu()
hStatusMenuRoot = Menu_AddProtoMenuItem(&mi);
}
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_TCHAR;
mi.root = hStatusMenuRoot;
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index d94037fb64..bc95f7deda 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -256,7 +256,7 @@ int TwitterProto::OnBuildStatusMenu(WPARAM, LPARAM)
if (hRoot == NULL)
return 0;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = hRoot;
mi.flags = CMIF_TCHAR;
mi.position = 1001;
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp
index 30e88a23b0..05fd48fae8 100644
--- a/protocols/Twitter/src/theme.cpp
+++ b/protocols/Twitter/src/theme.cpp
@@ -86,7 +86,7 @@ void InitContactMenus()
{
g_hMenuEvts[0] = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
mi.position = -2000006000;
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index bd1bf48bd5..de2aeb5825 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -191,7 +191,7 @@ void CVkProto::InitMenus()
CreateProtoService(PS_SETSTATUSMSG, &CVkProto::SvcSetStatusMsg);
CreateProtoService(PS_WALLPOST, &CVkProto::SvcWallPost);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_GetProtocolRoot(m_szModuleName);
// Proto menu
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp
index 90d82bb60d..1a11414f4b 100644
--- a/protocols/WhatsApp/src/theme.cpp
+++ b/protocols/WhatsApp/src/theme.cpp
@@ -49,7 +49,7 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam)
{
HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 500085000;
mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | (isOnline() ? 0 : CMIF_GRAYED);
mi.hIcolibItem = GetIconHandle("whatsApp");
@@ -63,7 +63,7 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam)
}
}
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.flags = (isOnline() ? 0 : CMIF_GRAYED);
mi.position = 201001;
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp
index 2ae07c6912..c954230cad 100644
--- a/protocols/Xfire/src/Xfire_game.cpp
+++ b/protocols/Xfire/src/Xfire_game.cpp
@@ -436,7 +436,7 @@ void Xfire_game::createMenuitem(unsigned int pos, int dbid)
if (dbid < 0)
dbid = pos;
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Start game"), 500084000);
mir_snprintf(temp, _countof(temp), servicefunction, this->id);
diff --git a/protocols/Xfire/src/Xfire_gamelist.cpp b/protocols/Xfire/src/Xfire_gamelist.cpp
index a417177ad3..7c5663464f 100644
--- a/protocols/Xfire/src/Xfire_gamelist.cpp
+++ b/protocols/Xfire/src/Xfire_gamelist.cpp
@@ -241,7 +241,7 @@ void Xfire_gamelist::clearGamelist() {
//erstellt ein dummyeintrag
void Xfire_gamelist::createDummyMenuItem()
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Start game"), 500084000);
mi.position = 500090001;
mi.name.a = Translate("Please wait...");
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp
index e14629a20e..b4d234d3c1 100644
--- a/protocols/Xfire/src/main.cpp
+++ b/protocols/Xfire/src/main.cpp
@@ -1113,7 +1113,7 @@ extern "C" __declspec(dllexport) int Load(void)
CreateDirectoryA(AvatarsFolder, NULL);
// erweiterte Kontextmenüpunkte
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 500090000;
mi.name.a = protocolname;
mi.root = Menu_AddContactMenuItem(&mi, protocolname);
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp
index a0094138e9..49cdb8b93d 100644
--- a/protocols/Yahoo/src/services.cpp
+++ b/protocols/Yahoo/src/services.cpp
@@ -358,7 +358,7 @@ INT_PTR __cdecl CYahooProto::GetUnreadEmailCount(WPARAM, LPARAM)
void CYahooProto::MenuMainInit(void)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
@@ -437,11 +437,10 @@ void CYahooProto::MenuMainInit(void)
void CYahooProto::MenuContactInit(void)
{
- TMO_MenuItem mi = { 0 };
-
// Show Profile
CreateProtoService(YAHOO_SHOW_PROFILE, &CYahooProto::OnShowProfileCommand);
+ CMenuItem mi;
mi.pszService = YAHOO_SHOW_PROFILE;
mi.position = -2000006000;
mi.hIcolibItem = GetIconHandle(IDI_PROFILE);
diff --git a/src/core/stdaway/src/awaymsg.cpp b/src/core/stdaway/src/awaymsg.cpp
index 15ac55f682..8ffae1df96 100644
--- a/src/core/stdaway/src/awaymsg.cpp
+++ b/src/core/stdaway/src/awaymsg.cpp
@@ -167,7 +167,7 @@ int LoadAwayMsgModule(void)
hWindowList = WindowList_Create();
CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -2000005000;
mi.flags = CMIF_NOTOFFLINE;
mi.name.a = LPGEN("Re&ad status message");
diff --git a/src/core/stdemail/src/email.cpp b/src/core/stdemail/src/email.cpp
index 42009eb606..719983ec67 100644
--- a/src/core/stdemail/src/email.cpp
+++ b/src/core/stdemail/src/email.cpp
@@ -66,7 +66,7 @@ static int EMailPreBuildMenu(WPARAM hContact, LPARAM)
int LoadSendRecvEMailModule(void)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -2000010000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
mi.name.a = LPGEN("&E-mail");
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp
index 397034f2a9..39ada96555 100644
--- a/src/core/stdfile/src/file.cpp
+++ b/src/core/stdfile/src/file.cpp
@@ -336,7 +336,7 @@ static int SRFileProtoAck(WPARAM, LPARAM lParam)
static int SRFileModulesLoaded(WPARAM, LPARAM)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -2000020000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.name.a = LPGEN("&File");
@@ -434,7 +434,7 @@ int LoadSendRecvFileModule(void)
{
CreateServiceFunction("FtMgr/Show", FtMgrShowCommand);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.position = 1900000000;
mi.name.a = LPGEN("File &transfers...");
diff --git a/src/core/stdhelp/src/help.cpp b/src/core/stdhelp/src/help.cpp
index d248c24d45..121a097757 100644
--- a/src/core/stdhelp/src/help.cpp
+++ b/src/core/stdhelp/src/help.cpp
@@ -73,7 +73,7 @@ int LoadHelpModule(void)
CreateServiceFunction("Help/WebsiteCommand", WebsiteCommand);
CreateServiceFunction("Help/BugCommand", BugCommand);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("&Help"), 2000090000);
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 3319d29fb2..c433236f35 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -278,7 +278,7 @@ static int SplitmsgModulesLoaded(WPARAM, LPARAM)
RegisterSRMMFonts();
LoadMsgLogIcons();
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
diff --git a/src/core/stduihist/src/history.cpp b/src/core/stduihist/src/history.cpp
index 2114cd2e24..edc96772ba 100644
--- a/src/core/stduihist/src/history.cpp
+++ b/src/core/stduihist/src/history.cpp
@@ -401,7 +401,7 @@ static int PreShutdownHistoryModule(WPARAM, LPARAM)
int LoadHistoryModule(void)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 1000090000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
mi.name.a = LPGEN("View &history");
diff --git a/src/core/stdurl/url.cpp b/src/core/stdurl/url.cpp
index ba9bd8bb14..c0c0a34829 100644
--- a/src/core/stdurl/url.cpp
+++ b/src/core/stdurl/url.cpp
@@ -119,7 +119,7 @@ static int SRUrlPreBuildMenu(WPARAM wParam, LPARAM)
static int SRUrlModulesLoaded(WPARAM, LPARAM)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -2000040000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.name.a = LPGEN("Web page address (&URL)");
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp
index e4019fe568..40cbe871ef 100644
--- a/src/core/stduserinfo/src/userinfo.cpp
+++ b/src/core/stduserinfo/src/userinfo.cpp
@@ -628,7 +628,7 @@ int LoadUserInfoModule(void)
HookEvent(ME_DB_CONTACT_DELETED, UserInfoContactDelete);
HookEvent(ME_SYSTEM_PRESHUTDOWN, ShutdownUserInfo);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 1000050000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
mi.name.a = LPGEN("User &details");
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index ea88490b14..91de28faef 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -560,7 +560,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileyOptionsChanged);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = -2000090001;
mi.flags = CMIF_DEFAULT;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN);
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h
index bc8a921fa5..5df01c3eff 100644
--- a/src/mir_app/src/clc.h
+++ b/src/mir_app/src/clc.h
@@ -72,31 +72,32 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR
/* clcutils.c */
TCHAR* fnGetGroupCountsText(struct ClcData *dat, ClcContact *contact);
-int fnHitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD * flags);
-void fnScrollTo(HWND hwnd, struct ClcData *dat, int desty, int noSmooth);
-void fnEnsureVisible(HWND hwnd, struct ClcData *dat, int iItem, int partialOk);
-void fnRecalcScrollBar(HWND hwnd, struct ClcData *dat);
-void fnSetGroupExpand(HWND hwnd, struct ClcData *dat, ClcGroup *group, int newState);
-void fnDoSelectionDefaultAction(HWND hwnd, struct ClcData *dat);
-int fnFindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int prefixOk);
-void fnEndRename(HWND hwnd, struct ClcData *dat, int save);
-void fnDeleteFromContactList(HWND hwnd, struct ClcData *dat);
-void fnBeginRenameSelection(HWND hwnd, struct ClcData *dat);
-void fnCalcEipPosition(struct ClcData *dat, ClcContact *contact, ClcGroup *group, POINT *result);
-int fnGetDropTargetInformation(HWND hwnd, struct ClcData *dat, POINT pt);
-int fnClcStatusToPf2(int status);
-int fnIsHiddenMode(struct ClcData *dat, int status);
-void fnHideInfoTip(HWND hwnd, struct ClcData *dat);
-void fnNotifyNewContact(HWND hwnd, MCONTACT hContact);
+int fnHitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD * flags);
+void fnScrollTo(HWND hwnd, struct ClcData *dat, int desty, int noSmooth);
+void fnEnsureVisible(HWND hwnd, struct ClcData *dat, int iItem, int partialOk);
+void fnRecalcScrollBar(HWND hwnd, struct ClcData *dat);
+void fnSetGroupExpand(HWND hwnd, struct ClcData *dat, ClcGroup *group, int newState);
+void fnDoSelectionDefaultAction(HWND hwnd, struct ClcData *dat);
+int fnFindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int prefixOk);
+void fnEndRename(HWND hwnd, struct ClcData *dat, int save);
+void fnDeleteFromContactList(HWND hwnd, struct ClcData *dat);
+void fnBeginRenameSelection(HWND hwnd, struct ClcData *dat);
+void fnCalcEipPosition(struct ClcData *dat, ClcContact *contact, ClcGroup *group, POINT *result);
+int fnGetDropTargetInformation(HWND hwnd, struct ClcData *dat, POINT pt);
+int fnClcStatusToPf2(int status);
+int fnIsHiddenMode(struct ClcData *dat, int status);
+void fnHideInfoTip(HWND hwnd, struct ClcData *dat);
+void fnNotifyNewContact(HWND hwnd, MCONTACT hContact);
+void fnGetSetting(int i, LOGFONT* lf, COLORREF* colour);
+void fnGetDefaultFontSetting(int i, LOGFONT* lf, COLORREF* colour);
+void fnGetFontSetting(int i, LOGFONT* lf, COLORREF* colour);
+void fnLoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst);
+void fnRecalculateGroupCheckboxes(HWND hwnd, struct ClcData *dat);
+void fnSetGroupChildCheckboxes(ClcGroup *group, int checked);
+void fnSetContactCheckboxes(ClcContact *cc, int checked);
+void fnInvalidateItem(HWND hwnd, struct ClcData *dat, int iItem);
+
DWORD fnGetDefaultExStyle(void);
-void fnGetSetting(int i, LOGFONT* lf, COLORREF* colour);
-void fnGetDefaultFontSetting(int i, LOGFONT* lf, COLORREF* colour);
-void fnGetFontSetting(int i, LOGFONT* lf, COLORREF* colour);
-void fnLoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst);
-void fnRecalculateGroupCheckboxes(HWND hwnd, struct ClcData *dat);
-void fnSetGroupChildCheckboxes(ClcGroup *group, int checked);
-void fnSetContactCheckboxes(ClcContact *cc, int checked);
-void fnInvalidateItem(HWND hwnd, struct ClcData *dat, int iItem);
int fnGetRowBottomY(struct ClcData *dat, int item);
int fnGetRowHeight(struct ClcData *dat, int item);
@@ -110,20 +111,19 @@ void GetFontSetting(int i, LOGFONTA *lf, COLORREF *colour);
/* clistmenus.c */
HGENMENU fnGetProtocolMenu(const char*);
-int fnGetProtocolVisibility(const char* accName);
-int fnConvertMenu(TMO_MenuItem*, TMO_MenuItem*);
-int fnGetAverageMode(int *pNetProtoCount);
+int fnGetProtocolVisibility(const char* accName);
+int fnGetAverageMode(int *pNetProtoCount);
-int fnGetAccountIndexByPos(int Pos);
-int fnGetProtoIndexByPos(PROTOCOLDESCRIPTOR **proto, int protoCnt, int Pos);
-void RebuildMenuOrder(void);
+int fnGetAccountIndexByPos(int Pos);
+int fnGetProtoIndexByPos(PROTOCOLDESCRIPTOR **proto, int protoCnt, int Pos);
+void RebuildMenuOrder(void);
INT_PTR MenuProcessCommand(WPARAM wParam, LPARAM lParam);
/* clistsettings.c */
TCHAR* fnGetContactDisplayName(MCONTACT hContact, int mode);
-void fnGetDefaultFontSetting(int i, LOGFONT* lf, COLORREF * colour);
-void fnInvalidateDisplayNameCacheEntry(MCONTACT hContact);
+void fnGetDefaultFontSetting(int i, LOGFONT* lf, COLORREF * colour);
+void fnInvalidateDisplayNameCacheEntry(MCONTACT hContact);
ClcCacheEntry* fnGetCacheEntry(MCONTACT hContact);
ClcCacheEntry* fnCreateCacheItem (MCONTACT hContact);
diff --git a/src/mir_app/src/clistmenus.cpp b/src/mir_app/src/clistmenus.cpp
index 0c7952c83c..1f52a0fe12 100644
--- a/src/mir_app/src/clistmenus.cpp
+++ b/src/mir_app/src/clistmenus.cpp
@@ -178,7 +178,7 @@ MIR_APP_DLL(HMENU) Menu_GetMainMenu(void)
return Menu_BuildMainMenu();
}
-MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(TMO_MenuItem *pmi, int _hLang)
+MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(TMO_MenuItem *pmi)
{
MainMenuExecParam *mmep = (MainMenuExecParam*)mir_alloc(sizeof(MainMenuExecParam));
if (mmep == NULL)
@@ -193,7 +193,6 @@ MIR_APP_DLL(HGENMENU) Menu_AddMainMenuItem(TMO_MenuItem *pmi, int _hLang)
if (pimi == NULL)
return NULL;
- pimi->hLangpack = _hLang;
mmep->pimi = pimi;
const char* name;
@@ -248,7 +247,7 @@ struct ContactMenuExecParam
/////////////////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(HGENMENU) Menu_AddContactMenuItem(TMO_MenuItem *pmi, const char *pszProto, int _hLang)
+MIR_APP_DLL(HGENMENU) Menu_AddContactMenuItem(TMO_MenuItem *pmi, const char *pszProto)
{
// owner data
ContactMenuExecParam *cmep = (ContactMenuExecParam*)mir_calloc(sizeof(ContactMenuExecParam));
@@ -262,7 +261,6 @@ MIR_APP_DLL(HGENMENU) Menu_AddContactMenuItem(TMO_MenuItem *pmi, const char *psz
if (pimi == NULL)
return NULL;
- pimi->hLangpack = _hLang;
cmep->pimi = pimi;
if (pszProto == NULL)
@@ -374,7 +372,7 @@ struct StatusMenuExecParam
/////////////////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(HGENMENU) Menu_AddStatusMenuItem(TMO_MenuItem *pmi, const char *pszProto, int _hLangpack)
+MIR_APP_DLL(HGENMENU) Menu_AddStatusMenuItem(TMO_MenuItem *pmi, const char *pszProto)
{
TMO_IntMenuItem *pRoot = MO_GetIntMenuItem(pmi->root);
@@ -385,14 +383,13 @@ MIR_APP_DLL(HGENMENU) Menu_AddStatusMenuItem(TMO_MenuItem *pmi, const char *pszP
smep->custom = TRUE;
smep->svc = mir_strdup(pmi->pszService);
smep->szProto = mir_strdup(pszProto);
- pmi->ownerdata = smep;
}
+ pmi->ownerdata = smep;
TMO_IntMenuItem *pimi = Menu_AddItem(hStatusMenuObject, pmi);
if (pimi == NULL)
return NULL;
- pimi->hLangpack = _hLangpack;
if (smep)
smep->hMenuItem = pimi;
@@ -831,7 +828,7 @@ void RebuildMenuOrder(void)
TCHAR tbuf[256];
//adding root
- TMO_MenuItem tmi = { 0 };
+ CMenuItem tmi;;
tmi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
tmi.position = pos++;
tmi.hIcon = ic = (HICON)CallProtoServiceInt(NULL, pa->szModuleName, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
@@ -935,7 +932,7 @@ void RebuildMenuOrder(void)
if (!(flags & statusModePf2List[j]))
continue;
- TMO_MenuItem tmi = { sizeof(tmi) };
+ CMenuItem tmi;;
tmi.flags = CMIF_TCHAR;
if (statusModeList[j] == ID_STATUS_OFFLINE)
tmi.flags |= CMIF_CHECKED;
@@ -1088,13 +1085,13 @@ static INT_PTR HotkeySetStatus(WPARAM, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// PROTOCOL MENU
-MIR_APP_DLL(HGENMENU) Menu_AddProtoMenuItem(TMO_MenuItem *mi, const char *pszProto, int _hLangpack)
+MIR_APP_DLL(HGENMENU) Menu_AddProtoMenuItem(TMO_MenuItem *mi, const char *pszProto)
{
if (mi == NULL)
return NULL;
if (db_get_b(NULL, "CList", "MoveProtoMenus", TRUE))
- return Menu_AddStatusMenuItem(mi, pszProto, _hLangpack);
+ return Menu_AddStatusMenuItem(mi, pszProto);
char szService[100];
if (pszProto && mi->pszService && *mi->pszService == '/') {
@@ -1102,7 +1099,7 @@ MIR_APP_DLL(HGENMENU) Menu_AddProtoMenuItem(TMO_MenuItem *mi, const char *pszPro
strncat_s(szService, mi->pszService, _TRUNCATE);
mi->pszService = szService;
}
- return Menu_AddMainMenuItem(mi, _hLangpack);
+ return Menu_AddMainMenuItem(mi);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1177,7 +1174,7 @@ void InitCustomMenus(void)
// add exit command to menu
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 0x7fffffff;
mi.pszService = "CloseAction";
mi.name.a = LPGEN("E&xit");
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index bc38c7728a..ba7e7b152e 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -326,29 +326,29 @@ int LoadCLUIModule(void)
db_get_b(NULL, "CList", "OnTop", SETTING_ONTOP_DEFAULT) ? HWND_TOPMOST : HWND_NOTOPMOST,
0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
- CreateServiceFunction("CList/DeleteContactCommand", MenuItem_DeleteContact);
mi.position = 2000070000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.name.a = LPGEN("De&lete");
mi.pszService = "CList/DeleteContactCommand";
Menu_AddContactMenuItem(&mi);
+ CreateServiceFunction(mi.pszService, MenuItem_DeleteContact);
- CreateServiceFunction("CList/RenameContactCommand", MenuItem_RenameContact);
mi.position = 2000050000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
mi.name.a = LPGEN("&Rename");
mi.pszService = "CList/RenameContactCommand";
hRenameMenuItem = Menu_AddContactMenuItem(&mi);
+ CreateServiceFunction(mi.pszService, MenuItem_RenameContact);
- CreateServiceFunction("CList/AddToListContactCommand", MenuItem_AddContactToList);
mi.position = -2050000000;
mi.flags |= CMIF_NOTONLIST;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_ADDCONTACT);
mi.name.a = LPGEN("&Add permanently to list");
mi.pszService = "CList/AddToListContactCommand";
Menu_AddContactMenuItem(&mi);
+ CreateServiceFunction(mi.pszService, MenuItem_AddContactToList);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, MenuItem_PreBuild);
return 0;
diff --git a/src/mir_app/src/findadd.cpp b/src/mir_app/src/findadd.cpp
index 724a1216ed..2a4b5e29b8 100644
--- a/src/mir_app/src/findadd.cpp
+++ b/src/mir_app/src/findadd.cpp
@@ -1028,7 +1028,7 @@ int LoadFindAddModule(void)
HookEvent(ME_PROTO_ACCLISTCHANGED, OnSystemModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN, FindAddPreShutdown);
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 500020000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.name.a = LPGEN("&Find/add contacts...");
diff --git a/src/mir_app/src/genmenu.cpp b/src/mir_app/src/genmenu.cpp
index a420ced350..414ae1db32 100644
--- a/src/mir_app/src/genmenu.cpp
+++ b/src/mir_app/src/genmenu.cpp
@@ -621,7 +621,7 @@ struct KillMenuItemsParam
int KillMenuItems(TMO_IntMenuItem *pimi, KillMenuItemsParam* param)
{
- if (pimi->hLangpack == param->hLangpack)
+ if (pimi->mi.hLangpack == param->hLangpack)
param->arItems.insert(pimi);
return FALSE;
}
@@ -686,7 +686,7 @@ MIR_APP_DLL(HGENMENU) Menu_CreateRoot(int hMenuObject, LPCTSTR ptszName, int pos
if (oldroot != NULL)
return oldroot;
- TMO_MenuItem tmi = { 0 };
+ CMenuItem tmi;;
tmi.flags = CMIF_TCHAR;
tmi.hIcolibItem = hIcoLib;
tmi.hLangpack = hLang;
@@ -719,7 +719,6 @@ MIR_APP_DLL(HGENMENU) Menu_AddItem(int hMenuObject, TMO_MenuItem *pmi)
p->iconId = -1;
p->OverrideShow = TRUE;
p->originalPosition = pmi->position;
- p->hLangpack = pmi->hLangpack;
if (pmi->flags & CMIF_UNICODE)
p->mi.name.t = mir_tstrdup(pmi->name.t);
diff --git a/src/mir_app/src/genmenu.h b/src/mir_app/src/genmenu.h
index 6c6be6aeae..a100379541 100644
--- a/src/mir_app/src/genmenu.h
+++ b/src/mir_app/src/genmenu.h
@@ -55,7 +55,6 @@ struct TMO_IntMenuItem
int originalPosition;
DWORD hotKey;
WPARAM execParam;
- int hLangpack;
TMO_IntMenuItem *next; // next item in list
TIntMenuObject *parent;
diff --git a/src/mir_app/src/meta_menu.cpp b/src/mir_app/src/meta_menu.cpp
index d848d09c17..2ae402110f 100644
--- a/src/mir_app/src/meta_menu.cpp
+++ b/src/mir_app/src/meta_menu.cpp
@@ -356,7 +356,7 @@ INT_PTR Meta_OnOff(WPARAM, LPARAM)
void InitMenus()
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
// main menu item
mi.hIcolibItem = GetIconHandle(I_MENUOFF);
diff --git a/src/mir_app/src/movetogroup.cpp b/src/mir_app/src/movetogroup.cpp
index 569521472c..1a1c3e62e4 100644
--- a/src/mir_app/src/movetogroup.cpp
+++ b/src/mir_app/src/movetogroup.cpp
@@ -67,7 +67,7 @@ static TCHAR* PrepareGroupName(TCHAR* str)
static void AddGroupItem(HGENMENU hRoot, TCHAR* name, int pos, WPARAM param, bool checked)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.root = hRoot;
mi.position = pos;
mi.name.t = PrepareGroupName(name);
@@ -88,7 +88,7 @@ static int OnContactMenuBuild(WPARAM wParam, LPARAM)
OBJLIST<GroupItemSort> groups(10, GroupItemSort::compare);
if (!hMoveToGroupItem) {
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.position = 100000;
mi.name.a = LPGEN("&Move to group");
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_GROUP);
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp
index 76d34ace71..f82806f8a5 100644
--- a/src/mir_app/src/options.cpp
+++ b/src/mir_app/src/options.cpp
@@ -1293,7 +1293,7 @@ static INT_PTR AddOptionsPage(WPARAM wParam, LPARAM lParam)
static int OptModulesLoaded(WPARAM, LPARAM)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.position = 1900000000;
mi.name.a = LPGEN("&Options...");
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp
index d4cbfc84f7..d4f29726c7 100644
--- a/src/mir_app/src/proto_opts.cpp
+++ b/src/mir_app/src/proto_opts.cpp
@@ -1018,7 +1018,7 @@ static INT_PTR OptProtosShow(WPARAM, LPARAM)
int OptProtosLoaded(WPARAM, LPARAM)
{
- TMO_MenuItem mi = { 0 };
+ CMenuItem mi;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_ACCMGR);
mi.position = 1900000000;
mi.name.a = LPGEN("&Accounts...");