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 --- plugins/SecureIM/src/svcs_clist.cpp | 53 ++++++++----------------------------- 1 file changed, 11 insertions(+), 42 deletions(-) (limited to 'plugins/SecureIM/src/svcs_clist.cpp') diff --git a/plugins/SecureIM/src/svcs_clist.cpp b/plugins/SecureIM/src/svcs_clist.cpp index e7aa7f8379..a37dbf70d5 100644 --- a/plugins/SecureIM/src/svcs_clist.cpp +++ b/plugins/SecureIM/src/svcs_clist.cpp @@ -11,56 +11,28 @@ int __cdecl onContactSettingChanged(WPARAM wParam,LPARAM lParam) { int stat = getContactStatus(hContact); if (!ptr || stat==-1) return 0; -// HANDLE hMetaContact = getMetaContact(hContact); -// if(hMetaContact) { -// ptr = getUinKey(hMetaContact); -// if (!ptr) return 0; -// } - if (stat==ID_STATUS_OFFLINE) { // go offline if (ptr->mode==MODE_NATIVE && cpp_keyx(ptr->cntx)) { // have active context cpp_delete_context(ptr->cntx); ptr->cntx=0; // reset context -// if(hMetaContact) { // is subcontact of metacontact -// showPopUpDC(hMetaContact); -// ShowStatusIconNotify(hMetaContact); -// if(getMostOnline(hMetaContact)) { // make handover -// CallContactService(hMetaContact,PSS_MESSAGE,0,(LPARAM)SIG_INIT); -// } -// } -// else { // is contact or metacontact (not subcontact) - showPopUpDC(hContact); // show popup "Disabled" - ShowStatusIconNotify(hContact); // change icon in CL -// } + showPopUpDC(hContact); // show popup "Disabled" + ShowStatusIconNotify(hContact); // change icon in CL } - else - if (ptr->mode==MODE_RSAAES && exp->rsa_get_state(ptr->cntx)==7) { + else if (ptr->mode==MODE_RSAAES && exp->rsa_get_state(ptr->cntx)==7) { deleteRSAcntx(ptr); -// if(hMetaContact) { // is subcontact of metacontact -// showPopUpDC(hMetaContact); -// ShowStatusIconNotify(hMetaContact); -// if(getMostOnline(hMetaContact)) { // make handover -// CallContactService(hMetaContact,PSS_MESSAGE,0,(LPARAM)SIG_INIT); -// } -// } -// else { // is contact or metacontact (not subcontact) - showPopUpDC(hContact); // show popup "Disabled" - ShowStatusIconNotify(hContact); // change icon in CL -// } + showPopUpDC(hContact); // show popup "Disabled" + ShowStatusIconNotify(hContact); // change icon in CL } } else { // go not offline -// if (!hMetaContact) { // is contact or metacontact (not subcontact) - if (ptr->offlineKey) { - cpp_reset_context(ptr->cntx); - ptr->offlineKey = false; - } - ShowStatusIconNotify(hContact); // change icon in CL -// } + if (ptr->offlineKey) { + cpp_reset_context(ptr->cntx); + ptr->offlineKey = false; + } + ShowStatusIconNotify(hContact); // change icon in CL } return 0; } - // wParam=(WPARAM)(HANDLE)hContact // lParam=0 int __cdecl onContactAdded(WPARAM wParam,LPARAM lParam) { @@ -103,13 +75,10 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { pUinKey ptr = getUinKey(hContact); int i; - CLISTMENUITEM mi; - memset(&mi,0,sizeof(mi)); - mi.cbSize = sizeof(CLISTMENUITEM); - ShowStatusIconNotify(hContact); // check offline/online + CLISTMENUITEM mi = { sizeof(mi) }; if (!ptr) { // hide menu bars mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIF_HIDDEN; -- cgit v1.2.3