summaryrefslogtreecommitdiff
path: root/plugins/TopToolBar
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-12 12:37:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-12 12:37:54 +0000
commitf53121766f887f34a489c06669735ccbd2a859ab (patch)
treea7bb426cec7888b0e9fc2bbc3439849eade787ef /plugins/TopToolBar
parent9c62ad6bb204781819184f772992fec768cb4418 (diff)
obsolete flag TTBBF_ICONBYHANDLE removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@920 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TopToolBar')
-rw-r--r--plugins/TopToolBar/toolbar.cpp14
-rw-r--r--plugins/TopToolBar/ttbopt.cpp2
2 files changed, 9 insertions, 7 deletions
diff --git a/plugins/TopToolBar/toolbar.cpp b/plugins/TopToolBar/toolbar.cpp
index e9d6525c15..a9467708c2 100644
--- a/plugins/TopToolBar/toolbar.cpp
+++ b/plugins/TopToolBar/toolbar.cpp
@@ -207,12 +207,14 @@ TopButtonInt* CreateButton(TTBButton* but)
b->pszName = mir_strdup(but->name);
- if (b->dwFlags & TTBBF_ICONBYHANDLE) {
- b->hIconUp = Skin_GetIconByHandle(b->hIconHandleUp = but->hIconHandleUp);
- if (but->hIconHandleDn)
- b->hIconDn = Skin_GetIconByHandle(b->hIconHandleDn = but->hIconHandleDn);
- else
- b->hIconDn = 0, b->hIconHandleDn = 0;
+ b->hIconHandleUp = (HANDLE)CallService(MS_SKIN2_ISMANAGEDICON, WPARAM(but->hIconHandleUp), 0);
+ if (b->hIconHandleUp) {
+ b->hIconUp = Skin_GetIconByHandle(b->hIconHandleUp);
+ if (but->hIconHandleDn) {
+ b->hIconHandleDn = (HANDLE)CallService(MS_SKIN2_ISMANAGEDICON, WPARAM(but->hIconHandleDn), 0);
+ b->hIconDn = Skin_GetIconByHandle(b->hIconHandleDn);
+ }
+ else b->hIconDn = 0, b->hIconHandleDn = 0;
}
else {
char buf[256];
diff --git a/plugins/TopToolBar/ttbopt.cpp b/plugins/TopToolBar/ttbopt.cpp
index 3fa0b1916c..db7d78dcb5 100644
--- a/plugins/TopToolBar/ttbopt.cpp
+++ b/plugins/TopToolBar/ttbopt.cpp
@@ -25,7 +25,7 @@ static HTREEITEM AddLine(HWND hTree,TopButtonInt *b, HTREEITEM hItem, HIMAGELIST
index = -1;
}
else {
- if (b->dwFlags & TTBBF_ICONBYHANDLE) {
+ if (b->hIconHandleUp) {
HICON hIcon = Skin_GetIconByHandle(b->hIconHandleUp);
index = ImageList_AddIcon(il, hIcon);
Skin_ReleaseIcon(hIcon);