diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-28 15:35:32 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-28 15:35:32 +0000 |
commit | 7fb13d1cfb7528d617406bd4701cc13d7a64abd4 (patch) | |
tree | fa6d17f0df6dc2b6bfaabc1da6a34ec1faec366d /plugins/TopToolBar/src/toolbar.cpp | |
parent | 2de6603f69b343c3245043ab4c05292a617bd9ba (diff) |
crazy flag TTBST_RELEASED removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@11131 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TopToolBar/src/toolbar.cpp')
-rw-r--r-- | plugins/TopToolBar/src/toolbar.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp index e4a942daf2..762c533e1f 100644 --- a/plugins/TopToolBar/src/toolbar.cpp +++ b/plugins/TopToolBar/src/toolbar.cpp @@ -156,7 +156,7 @@ static void Icon2button(TTBButton *but, HANDLE &hIcoLib, HICON &hIcon, bool bIsU sid.pszSection = "Toolbar";
sid.pszName = buf;
sid.pszDefaultFile = NULL;
- mir_snprintf(buf, SIZEOF(buf), "%s %s", but->name, bIsUp ? (but->hIconDn ? "" : "") : "(pressed)");
+ mir_snprintf(buf, SIZEOF(buf), "%s%s", but->name, bIsUp ? "" : " (pressed)");
sid.pszDescription = buf;
sid.hDefaultIcon = bIsUp ? but->hIconUp : but->hIconDn;
hIcoLib = Skin_AddIcon(&sid);
@@ -304,7 +304,7 @@ INT_PTR TTBAddButton(WPARAM wParam, LPARAM lParam) if (but->cbSize != sizeof(TTBButton) && but->cbSize != OLD_TBBUTTON_SIZE)
return -1;
- if (!(but->dwFlags && TTBBF_ISLBUTTON) && nameexists(but->name))
+ if (!(but->dwFlags & TTBBF_ISLBUTTON) && nameexists(but->name))
return -1;
TopButtonInt *b = CreateButton(but);
@@ -355,8 +355,7 @@ INT_PTR TTBSetState(WPARAM wParam, LPARAM lParam) if (b == NULL)
return -1;
- b->bPushed = (lParam & TTBST_PUSHED) ? TRUE : FALSE;
- b->bPushed = (lParam & TTBST_RELEASED) ? FALSE : TRUE;
+ b->bPushed = (lParam & TTBST_PUSHED) != 0;
b->SetBitmap();
return 0;
}
@@ -371,7 +370,7 @@ INT_PTR TTBGetState(WPARAM wParam, LPARAM lParam) if (b == NULL)
return -1;
- int retval = (b->bPushed == TRUE) ? TTBST_PUSHED : TTBST_RELEASED;
+ int retval = (b->bPushed == TRUE) ? TTBST_PUSHED : 0;
return retval;
}
|