summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/Notifications.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-05-22 20:15:32 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-05-22 20:15:32 +0000
commitba020540c064ebd48bf6b77e5bd5e11255766f23 (patch)
treead87b13d4dbc6cc43a489aa1022b28b48d0e2dd5 /plugins/PluginUpdater/src/Notifications.cpp
parentc09aa99a7e9915c503064d6eb5e9dd1bdd2a673f (diff)
-PluginUpdater:
-code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@13765 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/Notifications.cpp')
-rw-r--r--plugins/PluginUpdater/src/Notifications.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp
index ac5ba40acd..9edd5348be 100644
--- a/plugins/PluginUpdater/src/Notifications.cpp
+++ b/plugins/PluginUpdater/src/Notifications.cpp
@@ -101,7 +101,11 @@ void ShowPopup(LPCTSTR ptszTitle, LPCTSTR ptszText, int Number)
if (db_get_b(NULL, MODNAME, setting, DEFAULT_POPUP_ENABLED)) {
POPUPDATAT pd = { 0 };
pd.lchContact = NULL;
+#if MIRANDA_VER >= 0x0A00
+ pd.lchIcon = Skin_GetIconByHandle(iconList[0].hIcolib);
+#else
pd.lchIcon = Skin_GetIcon("check_update");
+#endif
if (Number == POPUP_TYPE_MSG) {
pd.PluginWindowProc = PopupDlgProcRestart;
pd.iSeconds = -1;
@@ -132,21 +136,13 @@ void ShowPopup(LPCTSTR ptszTitle, LPCTSTR ptszText, int Number)
}
}
- if (Number == POPUP_TYPE_ERROR) {
- int iMsgType;
- switch (Number) {
- case POPUP_TYPE_MSG: iMsgType = MB_ICONSTOP; break;
- case POPUP_TYPE_ERROR: iMsgType = MB_ICONINFORMATION; break;
- case POPUP_TYPE_INFO: iMsgType = MB_ICONQUESTION; break;
- default: iMsgType = 0;
- }
- MessageBox(0, ptszText, ptszTitle, iMsgType);
- }
+ if (Number == POPUP_TYPE_ERROR)
+ MessageBox(0, ptszText, ptszTitle, MB_ICONINFORMATION);
}
-int ImageList_AddIconFromIconLib(HIMAGELIST hIml, const char *name)
+int ImageList_AddIconFromIconLib(HIMAGELIST hIml, int i)
{
- HICON icon = Skin_GetIconByHandle(Skin_GetIconHandle(name));
+ HICON icon = Skin_GetIconByHandle(iconList[i].hIcolib);
int res = ImageList_AddIcon(hIml, icon);
Skin_ReleaseIcon(icon);
return res;