diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-10 21:08:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-10 21:08:51 +0000 |
commit | 6029165c364f93a84ab7e98ef71d3a711b0f588c (patch) | |
tree | 6149aea694a35781a0d4ed074fbfc64fc09f8875 /protocols/JabberG/src | |
parent | 6b1fbf4d40fa3b643aca4e9e82a132cc54f36b76 (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')
-rw-r--r-- | protocols/JabberG/src/jabber.cpp | 32 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 43 |
2 files changed, 40 insertions, 35 deletions
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 43190cdfd7..2c76951eb0 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -104,38 +104,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD miranda extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCOL, MIID_LAST};
///////////////////////////////////////////////////////////////////////////////
-// 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();
- return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
// OnModulesLoaded - execute some code when all plugins are initialized
static INT_PTR g_SvcParseXmppUri(WPARAM w, LPARAM l)
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
|