summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-06-02 16:04:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-06-02 16:04:56 +0300
commit3d3e230abad4846ecfbe9aecb14cfcfd94a4d854 (patch)
treef293a41364a26f5e562a992b5a6595683b28b762 /src/mir_app
parentb97afa71c6593939d96244cd19053846b9992a61 (diff)
fixes #1974 (Jabber: buttons' icons disappear after clicking Ok)
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/skinicons.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mir_app/src/skinicons.cpp b/src/mir_app/src/skinicons.cpp
index 73e4e6fb7e..b5ecd34c88 100644
--- a/src/mir_app/src/skinicons.cpp
+++ b/src/mir_app/src/skinicons.cpp
@@ -208,7 +208,8 @@ MIR_APP_DLL(void) Button_SetSkin_IcoLib(HWND hwndDlg, int itemId, int iconId, co
HWND hWnd = GetDlgItem(hwndDlg, itemId);
SendMessage(hWnd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(iconId, false));
SendMessage(hWnd, BUTTONSETASFLATBTN, TRUE, 0);
- SendMessage(hWnd, BUTTONADDTOOLTIP, (WPARAM)tooltip, 0);
+ if (tooltip)
+ SendMessage(hWnd, BUTTONADDTOOLTIP, (WPARAM)tooltip, 0);
}
MIR_APP_DLL(void) Button_SetIcon_IcoLib(HWND hwndDlg, int itemId, HANDLE hIcolib, const char *tooltip)
@@ -216,7 +217,8 @@ MIR_APP_DLL(void) Button_SetIcon_IcoLib(HWND hwndDlg, int itemId, HANDLE hIcolib
HWND hWnd = GetDlgItem(hwndDlg, itemId);
SendMessage(hWnd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(hIcolib, false));
SendMessage(hWnd, BUTTONSETASFLATBTN, TRUE, 0);
- SendMessage(hWnd, BUTTONADDTOOLTIP, (WPARAM)tooltip, 0);
+ if (tooltip)
+ SendMessage(hWnd, BUTTONADDTOOLTIP, (WPARAM)tooltip, 0);
}
MIR_APP_DLL(void) Button_FreeIcon_IcoLib(HWND hwndDlg, int itemId)