diff options
Diffstat (limited to 'protocols')
27 files changed, 58 insertions, 109 deletions
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index 3626175e4b..fe5555e638 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -216,10 +216,9 @@ void CAimProto::InitMainMenus(void) HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = GetIconHandle("aim");
mi.ptszName = m_tszUserName;
- mi.hParentMenu = HGENMENU_ROOT;
mi.position = 500090000;
hRoot = hMenuRoot = Menu_AddProtoMenuItem(&mi);
}
@@ -232,7 +231,7 @@ void CAimProto::InitMainMenus(void) mi.pszService = service_name;
mi.hParentMenu = hRoot;
- mi.flags = CMIF_ROOTHANDLE;
+ mi.flags = 0;
mir_snprintf(service_name, _countof(service_name), "%s%s", m_szModuleName, "/ManageAccount");
CreateProtoService("/ManageAccount", &CAimProto::ManageAccount);
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index bb5ab200d6..589d2e125e 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -219,8 +219,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) if (hRoot == NULL) {
CLISTMENUITEM miRoot = { 0 };
miRoot.position = 500085000;
- miRoot.hParentMenu = HGENMENU_ROOT;
- miRoot.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | (this->isOnline() ? 0 : CMIF_GRAYED);
+ miRoot.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | (this->isOnline() ? 0 : CMIF_GRAYED);
miRoot.icolibItem = GetIconHandle("facebook");
miRoot.ptszName = m_tszUserName;
hRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&miRoot);
@@ -232,7 +231,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) }
}
- mi.flags = CMIF_ROOTHANDLE | (this->isOnline() ? 0 : CMIF_GRAYED);
+ mi.flags = (this->isOnline() ? 0 : CMIF_GRAYED);
mi.position = 201001;
mi.hParentMenu = hRoot;
@@ -244,7 +243,6 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) //CreateProtoService("/VisitProfile",&FacebookProto::VisitProfile);
mir_strcpy(tDest, "/VisitProfile");
- mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Visit profile");
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
// TODO RM: remember and properly free in destructor?
@@ -257,38 +255,25 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) Menu_AddProtoMenuItem(&mi);
// Services...
- mi.pszName = LPGEN("Services...");
- mir_strcpy(tDest, "/Services");
- mi.flags = CMIF_ROOTHANDLE | (this->isOnline() ? 0 : CMIF_GRAYED);
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HELP);
- m_hMenuServicesRoot = Menu_AddProtoMenuItem(&mi);
+ mi.hParentMenu = m_hMenuServicesRoot = Menu_CreateRoot(MO_PROTO, LPGENT("Services..."), mi.position, Skin_GetIconHandle(SKINICON_OTHER_HELP));
CreateProtoService("/RefreshBuddyList", &FacebookProto::RefreshBuddyList);
mir_strcpy(tDest, "/RefreshBuddyList");
- mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Refresh Buddy List");
- mi.pszPopupName = LPGEN("Services");
mi.icolibItem = GetIconHandle("friendship");
- mi.hParentMenu = m_hMenuServicesRoot;
Menu_AddProtoMenuItem(&mi);
CreateProtoService("/CheckFriendRequests", &FacebookProto::CheckFriendRequests);
mir_strcpy(tDest, "/CheckFriendRequests");
- mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Check Friends Requests");
mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
- mi.hParentMenu = m_hMenuServicesRoot;
Menu_AddProtoMenuItem(&mi);
CreateProtoService("/CheckNewsfeeds", &FacebookProto::CheckNewsfeeds);
mir_strcpy(tDest, "/CheckNewsfeeds");
- mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Check Newsfeeds");
- mi.pszPopupName = LPGEN("Services");
mi.icolibItem = GetIconHandle("newsfeed");
- mi.hParentMenu = m_hMenuServicesRoot;
Menu_AddProtoMenuItem(&mi);
-
return 0;
}
diff --git a/protocols/GTalkExt/src/menu.cpp b/protocols/GTalkExt/src/menu.cpp index d6de671201..d39dc2b166 100644 --- a/protocols/GTalkExt/src/menu.cpp +++ b/protocols/GTalkExt/src/menu.cpp @@ -45,7 +45,6 @@ int InitMenus(WPARAM wParam, LPARAM lParam) CreateServiceFunctionParam(szServiceName, OpenMailboxMenuHandler, (LPARAM)szModuleName);
CLISTMENUITEM cmi = { 0 };
- cmi.flags = CMIF_ROOTHANDLE;
cmi.hParentMenu = HGENMENU(wParam);
cmi.hIcon = g_hPopupIcon;
cmi.position = 200101;
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index b6b75db861..7a7a6dd8d6 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -269,14 +269,13 @@ void GGPROTO::menus_init() if (hRoot == NULL) {
mi.ptszName = m_tszUserName;
mi.position = 500090000;
- mi.hParentMenu = HGENMENU_ROOT;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = iconList[0].hIcolib;
hGCRoot = hCLRoot = hRoot = hMenuRoot = Menu_AddProtoMenuItem(&mi);
}
else {
mi.hParentMenu = hRoot;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.ptszName = LPGENT("Conference");
mi.position = 200001;
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index 9019e9278b..76f99f114f 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -60,7 +60,7 @@ void GGPROTO::gc_menus_init(HGENMENU hRoot) char service[64];
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.hParentMenu = hRoot;
// Conferencing
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index b82554d567..b9c925d1d4 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -520,7 +520,7 @@ void GGPROTO::import_init(HGENMENU hRoot) CreateProtoService(GGS_IMPORT_SERVER, &GGPROTO::import_server);
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.hParentMenu = hRoot;
mi.position = 2000500001;
mi.icolibItem = iconList[1].hIcolib;
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp index 15a1da12a8..f8f04874d1 100644 --- a/protocols/Gadu-Gadu/src/links.cpp +++ b/protocols/Gadu-Gadu/src/links.cpp @@ -27,7 +27,7 @@ #define GGS_PARSELINK "GG/ParseLink"
#define GGS_MENUCHOOSE "GG/MenuChoose"
-static HANDLE hInstanceMenu;
+static int hInstanceMenu;
static INT_PTR gg_menuchoose(WPARAM wParam, LPARAM lParam)
{
diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp index 2e7339e74d..1b19989681 100644 --- a/protocols/Gadu-Gadu/src/sessions.cpp +++ b/protocols/Gadu-Gadu/src/sessions.cpp @@ -421,7 +421,7 @@ void GGPROTO::sessions_menus_init(HGENMENU hRoot) CreateProtoService(GGS_CONCUR_SESS, &GGPROTO::sessions_view);
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.hParentMenu = hRoot;
mi.position = (hMenuRoot) ? 2050000001 : 200003;
mi.icolibItem = iconList[16].hIcolib;
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 52d92259e1..ef3635738c 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -34,8 +34,7 @@ void CIrcProto::InitMainMenus(void) // Root popupmenuitem
mi.ptszName = m_tszUserName;
mi.position = -1999901010;
- mi.hParentMenu = HGENMENU_ROOT;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = GetIconHandle(IDI_MAIN);
hRoot = hMenuRoot = Menu_AddProtoMenuItem(&mi);
}
@@ -46,7 +45,7 @@ void CIrcProto::InitMainMenus(void) }
}
- mi.flags = CMIF_ROOTHANDLE;
+ mi.flags = 0;
mi.pszName = LPGEN("&Quick connect");
mi.icolibItem = GetIconHandle(IDI_QUICK);
mir_strcpy(d, IRC_QUICKCONNECT);
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp index 21c1a1374c..28cd0a0d7d 100644 --- a/protocols/IcqOscarJ/src/icq_xstatus.cpp +++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp @@ -838,7 +838,6 @@ void CIcqProto::InitXStatusItems(BOOL bAllowStatus) {
size_t len = mir_strlen(m_szModuleName);
char srvFce[MAX_PATH + 64];
- char szItem[MAX_PATH + 64];
int bXStatusMenuBuilt = 0;
BYTE bXStatus = getContactXStatus(NULL);
@@ -853,12 +852,13 @@ void CIcqProto::InitXStatusItems(BOOL bAllowStatus) if (m_bHideXStatusUI || m_bHideXStatusMenu)
return;
- mir_snprintf(szItem, _countof(szItem), Translate("%s Custom Status"), m_szModuleName);
-
CLISTMENUITEM mi = { 0 };
- mi.pszPopupName = szItem;
- // mi.popupPosition = 500084000; !!!!!!!!!!!!!!!!
mi.position = 2000040000;
+ {
+ TCHAR szItem[MAX_PATH + 64];
+ mir_sntprintf(szItem, _countof(szItem), TranslateT("%s Custom Status"), m_tszUserName);
+ mi.hParentMenu = Menu_CreateRoot(MO_STATUS, szItem, 500084000);
+ }
for (int i = 0; i <= XSTATUS_COUNT; i++) {
mir_snprintf(srvFce, _countof(srvFce), "%s/menuXStatus%d", m_szModuleName, i);
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 53414f2e6c..7ef067e026 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -34,7 +34,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MENUITEM_RESOURCES 10
static MWindowList hDialogsList = NULL;
-static HANDLE hChooserMenu, hStatusMenuInit;
+static HANDLE hStatusMenuInit;
+
+static int hChooserMenu;
static int iChooserMenuPos = 30000;
static HGENMENU g_hMenuRequestAuth;
@@ -282,11 +284,10 @@ void g_MenuInit(void) mi.pszService = "Jabber/DirectPresenceDummySvc";
mi.pszName = LPGEN("Send Presence");
mi.position = -1999901011;
- mi.hParentMenu = HGENMENU_ROOT;
mi.icolibItem = g_GetIconHandle(IDI_NOTES);
g_hMenuDirectPresence[0] = Menu_AddContactMenuItem(&mi);
- mi.flags |= CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags |= CMIF_TCHAR;
for (int i = 0; i < _countof(PresenceModeArray); i++) {
char buf[] = "Jabber/DirectPresenceX";
buf[_countof(buf) - 2] = '0' + i;
@@ -299,13 +300,12 @@ void g_MenuInit(void) CreateServiceFunctionParam(mi.pszService, JabberMenuHandleDirectPresence, PresenceModeArray[i].mode);
}
- mi.flags &= ~(CMIF_ROOTHANDLE | CMIF_TCHAR);
+ mi.flags &= ~(CMIF_TCHAR);
// Resource selector
mi.pszService = "Jabber/ResourceSelectorDummySvc";
mi.pszName = LPGEN("Jabber Resource");
mi.position = -1999901011;
- mi.hParentMenu = HGENMENU_ROOT;
mi.icolibItem = g_GetIconHandle(IDI_JABBER);
g_hMenuResourcesRoot = Menu_AddContactMenuItem(&mi);
@@ -314,7 +314,6 @@ void g_MenuInit(void) mi.position = -1999901000;
mi.hParentMenu = g_hMenuResourcesRoot;
mi.icolibItem = g_GetIconHandle(IDI_JABBER);
- mi.flags |= CMIF_ROOTHANDLE;
g_hMenuResourcesActive = Menu_AddContactMenuItem(&mi);
CreateServiceFunctionParam(mi.pszService, JabberMenuHandleResource, MENUITEM_LASTSEEN);
@@ -422,9 +421,6 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) char* tDest = text + nModuleNameLength;
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE;
- mi.position = 0;
- mi.icolibItem = NULL;
mi.pszService = text;
mi.pszContactOwner = m_szModuleName;
@@ -597,8 +593,7 @@ void CJabberProto::MenuInit() if (hJabberRoot == NULL) {
mi.ptszName = m_tszUserName;
mi.position = -1999901006;
- mi.hParentMenu = HGENMENU_ROOT;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = m_hProtoIcon;
hJabberRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi);
}
@@ -611,7 +606,7 @@ void CJabberProto::MenuInit() // "Bookmarks..."
CreateProtoService("/Bookmarks", &CJabberProto::OnMenuHandleBookmarks);
mir_strcpy(tDest, "/Bookmarks");
- mi.flags = CMIF_ROOTHANDLE;
+ mi.flags = 0;
mi.hParentMenu = hJabberRoot;
mi.pszName = LPGEN("Bookmarks");
mi.position = 200001;
@@ -628,7 +623,6 @@ void CJabberProto::MenuInit() // "Service Discovery..."
CreateProtoService("/ServiceDiscovery", &CJabberProto::OnMenuHandleServiceDiscovery);
mir_strcpy(tDest, "/ServiceDiscovery");
- mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Service Discovery");
mi.position = 2000050001;
mi.icolibItem = GetIconHandle(IDI_SERVICE_DISCOVERY);
@@ -708,7 +702,7 @@ void CJabberProto::MenuInit() mi.pszContactOwner = m_szModuleName;
mi.hParentMenu = hJabberRoot;
mi.pszName = LPGEN("Resource priority");
- mi.flags = CMIF_ROOTHANDLE | CMIF_HIDDEN;
+ mi.flags = CMIF_HIDDEN;
m_hMenuPriorityRoot = Menu_AddProtoMenuItem(&mi);
TCHAR szName[128];
@@ -716,7 +710,7 @@ void CJabberProto::MenuInit() mi.pszService = srvFce;
mi.ptszName = szName;
mi.position = 2000040000;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.hParentMenu = m_hMenuPriorityRoot;
mir_snprintf(srvFce, _countof(srvFce), "%s/menuSetPriority/0", m_szModuleName);
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index 9bfeb7e63e..c0094d836e 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -2094,7 +2094,7 @@ void CJabberProto::BuildPrivacyMenu() mi.position = 200005;
mi.pszContactOwner = m_szModuleName;
mi.icolibItem = GetIconHandle(IDI_AGENTS);
- mi.flags = CMIF_ROOTHANDLE | CMIF_HIDDEN;
+ mi.flags = CMIF_HIDDEN;
mi.pszName = LPGEN("Privacy Lists");
mi.hParentMenu = Menu_GetProtocolRoot(m_szModuleName);
m_hPrivacyMenuRoot = Menu_AddProtoMenuItem(&mi);
@@ -2104,7 +2104,7 @@ void CJabberProto::BuildPrivacyMenu() mir_snprintf(srvFce, _countof(srvFce), "%s/PrivacyLists", m_szModuleName);
mi.pszService = srvFce;
mi.position = 3000040000;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.icolibItem = GetIconHandle(IDI_PRIVACY_LISTS);
mi.ptszName = LPGENT("List Editor...");
mi.hParentMenu = m_hPrivacyMenuRoot;
@@ -2125,7 +2125,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) CLISTMENUITEM mi = { 0 };
mi.position = 2000040000;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.hParentMenu = m_hPrivacyMenuRoot;
mi.pszService = srvFce;
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 4c4b472218..85c9464cf6 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -469,7 +469,7 @@ void CPepGuiService::RebuildMenu() mi.hParentMenu = hJabberRoot;
mi.pszService = szService;
mi.position = 200010;
- mi.flags = CMIF_TCHAR | CMIF_HIDDEN | CMIF_ROOTHANDLE;
+ mi.flags = CMIF_TCHAR | CMIF_HIDDEN;
mi.icolibItem = m_hIcolibItem;
mi.ptszName = m_szText ? m_szText : _T("<advanced status slot>");
m_hMenuItem = Menu_AddProtoMenuItem(&mi);
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp index fe73fa2ca1..a8ad1ff78d 100644 --- a/protocols/MRA/src/Mra_menus.cpp +++ b/protocols/MRA/src/Mra_menus.cpp @@ -286,8 +286,7 @@ int CMraProto::MraRebuildStatusMenu(WPARAM, LPARAM) CLISTMENUITEM mi = { 0 };
mi.position = 2000060000;
- // mi.popupPosition = 500085000;
- mi.ptszPopupName = szItem;
+ mi.hParentMenu = Menu_CreateRoot(MO_STATUS, szItem, 500085000);
mi.flags = CMIF_UNICODE;
mi.pszService = szServiceFunction;
mi.pszContactOwner = m_szModuleName;
@@ -338,27 +337,24 @@ HGENMENU CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bI hRootMenu = Menu_GetProtocolRoot(m_szModuleName);
if (hRootMenu == NULL) {
mi.ptszName = m_tszUserName;
- mi.hParentMenu = HGENMENU_ROOT;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.hIcon = g_hMainIcon;
hRootMenu = Menu_AddProtoMenuItem(&mi);
}
mi.position = 20003;
mi.hParentMenu = hRootMenu;
- mi.flags = CMIF_ROOTHANDLE;
}
else {
fnAddFunc = Menu_AddContactMenuItem;
mi.position = lPosition;
- mi.flags = CMIF_ROOTHANDLE;
}
+ mi.flags = 0;
mi.pszName = LPGEN("Services...");
mi.hIcon = g_hMainIcon;
hRootMenu = fnAddFunc(&mi);
- mi.flags = CMIF_ROOTHANDLE;
mi.hParentMenu = hRootMenu;
mi.pszService = szServiceFunction;
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index 89c0bdabe0..2a43ea284b 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -277,8 +277,7 @@ void CMsnProto::MsnInitMainMenu(void) HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
mi.position = 500085000;
- mi.hParentMenu = HGENMENU_ROOT;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = GetIconHandle(IDI_MSN);
mi.ptszName = m_tszUserName;
hRoot = mainMenuRoot = Menu_AddProtoMenuItem(&mi);
@@ -288,7 +287,7 @@ void CMsnProto::MsnInitMainMenu(void) mainMenuRoot = NULL;
}
- mi.flags = CMIF_ROOTHANDLE;
+ mi.flags = 0;
mi.hParentMenu = hRoot;
mi.pszService = servicefunction;
diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp index 8d24cb25f7..0d072a76b3 100644 --- a/protocols/SkypeWeb/src/skype_menus.cpp +++ b/protocols/SkypeWeb/src/skype_menus.cpp @@ -120,8 +120,7 @@ int CSkypeProto::OnInitStatusMenu() {
mi.ptszName = m_tszUserName;
mi.position = -1999901006;
- mi.hParentMenu = HGENMENU_ROOT;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = Skin_GetIconHandle("main");
hStatusMunuRoot = /*m_hMenuRoot = */Menu_AddProtoMenuItem(&mi);
}
@@ -133,7 +132,7 @@ int CSkypeProto::OnInitStatusMenu() m_hMenuRoot = NULL;
}*/
mi.hParentMenu = hStatusMunuRoot;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mir_strcpy(tDest, "/CreateNewChat");
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp index 6b76a93220..1032d56037 100644 --- a/protocols/Steam/src/steam_menus.cpp +++ b/protocols/Steam/src/steam_menus.cpp @@ -1,6 +1,6 @@ #include "stdafx.h"
-HANDLE CSteamProto::hChooserMenu;
+int CSteamProto::hChooserMenu;
HGENMENU CSteamProto::contactMenuItems[CMI_MAX];
template<int(__cdecl CSteamProto::*Service)(WPARAM, LPARAM)>
@@ -108,7 +108,7 @@ void CSteamProto::OnInitStatusMenu() mi.ptszName = m_tszUserName;
mi.position = -1999901006;
mi.hParentMenu = HGENMENU_ROOT;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
//mi.icolibItem = NULL;
hSteamRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi);
}
@@ -118,7 +118,7 @@ void CSteamProto::OnInitStatusMenu() }
mi.hParentMenu = hSteamRoot;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
// Show block list
mir_strcpy(tDest, "/BlockList");
diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index eed74c5c42..ef83b7dc14 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -160,7 +160,7 @@ protected: // menus
HGENMENU m_hMenuRoot;
- static HANDLE hChooserMenu;
+ static int hChooserMenu;
static HGENMENU contactMenuItems[CMI_MAX];
int __cdecl AuthRequestCommand(WPARAM, LPARAM);
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index c8cda6ec35..d7334edd89 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -266,16 +266,7 @@ void TlenProtocol::initMenuItems() CLISTMENUITEM mi = { 0 };
mi.pszContactOwner = m_szModuleName;
-
- mi.ptszName = m_tszUserName;
- mi.position = -1999901009;
- mi.hParentMenu = HGENMENU_ROOT;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
- mi.icolibItem = GetIconHandle(IDI_TLEN);
- hMenuRoot = Menu_AddMainMenuItem(&mi);
-
- mi.flags = CMIF_ROOTHANDLE;
- mi.hParentMenu = (HGENMENU)hMenuRoot;
+ mi.hParentMenu = hMenuRoot = Menu_CreateRoot(MO_MAIN, m_tszUserName, -1999901009, GetIconHandle(IDI_TLEN));
mi.pszService = text;
hMenuChats = NULL;
diff --git a/protocols/Tox/src/tox_menus.cpp b/protocols/Tox/src/tox_menus.cpp index 34f00da9ec..6aab96385e 100644 --- a/protocols/Tox/src/tox_menus.cpp +++ b/protocols/Tox/src/tox_menus.cpp @@ -88,20 +88,13 @@ int CToxProto::OnInitStatusMenu() {
mi.ptszName = m_tszUserName;
mi.position = -1999901006;
- mi.hParentMenu = HGENMENU_ROOT;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = Skin_GetIconHandle("main");
- hStatusMunuRoot = /*m_hMenuRoot = */Menu_AddProtoMenuItem(&mi);
+ hStatusMunuRoot = Menu_AddProtoMenuItem(&mi);
}
- /*else
- {
- if (m_hMenuRoot)
- Menu_RemoveItem(m_hMenuRoot, 0);
- m_hMenuRoot = NULL;
- }*/
mi.hParentMenu = hStatusMunuRoot;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
// Create copy tox id command
mir_strcpy(tDest, "/CopyToxID");
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 5870a8f12f..2dbbf5f1f7 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -264,7 +264,7 @@ int TwitterProto::OnBuildStatusMenu(WPARAM, LPARAM) mi.pszService = text;
mi.hParentMenu = hRoot;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.position = 1001;
Menu_AddStatusMenuItem(&mi);
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 5b626653f8..dfd5bfcea4 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -195,7 +195,6 @@ void CVkProto::InitMenus() char szService[100];
// Proto menu
- mi.flags = CMIF_ROOTHANDLE;
mi.hParentMenu = Menu_GetProtocolRoot(m_szModuleName);
mir_snprintf(szService, "%s%s", m_szModuleName, PS_CREATECHAT);
@@ -305,7 +304,6 @@ void CVkProto::InitMenus() mi.pszService = szService;
g_hContactMenuItems[CMI_GETSERVERHISTORY] = Menu_AddContactMenuItem(&mi);
- mi.flags |= CMIF_ROOTHANDLE;
mi.hParentMenu = g_hContactMenuItems[CMI_GETSERVERHISTORY];
mir_snprintf(szService, "%s%s", m_szModuleName, PS_GETSERVERHISTORYLAST1DAY);
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp index 68c1602f27..d802870dad 100644 --- a/protocols/WhatsApp/src/theme.cpp +++ b/protocols/WhatsApp/src/theme.cpp @@ -57,8 +57,7 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam) HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
mi.position = 500085000;
- mi.hParentMenu = HGENMENU_ROOT;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | (isOnline() ? 0 : CMIF_GRAYED);
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | (isOnline() ? 0 : CMIF_GRAYED);
mi.icolibItem = GetIconHandle("whatsApp");
mi.ptszName = m_tszUserName;
hRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi);
@@ -70,7 +69,7 @@ int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam, LPARAM lParam) }
}
- mi.flags = CMIF_ROOTHANDLE | (isOnline() ? 0 : CMIF_GRAYED);
+ mi.flags = (isOnline() ? 0 : CMIF_GRAYED);
mi.position = 201001;
CreateProtoService("/CreateGroup", &WhatsAppProto::OnCreateGroup);
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp index 8f7f7b6d7f..8abedcb60c 100644 --- a/protocols/Xfire/src/Xfire_game.cpp +++ b/protocols/Xfire/src/Xfire_game.cpp @@ -437,8 +437,7 @@ void Xfire_game::createMenuitem(unsigned int pos, int dbid) dbid = pos;
CLISTMENUITEM mi = { 0 };
- // mi.popupPosition = 500084000; !!!!!!!!!!!!!!!!!!!!!!!!
- mi.pszPopupName = Translate("Start game");
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENW("Start game"), 500084000);
mi.pszContactOwner = protocolname;
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 624e79a184..344289044a 100644 --- a/protocols/Xfire/src/Xfire_gamelist.cpp +++ b/protocols/Xfire/src/Xfire_gamelist.cpp @@ -242,11 +242,10 @@ void Xfire_gamelist::clearGamelist() { void Xfire_gamelist::createDummyMenuItem()
{
CLISTMENUITEM mi = { 0 };
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENW("Start game"), 500084000);
mi.position = 500090001;
mi.pszName = Translate("Please wait...");
mi.hIcon = LoadIcon(hinstance, MAKEINTRESOURCE(ID_OP));
- // mi.popupPosition = 500084000; !!!!!!!!!!!!!!!!!!!!!!!
- mi.pszPopupName = Translate("Start game");
mi.pszContactOwner = protocolname;
dummymenuitem = Menu_AddMainMenuItem(&mi);
}
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index ab71efc9ee..ab06f85b5c 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1114,7 +1114,7 @@ extern "C" __declspec(dllexport) int Load(void) // erweiterte Kontextmenüpunkte
CLISTMENUITEM mi = { 0 };
- mi.ptszPopupName = _T(protocolname);
+ mi.hParentMenu = Menu_CreateRoot(MO_CONTACT, _T(protocolname), 500090000);
mi.flags = CMIF_TCHAR;
char servicefunction[100];
@@ -1188,6 +1188,7 @@ extern "C" __declspec(dllexport) int Load(void) blockfriend = Menu_AddContactMenuItem(&mi);
// my fire profile
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, _T(protocolname), 500090000);
mir_strcpy(servicefunction, protocolname);
mir_strcat(servicefunction, "GotoProfile2");
CreateServiceFunction(servicefunction, GotoProfile2);
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index 644de2d398..a66b451843 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -368,19 +368,19 @@ void CYahooProto::MenuMainInit(void) HGENMENU hRoot = Menu_GetProtocolRoot(m_szModuleName);
if (hRoot == NULL) {
mi.position = 500015000;
- mi.hParentMenu = HGENMENU_ROOT;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.icolibItem = GetIconHandle(IDI_YAHOO);
mi.ptszName = m_tszUserName;
hRoot = mainMenuRoot = Menu_AddProtoMenuItem(&mi);
}
else {
- if (mainMenuRoot)
+ if (mainMenuRoot) {
Menu_RemoveItem(mainMenuRoot);
- mainMenuRoot = NULL;
+ mainMenuRoot = NULL;
+ }
}
- mi.flags = CMIF_ROOTHANDLE;
+ mi.flags = 0;
mi.hParentMenu = hRoot;
// Show custom status menu
|