summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-10 21:08:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-10 21:08:51 +0000
commit6029165c364f93a84ab7e98ef71d3a711b0f588c (patch)
tree6149aea694a35781a0d4ed074fbfc64fc09f8875 /protocols/JabberG/src/jabber_proto.cpp
parent6b1fbf4d40fa3b643aca4e9e82a132cc54f36b76 (diff)
attempt to fix the most crazy pieces of status icons related code
git-svn-id: http://svn.miranda-ng.org/main/trunk@4417 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_proto.cpp')
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp43
1 files changed, 40 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index aa705faea9..8f68e215aa 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -295,13 +295,12 @@ int CJabberProto::OnModulesLoadedEx(WPARAM, LPARAM)
}
if (ServiceExists(MS_MSG_ADDICON)) {
- StatusIconData sid = {0};
- sid.cbSize = sizeof(sid);
+ StatusIconData sid = { sizeof(sid) };
sid.szModule = m_szModuleName;
sid.hIcon = sid.hIconDisabled = LoadIconEx("main");
sid.flags = MBF_HIDDEN;
sid.szTooltip = Translate("Jabber Resource");
- CallService(MS_MSG_ADDICON, 0, (LPARAM) &sid);
+ CallService(MS_MSG_ADDICON, 0, (LPARAM)&sid);
Skin_ReleaseIcon(sid.hIcon);
JHookEvent(ME_MSG_ICONPRESSED, &CJabberProto::OnProcessSrmmIconClick);
@@ -349,6 +348,44 @@ int CJabberProto::OnModulesLoadedEx(WPARAM, LPARAM)
return 0;
}
+///////////////////////////////////////////////////////////////////////////////
+// OnPreShutdown - prepares Miranda to be shut down
+
+int __cdecl CJabberProto::OnPreShutdown(WPARAM, LPARAM)
+{
+ UI_SAFE_CLOSE_HWND(m_hwndAgentRegInput);
+ UI_SAFE_CLOSE_HWND(m_hwndRegProgress);
+ UI_SAFE_CLOSE_HWND(m_hwndMucVoiceList);
+ UI_SAFE_CLOSE_HWND(m_hwndMucMemberList);
+ UI_SAFE_CLOSE_HWND(m_hwndMucModeratorList);
+ UI_SAFE_CLOSE_HWND(m_hwndMucBanList);
+ UI_SAFE_CLOSE_HWND(m_hwndMucAdminList);
+ UI_SAFE_CLOSE_HWND(m_hwndMucOwnerList);
+ UI_SAFE_CLOSE_HWND(m_hwndJabberChangePassword);
+ UI_SAFE_CLOSE_HWND(m_hwndJabberAddBookmark);
+ UI_SAFE_CLOSE_HWND(m_hwndPrivacyRule);
+
+ UI_SAFE_CLOSE(m_pDlgPrivacyLists);
+ UI_SAFE_CLOSE(m_pDlgBookmarks);
+ UI_SAFE_CLOSE(m_pDlgServiceDiscovery);
+ UI_SAFE_CLOSE(m_pDlgJabberJoinGroupchat);
+ UI_SAFE_CLOSE(m_pDlgNotes);
+
+ m_iqManager.ExpireAll();
+ m_iqManager.Shutdown();
+ m_messageManager.Shutdown();
+ m_presenceManager.Shutdown();
+ m_sendManager.Shutdown();
+ ConsoleUninit();
+
+ if (ServiceExists(MS_MSG_REMOVEICON)) {
+ StatusIconData sid = { sizeof(sid) };
+ sid.szModule = m_szModuleName;
+ CallService(MS_MSG_REMOVEICON, 0, (LPARAM)&sid);
+ }
+ return 0;
+}
+
////////////////////////////////////////////////////////////////////////////////////////
// JabberAddToList - adds a contact to the contact list