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 | |
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')
30 files changed, 56 insertions, 61 deletions
diff --git a/plugins/Actman/ua/i_uaplaces.inc b/plugins/Actman/ua/i_uaplaces.inc index df4d160fe6..4b1f46a762 100644 --- a/plugins/Actman/ua/i_uaplaces.inc +++ b/plugins/Actman/ua/i_uaplaces.inc @@ -36,7 +36,7 @@ begin if lflag=TTBST_PUSHED then
begin
if (ActionItem.flags and (UAF_2STATE+UAF_PRESSED))<>(UAF_2STATE+UAF_PRESSED) then exit;
- lflag:=TTBST_RELEASED;
+ lflag:=0;
end
else
begin
@@ -667,7 +667,7 @@ begin begin
if CallService(MS_TTB_GETBUTTONSTATE,hTTBButton,0)=TTBST_PUSHED then
begin
- lflag:=TTBST_RELEASED;
+ lflag:=0;
end
else
begin
diff --git a/plugins/Actman30/ua/i_uaplaces.inc b/plugins/Actman30/ua/i_uaplaces.inc index e250b3d8f1..b380f341ba 100644 --- a/plugins/Actman30/ua/i_uaplaces.inc +++ b/plugins/Actman30/ua/i_uaplaces.inc @@ -37,7 +37,7 @@ begin if lflag=TTBST_PUSHED then
begin
if (ActionItem.flags and (UAF_2STATE+UAF_PRESSED))<>(UAF_2STATE+UAF_PRESSED) then exit;
- lflag:=TTBST_RELEASED;
+ lflag:=0;
end
else
begin
@@ -674,7 +674,7 @@ begin begin
if CallService(MS_TTB_GETBUTTONSTATE,hTTBButton,0)=TTBST_PUSHED then
begin
- lflag:=TTBST_RELEASED;
+ lflag:=0;
end
else
begin
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp index b7baf46e20..3b877dc602 100644 --- a/plugins/Alarms/src/options.cpp +++ b/plugins/Alarms/src/options.cpp @@ -680,7 +680,7 @@ BOOL New(HWND hwnd, ALARM &alarm, bool modal) SetForegroundWindow(hwndDlg);
if (ServiceExists(MS_TTB_SETBUTTONSTATE)) {
Sleep(100);
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTopToolbarButton, (LPARAM)TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTopToolbarButton, (LPARAM)0);
}
return TRUE;
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp index f18255283a..47833a6eee 100644 --- a/plugins/AutoShutdown/src/settingsdlg.cpp +++ b/plugins/AutoShutdown/src/settingsdlg.cpp @@ -426,7 +426,7 @@ int ToolbarLoaded(WPARAM,LPARAM) void SetShutdownToolbarButton(bool fActive)
{
if (hToolbarButton)
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hToolbarButton,fActive?TTBST_PUSHED:TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hToolbarButton,fActive?TTBST_PUSHED:0);
}
/************************* Menu Item **********************************/
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp index 810a5a67a1..0529ddcb98 100644 --- a/plugins/Clist_modern/src/modern_toolbar.cpp +++ b/plugins/Clist_modern/src/modern_toolbar.cpp @@ -53,7 +53,7 @@ static BTNS[] = static void SetButtonPressed(int i, int state)
{
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)BTNS[i].hButton, state ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)BTNS[i].hButton, state ? TTBST_PUSHED : 0);
}
void Modern_InitButtons()
diff --git a/plugins/Clist_nicer/src/CLCButton.cpp b/plugins/Clist_nicer/src/CLCButton.cpp index c1905e8f2b..7efef43e8d 100644 --- a/plugins/Clist_nicer/src/CLCButton.cpp +++ b/plugins/Clist_nicer/src/CLCButton.cpp @@ -74,7 +74,7 @@ void ClcSetButtonState(int ctrlid, int status) {
for (int i = 0; i < SIZEOF(BTNS); i++)
if (BTNS[i].ctrlid == ctrlid) {
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)BTNS[i].hButton, status ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)BTNS[i].hButton, status ? TTBST_PUSHED : 0);
break;
}
}
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp index 907d77b9d2..4cefbb9d5f 100644 --- a/plugins/Console/src/Console.cpp +++ b/plugins/Console/src/Console.cpp @@ -170,7 +170,7 @@ static void ShowConsole(int show) }
if (hTTBButt)
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTBButt, (show)?TTBST_PUSHED:TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTBButt, (show)?TTBST_PUSHED:0);
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index ebdd85920b..714dcb0a7b 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -118,7 +118,7 @@ INT_PTR DBEditorppMenuCommand(WPARAM wParam, LPARAM lParam) }
if (hTTBButt)
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTBButt, (LPARAM)TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTBButt, (LPARAM)0);
return 0;
}
diff --git a/plugins/ExternalAPI/delphi/m_toptoolbar.inc b/plugins/ExternalAPI/delphi/m_toptoolbar.inc index 1e2e603b9c..2d39beea74 100644 --- a/plugins/ExternalAPI/delphi/m_toptoolbar.inc +++ b/plugins/ExternalAPI/delphi/m_toptoolbar.inc @@ -73,7 +73,6 @@ const returns: 0 on success, -1 on failure.
}
TTBST_PUSHED = 1;
- TTBST_RELEASED = 2;
MS_TTB_SETBUTTONSTATE:PAnsiChar = 'TopToolBar/SetState';
diff --git a/plugins/ExternalAPI/m_toptoolbar.h b/plugins/ExternalAPI/m_toptoolbar.h index fc4399f5f7..1d3766290e 100644 --- a/plugins/ExternalAPI/m_toptoolbar.h +++ b/plugins/ExternalAPI/m_toptoolbar.h @@ -80,7 +80,6 @@ lparam = (LPARAM) state returns: 0 on success, -1 on failure.
*/
#define TTBST_PUSHED 1
-#define TTBST_RELEASED 2
#define MS_TTB_SETBUTTONSTATE "TopToolBar/SetState"
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index f6fd9214c7..5258ca89af 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -166,7 +166,7 @@ void UpdateGlobalStatusMenus() Menu_ModifyItem(proto_items[0].hMenu, &clmi);
if (hTTB != NULL)
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM) hTTB, (LPARAM) (enabled ? TTBST_PUSHED : TTBST_RELEASED));
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM) hTTB, (LPARAM) (enabled ? TTBST_PUSHED : 0));
}
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index 225620bdce..595df755f0 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -388,7 +388,7 @@ INT_PTR ToggleSendOnEvent(WPARAM hContact, LPARAM) CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)g_hToggleSOEMenuItem, (LPARAM)&mi);
if (g_hTopToolbarbutton)
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)g_hTopToolbarbutton, SendOnEvent ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)g_hTopToolbarbutton, SendOnEvent ? TTBST_PUSHED : 0);
}
return 0;
@@ -426,7 +426,7 @@ static int Create_TopToolbar(WPARAM, LPARAM) ttbb.pszTooltipUp = LPGEN("Toggle autoreply on");
g_hTopToolbarbutton = TopToolbar_AddButton(&ttbb);
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)g_hTopToolbarbutton, SendOnEvent ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)g_hTopToolbarbutton, SendOnEvent ? TTBST_PUSHED : 0);
}
return 0;
}
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index ae3a05d824..ad821778ba 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -1094,7 +1094,7 @@ INT_PTR EnableDisableMenuCommand(WPARAM, LPARAM) }
Menu_ModifyItem(hEnableDisableMenu, &mi);
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hToolbarButton, opt.TempDisabled ? TTBST_RELEASED : TTBST_PUSHED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hToolbarButton, opt.TempDisabled ? 0 : TTBST_PUSHED);
return 0;
}
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index 1e353f7d33..efe0c49de4 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -242,7 +242,7 @@ void UpdateMenu(bool State) mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR;
Menu_ModifyItem(hService2[0], &mi);
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTBButton, State ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTBButton, State ? TTBST_PUSHED : 0);
db_set_b(NULL, MODULE, "AutoUpdate", !State);
}
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index 19a01e7224..8272df4782 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -182,7 +182,7 @@ INT_PTR svcEnableDisableMenuCommand(WPARAM, LPARAM) Menu_ModifyItem(hMenuRoot, &mi);
if (hTTButton)
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, (PopupOptions.ModuleIsEnabled) ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, (PopupOptions.ModuleIsEnabled) ? TTBST_PUSHED : 0);
return 0;
}
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index 888b8dc3fa..933e25c35b 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -62,7 +62,7 @@ namespace mi.flags = CMIM_ICON | CMIM_NAME;
Menu_ModifyItem(g_hEnableDisableMenu, &mi);
- CallService(MS_TTB_SETBUTTONSTATE, reinterpret_cast<WPARAM>(g_hTBButton), !bAutoUpdate ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, reinterpret_cast<WPARAM>(g_hTBButton), !bAutoUpdate ? TTBST_PUSHED : 0);
}
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index 5b9b26005b..8a0de4c59c 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -447,7 +447,7 @@ INT_PTR OnMenuCommandShowList(WPARAM wParam, LPARAM lParam) ShowWindow(hWndMain, SW_SHOW);
if (hTopToolbarButtonShowList != NULL)
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTopToolbarButtonShowList, TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTopToolbarButtonShowList, 0);
return 0;
}
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index e4f4006455..cafd032c92 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -883,7 +883,7 @@ INT_PTR ShowStatusMessageDialogInternal(WPARAM wParam, LPARAM lParam) if (Miranda_Terminated()) return 0;
if (hTTBButton) {
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTBButton, (LPARAM)TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTBButton, (LPARAM)0);
CallService(MS_TTB_SETBUTTONOPTIONS, MAKEWPARAM((WORD)TTBO_TIPNAME, (WORD)hTTBButton), (LPARAM)Translate("Change status message"));
}
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index 496b26cc88..7f439020e0 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -316,7 +316,7 @@ void UpdateMenu() void UpdateTTB()
{
if (hTTBarloaded != NULL && TTBButtons == 1)
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)Buttons, (Enabled == 1 ? TTBST_RELEASED : TTBST_PUSHED));
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)Buttons, (Enabled == 1 ? 0 : TTBST_PUSHED));
}
static int CreateTTButtons(WPARAM wParam, LPARAM lParam)
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index faab7f08b3..33ffb03994 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -250,7 +250,7 @@ static VOID CALLBACK releaseTtbTimerFunction(HWND hwnd,UINT message, UINT_PTR id { KillTimer(NULL, releaseTtbTimerId); for(int i=0; i < ttbButtonCount; i++) - CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)ttbButtons[i], TTBST_RELEASED); + CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)ttbButtons[i], 0); } INT_PTR LoadAndSetProfile(WPARAM wParam, LPARAM lParam) diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 90ace97da2..b47732335c 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -3519,10 +3519,9 @@ LABEL_SHOWWINDOW: UpdateStatusBar(dat); break; - //mad: bb-api case DM_BBNEEDUPDATE: if (lParam) - CB_ChangeButton(hwndDlg,dat,(CustomButtonData*)lParam); + CB_ChangeButton(hwndDlg, dat, (CustomButtonData*)lParam); else BB_InitDlgButtons(dat); @@ -3531,9 +3530,9 @@ LABEL_SHOWWINDOW: case DM_CBDESTROY: if (lParam) - CB_DestroyButton(hwndDlg,dat,(DWORD)wParam,(DWORD)lParam); + CB_DestroyButton(hwndDlg, dat, (DWORD)wParam, (DWORD)lParam); else - CB_DestroyAllButtons(hwndDlg,dat); + CB_DestroyAllButtons(hwndDlg, dat); break; case DM_CONFIGURETOOLBAR: @@ -3604,10 +3603,9 @@ LABEL_SHOWWINDOW: db_set_w(NULL, CHAT_MODULE, "splitY", (WORD)g_Settings.iSplitterY); // Typing support for GCW_PRIVMESS sessions - if (si->iType == GCW_PRIVMESS) { + if (si->iType == GCW_PRIVMESS) if (dat->nTypeMode == PROTOTYPE_SELFTYPING_ON) DM_NotifyTyping(dat, PROTOTYPE_SELFTYPING_OFF); - } DM_FreeTheme(dat); 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"
diff --git a/plugins/Watrack/i_gui.inc b/plugins/Watrack/i_gui.inc index ad697d6fa5..2a219c8140 100644 --- a/plugins/Watrack/i_gui.inc +++ b/plugins/Watrack/i_gui.inc @@ -69,7 +69,7 @@ begin if f1<>0 then
begin
p:='Enable WATrack';
- CallService(MS_TTB_SETBUTTONSTATE,ttbState,TTBST_RELEASED)
+ CallService(MS_TTB_SETBUTTONSTATE,ttbState,0)
end
else
begin
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp index 96033c2ba7..d654aa3b60 100644 --- a/plugins/Weather/src/weather_svcs.cpp +++ b/plugins/Weather/src/weather_svcs.cpp @@ -242,7 +242,7 @@ void UpdateMenu(BOOL State) mi.flags = CMIM_ICON | CMIM_NAME;
Menu_ModifyItem(hEnableDisableMenu, &mi);
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTBButton, !State ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTBButton, !State ? TTBST_PUSHED : 0);
}
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp index 53bfb132ce..0669dae70d 100644 --- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp +++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp @@ -214,7 +214,7 @@ void ThreadProc(LPVOID) static INT_PTR WumfShowConnections(WPARAM,LPARAM)
{
mir_forkthread(ThreadProc, NULL);
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hWumfBut, TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hWumfBut, 0);
return 0;
}
diff --git a/plugins/YAMN/src/yamn.cpp b/plugins/YAMN/src/yamn.cpp index 4d9ba92ae2..fa171f0dd4 100644 --- a/plugins/YAMN/src/yamn.cpp +++ b/plugins/YAMN/src/yamn.cpp @@ -322,6 +322,6 @@ INT_PTR ForceCheckSvc(WPARAM, LPARAM) LeaveCriticalSection(&PluginRegCS);
CloseHandle(ThreadRunningEV);
- if (hTTButton) CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, TTBST_RELEASED);
+ if (hTTButton) CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, 0);
return 1;
}
diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp index 121f2b6d4d..040e30f899 100644 --- a/plugins/YAPP/src/services.cpp +++ b/plugins/YAPP/src/services.cpp @@ -205,7 +205,7 @@ void UpdateMenu() Menu_ModifyItem(hMenuRoot, &mi);
if (hTTButton)
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, isEnabled ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, isEnabled ? TTBST_PUSHED : 0);
}
INT_PTR PopupQuery(WPARAM wParam, LPARAM lParam)
|