summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-22 20:38:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-22 20:38:56 +0000
commit88790eed4ffd9ca555c8f9b73cb014a93b57a34f (patch)
treeb3e5bfe096005a9cac4bc14fdfbe5f6f5acad98a /protocols/Gadu-Gadu
parent9ecc2aa50e2183e2c4a11861ca6dede7d2151139 (diff)
Menu_ModifyItem unbound from CLISTMENUITEM structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@14334 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu')
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp11
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.cpp8
-rw-r--r--protocols/Gadu-Gadu/src/links.cpp11
3 files changed, 8 insertions, 22 deletions
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index a70b5a6710..ffeb1ecc65 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -212,13 +212,10 @@ static int gg_prebuildcontactmenu(WPARAM hContact, LPARAM lParam)
if (gg == NULL)
return 0;
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_NAME | CMIM_FLAGS | CMIF_TCHAR;
- if ( gg->getDword(hContact, GG_KEY_UIN, 0) == gg->getByte(GG_KEY_UIN, 0) ||
- gg->isChatRoom(hContact) || db_get_b(hContact, "CList", "NotOnList", 0))
- mi.flags |= CMIF_HIDDEN;
- mi.ptszName = gg->getByte(hContact, GG_KEY_BLOCK, 0) ? LPGENT("&Unblock") : LPGENT("&Block");
- Menu_ModifyItem(gg->hBlockMenuItem, &mi);
+ if (gg->getDword(hContact, GG_KEY_UIN, 0) == gg->getByte(GG_KEY_UIN, 0) || gg->isChatRoom(hContact) || db_get_b(hContact, "CList", "NotOnList", 0))
+ Menu_ShowItem(gg->hBlockMenuItem, false);
+ else
+ Menu_ModifyItem(gg->hBlockMenuItem, gg->getByte(hContact, GG_KEY_BLOCK, 0) ? LPGENT("&Unblock") : LPGENT("&Block"));
return 0;
}
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp
index ec5cf9c603..99f7c478e6 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.cpp
+++ b/protocols/Gadu-Gadu/src/gg_proto.cpp
@@ -764,12 +764,8 @@ int GGPROTO::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam)
break;
case EV_PROTO_ONRENAME:
- if (hMenuRoot) {
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_NAME | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- mi.ptszName = m_tszUserName;
- Menu_ModifyItem(hMenuRoot, &mi);
- }
+ if (hMenuRoot)
+ Menu_ModifyItem(hMenuRoot, m_tszUserName);
break;
case EV_PROTO_ONCONTACTDELETED:
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp
index eb1f590f35..a915416a63 100644
--- a/protocols/Gadu-Gadu/src/links.cpp
+++ b/protocols/Gadu-Gadu/src/links.cpp
@@ -63,18 +63,11 @@ static INT_PTR gg_parselink(WPARAM wParam, LPARAM lParam)
for (int i=0; i < g_Instances.getCount(); i++) {
gg = g_Instances[i];
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_FLAGS;
if (gg->m_iStatus > ID_STATUS_OFFLINE) {
++items;
- mi.flags |= CMIM_ICON;
- mi.hIcon = Skin_LoadProtoIcon(gg->m_szModuleName, gg->m_iStatus);
+ Menu_ModifyItem(gg->hInstanceMenuItem, NULL, Skin_LoadProtoIcon(gg->m_szModuleName, gg->m_iStatus));
}
- else mi.flags |= CMIF_HIDDEN;
-
- Menu_ModifyItem(gg->hInstanceMenuItem, &mi);
- if (mi.hIcon)
- IcoLib_ReleaseIcon(mi.hIcon);
+ else Menu_ShowItem(gg->hInstanceMenuItem, false);
}
if (items > 1) {