summaryrefslogtreecommitdiff
path: root/protocols/Tlen/src/tlen.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/Tlen/src/tlen.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/Tlen/src/tlen.cpp')
-rw-r--r--protocols/Tlen/src/tlen.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp
index d8a0a00652..05c76957f5 100644
--- a/protocols/Tlen/src/tlen.cpp
+++ b/protocols/Tlen/src/tlen.cpp
@@ -156,10 +156,9 @@ int TlenPrebuildContactMenu(void *ptr, WPARAM wParam, LPARAM lParam)
{
HANDLE hContact;
DBVARIANT dbv;
- CLISTMENUITEM clmi = {0};
+ CLISTMENUITEM clmi = { sizeof(clmi) };
JABBER_LIST_ITEM *item;
TlenProtocol *proto = (TlenProtocol *)ptr;
- clmi.cbSize = sizeof(CLISTMENUITEM);
if ((hContact=(HANDLE) wParam) != NULL && proto->isOnline) {
if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
if ((item=JabberListGetItemPtr(proto, LIST_ROSTER, dbv.pszVal)) != NULL) {
@@ -353,13 +352,9 @@ int TlenPreShutdown(void *ptr, WPARAM wParam, LPARAM lParam)
static void initMenuItems(TlenProtocol *proto)
{
-
char text[_MAX_PATH];
- CLISTMENUITEM mi, clmi;
- memset(&mi, 0, sizeof(CLISTMENUITEM));
- mi.cbSize = sizeof(CLISTMENUITEM);
- memset(&clmi, 0, sizeof(CLISTMENUITEM));
- clmi.cbSize = sizeof(CLISTMENUITEM);
+
+ CLISTMENUITEM mi = { sizeof(mi) }, clmi = { sizeof(clmi) };
clmi.flags = CMIM_FLAGS | CMIF_GRAYED;
mi.pszContactOwner = proto->m_szModuleName;
@@ -411,7 +406,6 @@ static void initMenuItems(TlenProtocol *proto)
mi.hParentMenu = NULL;
-
// "Send picture"
sprintf(text, "%s/SendPicture", proto->m_szModuleName);
CreateServiceFunction_Ex(text, proto, TlenContactMenuHandleSendPicture);