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 | |
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')
-rw-r--r-- | plugins/TopToolBar/src/InternalButtons.cpp | 16 | ||||
-rw-r--r-- | plugins/TopToolBar/src/common.h | 12 | ||||
-rw-r--r-- | plugins/TopToolBar/src/toolbar.cpp | 9 | ||||
-rw-r--r-- | plugins/TopToolBar/src/version.h | 16 |
4 files changed, 26 insertions, 27 deletions
diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp index b264584ba6..2ba32960d6 100644 --- a/plugins/TopToolBar/src/InternalButtons.cpp +++ b/plugins/TopToolBar/src/InternalButtons.cpp @@ -45,17 +45,17 @@ int OnSettingChanging(WPARAM hContact, LPARAM lParam) if (!strcmp(dbcws->szModule, "CList")) {
if (!strcmp(dbcws->szSetting, "HideOffline"))
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_OFFLINE].hButton, dbcws->value.bVal ? TTBST_RELEASED : TTBST_PUSHED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_OFFLINE].hButton, dbcws->value.bVal ? 0 : TTBST_PUSHED);
else if (!strcmp(dbcws->szSetting, "UseGroups"))
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_GROUPS].hButton, dbcws->value.bVal ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_GROUPS].hButton, dbcws->value.bVal ? TTBST_PUSHED : 0);
}
else if (!strcmp(dbcws->szModule, "Skin")) {
if (!strcmp(dbcws->szSetting, "UseSound"))
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_SOUNDS].hButton, dbcws->value.bVal ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_SOUNDS].hButton, dbcws->value.bVal ? TTBST_PUSHED : 0);
}
else if (!strcmp(dbcws->szModule, "MetaContacts")) {
if (!strcmp(dbcws->szSetting, "Enabled"))
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_META].hButton, dbcws->value.bVal ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_META].hButton, dbcws->value.bVal ? TTBST_PUSHED : 0);
}
return 0;
@@ -151,16 +151,16 @@ void InitInternalButtons() }
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_OFFLINE].hButton,
- db_get_b(NULL, "CList", "HideOffline", 0) ? TTBST_RELEASED : TTBST_PUSHED);
+ db_get_b(NULL, "CList", "HideOffline", 0) ? 0 : TTBST_PUSHED);
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_GROUPS].hButton,
- db_get_b(NULL, "CList", "UseGroups", 1) ? TTBST_PUSHED : TTBST_RELEASED);
+ db_get_b(NULL, "CList", "UseGroups", 1) ? TTBST_PUSHED : 0);
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_SOUNDS].hButton,
- db_get_b(NULL, "Skin", "UseSound", 1) ? TTBST_PUSHED : TTBST_RELEASED);
+ db_get_b(NULL, "Skin", "UseSound", 1) ? TTBST_PUSHED : 0);
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_META].hButton,
- db_get_b(NULL, "MetaContacts", "Enabled", 1) ? TTBST_PUSHED : TTBST_RELEASED);
+ db_get_b(NULL, "MetaContacts", "Enabled", 1) ? TTBST_PUSHED : 0);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnSettingChanging);
}
diff --git a/plugins/TopToolBar/src/common.h b/plugins/TopToolBar/src/common.h index ffadf7ef7c..865a9a2c4a 100644 --- a/plugins/TopToolBar/src/common.h +++ b/plugins/TopToolBar/src/common.h @@ -61,12 +61,12 @@ struct TopButtonInt : public MZeroedObject { return (dwFlags & TTBBF_VISIBLE) != 0;
}
- HWND hwnd;
- int id;
- BOOL bPushed;
- int dwFlags;
- int x, y, arrangedpos;
- HICON hIconUp, hIconDn;
+ HWND hwnd;
+ int id;
+ BOOL bPushed;
+ int dwFlags;
+ int x, y, arrangedpos;
+ HICON hIconUp, hIconDn;
HANDLE hIconHandleUp, hIconHandleDn;
char *pszService;
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;
}
diff --git a/plugins/TopToolBar/src/version.h b/plugins/TopToolBar/src/version.h index bb7a0cc51b..506f3377e3 100644 --- a/plugins/TopToolBar/src/version.h +++ b/plugins/TopToolBar/src/version.h @@ -1,14 +1,14 @@ -#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 8
-#define __RELEASE_NUM 0
-#define __BUILD_NUM 3
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 8
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 4
#include <stdver.h>
-#define __PLUGIN_NAME "TopToolBar"
-#define __FILENAME "TopToolBar.dll"
+#define __PLUGIN_NAME "TopToolBar"
+#define __FILENAME "TopToolBar.dll"
#define __DESCRIPTION "ToptoolBar adds buttons in top frame for fast access."
-#define __AUTHOR "Bethoven"
-#define __AUTHOREMAIL "bethoven@mailgate.ru"
+#define __AUTHOR "Bethoven"
+#define __AUTHOREMAIL "bethoven@mailgate.ru"
#define __AUTHORWEB "http://miranda-ng.org/p/TopToolBar/"
#define __COPYRIGHT "© 2003-2008 Bethoven"
|