summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/sessions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Gadu-Gadu/src/sessions.cpp')
-rw-r--r--protocols/Gadu-Gadu/src/sessions.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp
index 2888b5136f..48c460e432 100644
--- a/protocols/Gadu-Gadu/src/sessions.cpp
+++ b/protocols/Gadu-Gadu/src/sessions.cpp
@@ -425,19 +425,14 @@ BOOL GGPROTO::sessions_closedlg()
void GGPROTO::sessions_menus_init(HGENMENU hRoot)
{
- CLISTMENUITEM mi = {0};
char service[64];
+ mir_snprintf(service, sizeof(service), GGS_CONCUR_SESS, m_szModuleName);
+ createObjService(service, &GGPROTO::sessions_view);
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.hParentMenu = hRoot;
-
- mir_snprintf(service, sizeof(service), GGS_CONCUR_SESS, m_szModuleName);
- createObjService(service, &GGPROTO::sessions_view);
- if (hMenuRoot)
- mi.position = 2050000001;
- else
- mi.position = 200003;
+ mi.position = (hMenuRoot) ? 2050000001 : 200003;
mi.icolibItem = GetIconHandle(IDI_SESSIONS);
mi.ptszName = LPGENT("Concurrent &sessions");
mi.pszService = service;