diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-27 12:54:43 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-27 12:54:43 +0000 |
commit | 3234474db8b36b1a644d8686c5a54d261748769f (patch) | |
tree | b01f6af0e7bca040d9b1b1fba66db2564a940217 /protocols/Gadu-Gadu | |
parent | d8be737e63c38f6a3a293158351b1fa4d62ecba6 (diff) |
fix for the protocols' menus
git-svn-id: http://svn.miranda-ng.org/main/trunk@14411 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu')
-rw-r--r-- | protocols/Gadu-Gadu/src/gg.cpp | 4 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/groupchat.cpp | 16 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/import.cpp | 44 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/sessions.cpp | 10 |
4 files changed, 29 insertions, 45 deletions
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index 95b23cc877..0e8d5463b0 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -274,12 +274,12 @@ void GGPROTO::menus_init() mi.name.t = LPGENT("Conference");
mi.position = 200001;
mi.icolibItem = iconList[14].hIcolib;
- hGCRoot = Menu_AddProtoMenuItem(&mi);
+ hGCRoot = Menu_AddProtoMenuItem(&mi, m_szModuleName);
mi.name.t = LPGENT("Contact list");
mi.position = 200002;
mi.icolibItem = iconList[7].hIcolib;
- hCLRoot = Menu_AddProtoMenuItem(&mi);
+ hCLRoot = Menu_AddProtoMenuItem(&mi, m_szModuleName);
if (hMenuRoot)
Menu_RemoveItem(hMenuRoot);
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index abecfa9c4a..61e1318022 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -57,29 +57,25 @@ int GGPROTO::gc_init() void GGPROTO::gc_menus_init(HGENMENU hRoot)
{
if (gc_enabled) {
- char service[64];
-
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.hParentMenu = hRoot;
// Conferencing
- mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_OPEN_CONF);
- CreateProtoService(GGS_OPEN_CONF, &GGPROTO::gc_openconf);
+ mi.pszService = GGS_OPEN_CONF;
+ CreateProtoService(mi.pszService, &GGPROTO::gc_openconf);
mi.position = 2000050001;
mi.icolibItem = iconList[14].hIcolib;
mi.name.t = LPGENT("Open &conference...");
- mi.pszService = service;
- hMainMenu[0] = Menu_AddProtoMenuItem(&mi);
+ hMainMenu[0] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
// Clear ignored conferences
- mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_CLEAR_IGNORED);
- CreateProtoService(GGS_CLEAR_IGNORED, &GGPROTO::gc_clearignored);
+ mi.pszService = GGS_CLEAR_IGNORED;
+ CreateProtoService(mi.pszService, &GGPROTO::gc_clearignored);
mi.position = 2000050002;
mi.icolibItem = iconList[15].hIcolib;
mi.name.t = LPGENT("&Clear ignored conferences");
- mi.pszService = service;
- hMainMenu[1] = Menu_AddProtoMenuItem(&mi);
+ hMainMenu[1] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
}
}
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index 1c8b286dee..7a4cea35cd 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -514,57 +514,47 @@ INT_PTR GGPROTO::export_server(WPARAM wParam, LPARAM lParam) void GGPROTO::import_init(HGENMENU hRoot)
{
- // Import from server item
- char service[64];
- mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_IMPORT_SERVER);
- CreateProtoService(GGS_IMPORT_SERVER, &GGPROTO::import_server);
-
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.hParentMenu = hRoot;
+
+ // Import from server item
+ mi.pszService = GGS_IMPORT_SERVER;
+ CreateProtoService(mi.pszService, &GGPROTO::import_server);
mi.position = 2000500001;
mi.icolibItem = iconList[1].hIcolib;
mi.name.t = LPGENT("Import List From &Server");
- mi.pszService = service;
- hMainMenu[2] = Menu_AddProtoMenuItem(&mi);
+ hMainMenu[2] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
// Import from textfile
- mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_IMPORT_TEXT);
- CreateProtoService(GGS_IMPORT_TEXT, &GGPROTO::import_text);
-
+ mi.pszService = GGS_IMPORT_TEXT;
+ CreateProtoService(mi.pszService, &GGPROTO::import_text);
mi.position = 2000500002;
mi.icolibItem = iconList[2].hIcolib;
mi.name.t = LPGENT("Import List From &Text File...");
- mi.pszService = service;
- hMainMenu[3] = Menu_AddProtoMenuItem(&mi);
+ hMainMenu[3] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
// Remove from server
- mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_REMOVE_SERVER);
- CreateProtoService(GGS_REMOVE_SERVER, &GGPROTO::remove_server);
-
+ mi.pszService = GGS_REMOVE_SERVER;
+ CreateProtoService(mi.pszService, &GGPROTO::remove_server);
mi.position = 2000500003;
mi.icolibItem = iconList[3].hIcolib;
mi.name.t = LPGENT("&Remove List From Server");
- mi.pszService = service;
- hMainMenu[4] = Menu_AddProtoMenuItem(&mi);
+ hMainMenu[4] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
// Export to server
- mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_EXPORT_SERVER);
- CreateProtoService(GGS_EXPORT_SERVER, &GGPROTO::export_server);
-
+ mi.pszService = GGS_EXPORT_SERVER;
+ CreateProtoService(mi.pszService, &GGPROTO::export_server);
mi.position = 2005000001;
mi.icolibItem = iconList[4].hIcolib;
mi.name.t = LPGENT("Export List To &Server");
- mi.pszService = service;
- hMainMenu[5] = Menu_AddProtoMenuItem(&mi);
+ hMainMenu[5] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
// Export to textfile
- mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_EXPORT_TEXT);
- CreateProtoService(GGS_EXPORT_TEXT, &GGPROTO::export_text);
-
+ mi.pszService = GGS_EXPORT_TEXT;
+ CreateProtoService(mi.pszService, &GGPROTO::export_text);
mi.position = 2005000002;
mi.icolibItem = iconList[5].hIcolib;
mi.name.t = LPGENT("Export List To &Text File...");
- mi.pszService = service;
- hMainMenu[6] = Menu_AddProtoMenuItem(&mi);
+ hMainMenu[6] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
}
diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp index 748c8751de..4823849635 100644 --- a/protocols/Gadu-Gadu/src/sessions.cpp +++ b/protocols/Gadu-Gadu/src/sessions.cpp @@ -416,16 +416,14 @@ BOOL GGPROTO::sessions_closedlg() void GGPROTO::sessions_menus_init(HGENMENU hRoot)
{
- char service[64];
- mir_snprintf(service, _countof(service), "%s%s", m_szModuleName, GGS_CONCUR_SESS);
- CreateProtoService(GGS_CONCUR_SESS, &GGPROTO::sessions_view);
-
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.hParentMenu = hRoot;
+
+ mi.pszService = GGS_CONCUR_SESS;
+ CreateProtoService(mi.pszService, &GGPROTO::sessions_view);
mi.position = (hMenuRoot) ? 2050000001 : 200003;
mi.icolibItem = iconList[16].hIcolib;
mi.name.t = LPGENT("Concurrent &sessions");
- mi.pszService = service;
- Menu_AddProtoMenuItem(&mi);
+ Menu_AddProtoMenuItem(&mi, m_szModuleName);
}
|