summaryrefslogtreecommitdiff
path: root/plugins/SimpleStatusMsg
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 /plugins/SimpleStatusMsg
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 'plugins/SimpleStatusMsg')
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index b520f6924e..4b12971e99 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -366,41 +366,34 @@ static int AwayMsgPreBuildMenu(WPARAM hContact, LPARAM lParam)
int iHidden = szProto ? db_get_b(hContact, szProto, "ChatRoom", 0) : 0;
int iStatus;
- CLISTMENUITEM clmi = { 0 };
- clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
if (!iHidden) {
iHidden = 1;
iStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGRECV) {
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(iStatus == ID_STATUS_OFFLINE ? ID_STATUS_INVISIBLE : iStatus)) {
iHidden = 0;
- clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
- clmi.hIcon = Skin_LoadProtoIcon(szProto, iStatus);
+ HICON hIcon = Skin_LoadProtoIcon(szProto, iStatus);
mir_sntprintf(str, _countof(str), TranslateT("Re&ad %s message"), pcli->pfnGetStatusModeDescription(iStatus, 0));
- clmi.ptszName = str;
+ Menu_ModifyItem(hAwayMsgMenuItem, str, hIcon, 0);
+ IcoLib_ReleaseIcon(hIcon);
}
}
}
- Menu_ModifyItem(hAwayMsgMenuItem, &clmi);
- IcoLib_ReleaseIcon(clmi.hIcon);
+ else Menu_ShowItem(hAwayMsgMenuItem, false);
ptrA szMsg(db_get_sa(hContact, "CList", "StatusMsg"));
- clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
if (!iHidden && szMsg != NULL) {
- clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR;
mir_sntprintf(str, _countof(str), TranslateT("Copy %s message"), pcli->pfnGetStatusModeDescription(iStatus, 0));
- clmi.ptszName = str;
+ Menu_ModifyItem(hCopyMsgMenuItem, str);
}
- Menu_ModifyItem(hCopyMsgMenuItem, &clmi);
+ else Menu_ShowItem(hCopyMsgMenuItem, false);
- clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
if (!iHidden && szMsg != NULL && StrFindURL(szMsg) != NULL) {
- clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR;
mir_sntprintf(str, _countof(str), TranslateT("&Go to URL in %s message"), pcli->pfnGetStatusModeDescription(iStatus, 0));
- clmi.ptszName = str;
+ Menu_ModifyItem(hGoToURLMenuItem, str);
}
- Menu_ModifyItem(hGoToURLMenuItem, &clmi);
+ else Menu_ShowItem(hGoToURLMenuItem, false);
return 0;
}