diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-28 21:45:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-28 21:45:37 +0000 |
commit | 30707c980d1560b358dbf2671a4d2a26a1e8173c (patch) | |
tree | 74aee5adaaac976e1398274ca64c5461a60f1feb /plugins/SecureIM/src/svcs_clist.cpp | |
parent | 335ec43a4bfdcbbd0b2257037f1f3e0553d89076 (diff) |
various menu initialization quirks
git-svn-id: http://svn.miranda-ng.org/main/trunk@2552 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/src/svcs_clist.cpp')
-rw-r--r-- | plugins/SecureIM/src/svcs_clist.cpp | 53 |
1 files changed, 11 insertions, 42 deletions
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;
|