summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-29 19:30:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-29 19:30:51 +0000
commitee3100701b64a1a34e8e5b3069219c7c5a201d8a (patch)
tree65ae99da9575d2611734482dcedec21bf7f186db /protocols/JabberG
parentcadd3f86302d30d6d6a2e4af63a7a50f0dd1f1cb (diff)
- unified menu creation using wrapper class CMenuItem;
- duplicated hLangpack field removed from TMO_IntMenuItem; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@14440 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG')
-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
3 files changed, 20 insertions, 19 deletions
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;