summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/import.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-28 21:45:37 +0000
commit30707c980d1560b358dbf2671a4d2a26a1e8173c (patch)
tree74aee5adaaac976e1398274ca64c5461a60f1feb /protocols/Gadu-Gadu/src/import.cpp
parent335ec43a4bfdcbbd0b2257037f1f3e0553d89076 (diff)
various menu initialization quirks
git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/import.cpp')
-rw-r--r--protocols/Gadu-Gadu/src/import.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp
index 1bb5725222..7fd3d73b59 100644
--- a/protocols/Gadu-Gadu/src/import.cpp
+++ b/protocols/Gadu-Gadu/src/import.cpp
@@ -597,16 +597,14 @@ INT_PTR GGPROTO::export_server(WPARAM wParam, LPARAM lParam)
void GGPROTO::import_init(HGENMENU hRoot)
{
- CLISTMENUITEM mi = {0};
+ // Import from server item
char service[64];
+ mir_snprintf(service, sizeof(service), GGS_IMPORT_SERVER, m_szModuleName);
+ createObjService(service, &GGPROTO::import_server);
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTHANDLE;
mi.hParentMenu = hRoot;
-
- // Import from server item
- mir_snprintf(service, sizeof(service), GGS_IMPORT_SERVER, m_szModuleName);
- createObjService(service, &GGPROTO::import_server);
mi.position = 2000500001;
mi.icolibItem = GetIconHandle(IDI_IMPORT_SERVER);
mi.pszName = LPGEN("Import List From &Server");
@@ -616,6 +614,7 @@ void GGPROTO::import_init(HGENMENU hRoot)
// Import from textfile
mir_snprintf(service, sizeof(service), GGS_IMPORT_TEXT, m_szModuleName);
createObjService(service, &GGPROTO::import_text);
+
mi.position = 2000500002;
mi.icolibItem = GetIconHandle(IDI_IMPORT_TEXT);
mi.pszName = LPGEN("Import List From &Text File...");
@@ -625,6 +624,7 @@ void GGPROTO::import_init(HGENMENU hRoot)
// Remove from server
mir_snprintf(service, sizeof(service), GGS_REMOVE_SERVER, m_szModuleName);
createObjService(service, &GGPROTO::remove_server);
+
mi.position = 2000500003;
mi.icolibItem = GetIconHandle(IDI_REMOVE_SERVER);
mi.pszName = LPGEN("&Remove List From Server");
@@ -634,6 +634,7 @@ void GGPROTO::import_init(HGENMENU hRoot)
// Export to server
mir_snprintf(service, sizeof(service), GGS_EXPORT_SERVER, m_szModuleName);
createObjService(service, &GGPROTO::export_server);
+
mi.position = 2005000001;
mi.icolibItem = GetIconHandle(IDI_EXPORT_SERVER);
mi.pszName = LPGEN("Export List To &Server");
@@ -643,6 +644,7 @@ void GGPROTO::import_init(HGENMENU hRoot)
// Export to textfile
mir_snprintf(service, sizeof(service), GGS_EXPORT_TEXT, m_szModuleName);
createObjService(service, &GGPROTO::export_text);
+
mi.position = 2005000002;
mi.icolibItem = GetIconHandle(IDI_EXPORT_TEXT);
mi.pszName = LPGEN("Export List To &Text File...");