From 30707c980d1560b358dbf2671a4d2a26a1e8173c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Nov 2012 21:45:37 +0000 Subject: various menu initialization quirks git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Gadu-Gadu/src/import.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'protocols/Gadu-Gadu/src/import.cpp') 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..."); -- cgit v1.2.3