summaryrefslogtreecommitdiff
path: root/plugins
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
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')
-rw-r--r--plugins/BASS_interface/src/Main.cpp2
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp2
-rw-r--r--plugins/Clist_modern/modern_toolbar.cpp1
-rw-r--r--plugins/Clist_nicer/SRC/CLCButton.cpp1
-rw-r--r--plugins/Console/Console.cpp2
-rw-r--r--plugins/ExternalAPI/m_toptoolbar.h3
-rw-r--r--plugins/FavContacts/src/main.cpp2
-rw-r--r--plugins/ListeningTo/listeningto.cpp2
-rw-r--r--plugins/NewXstatusNotify/main.cpp2
-rw-r--r--plugins/Popup/src/main.cpp2
-rw-r--r--plugins/Sessions/Src/Main.cpp2
-rw-r--r--plugins/SimpleStatusMsg/main.cpp2
-rw-r--r--plugins/StatusPlugins/StartupStatus/toolbars.cpp2
-rw-r--r--plugins/Svc_crshdmp/crshdmp.cpp4
-rw-r--r--plugins/TopToolBar/toolbar.cpp14
-rw-r--r--plugins/TopToolBar/ttbopt.cpp2
-rw-r--r--plugins/Updater/updater.cpp2
-rw-r--r--plugins/UserInfoEx/dlg_anniversarylist.cpp2
-rw-r--r--plugins/UserInfoEx/svc_reminder.cpp2
19 files changed, 25 insertions, 26 deletions
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp
index 218ede544e..2c544d71ba 100644
--- a/plugins/BASS_interface/src/Main.cpp
+++ b/plugins/BASS_interface/src/Main.cpp
@@ -378,7 +378,7 @@ int OnToolbarLoaded(WPARAM wParam, LPARAM lParam)
tbb.pszTooltipDn = LPGEN("Audio device is closed");
tbb.hIconHandleUp = hIconLibItem[0];
tbb.hIconHandleDn = hIconLibItem[1];
- tbb.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ tbb.dwFlags = TTBBF_SHOWTOOLTIP;
hTBButton = TopToolbar_AddButton(&tbb);
return 0;
}
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index bfdf0b274d..0499410ea5 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -109,7 +109,7 @@ int ToolbarModuleLoaded(WPARAM wParam,LPARAM lParam)
tbb.name = LPGEN("Open History");
tbb.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
tbb.pszTooltipUp = LPGEN("Open History");
- tbb.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ tbb.dwFlags = TTBBF_SHOWTOOLTIP;
tbb.hIconHandleUp = LoadSkinnedIconHandle(SKINICON_OTHER_HISTORY);
hToolbarButton = TopToolbar_AddButton(&tbb);
}
diff --git a/plugins/Clist_modern/modern_toolbar.cpp b/plugins/Clist_modern/modern_toolbar.cpp
index 5b7ea96a37..5f26d88dbf 100644
--- a/plugins/Clist_modern/modern_toolbar.cpp
+++ b/plugins/Clist_modern/modern_toolbar.cpp
@@ -61,7 +61,6 @@ static int Modern_InitButtons(WPARAM, LPARAM)
tbb.cbSize = sizeof(tbb);
for (int i=0; i < SIZEOF(BTNS); i++) {
- tbb.dwFlags = TTBBF_ICONBYHANDLE;
if (BTNS[i].pszButtonID) {
tbb.name = BTNS[i].pszButtonID;
tbb.pszService = BTNS[i].pszServiceName;
diff --git a/plugins/Clist_nicer/SRC/CLCButton.cpp b/plugins/Clist_nicer/SRC/CLCButton.cpp
index f57fea034f..3b4b46f545 100644
--- a/plugins/Clist_nicer/SRC/CLCButton.cpp
+++ b/plugins/Clist_nicer/SRC/CLCButton.cpp
@@ -56,7 +56,6 @@ static int InitDefaultButtons(WPARAM, LPARAM)
for (int i=0; i < SIZEOF(BTNS); i++ ) {
g_index = i;
- tbb.dwFlags = TTBBF_ICONBYHANDLE;
if (BTNS[i].pszButtonID) {
tbb.pszTooltipUp = tbb.name = BTNS[i].pszButtonName;
tbb.pszService = BTNS[i].pszButtonID;
diff --git a/plugins/Console/Console.cpp b/plugins/Console/Console.cpp
index 2a2093e7c0..b04be4dc39 100644
--- a/plugins/Console/Console.cpp
+++ b/plugins/Console/Console.cpp
@@ -157,7 +157,7 @@ static int OnTTBLoaded(WPARAM wParam,LPARAM lParam)
sid.iDefaultIndex = -IDI_BTN_DN;
ttbb.hIconHandleDn = Skin_AddIcon(&sid);
- ttbb.dwFlags = (state ? TTBBF_PUSHED : 0) | TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ ttbb.dwFlags = (state ? TTBBF_PUSHED : 0) | TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
ttbb.pszService = "Console/Hide";
ttbb.name = LPGEN("Show/Hide Console");
ttbb.pszTooltipDn = LPGEN("Hide Console");
diff --git a/plugins/ExternalAPI/m_toptoolbar.h b/plugins/ExternalAPI/m_toptoolbar.h
index 6b72a179da..dd664d4124 100644
--- a/plugins/ExternalAPI/m_toptoolbar.h
+++ b/plugins/ExternalAPI/m_toptoolbar.h
@@ -10,9 +10,8 @@
#define TTBBF_SHOWTOOLTIP 0x0008
#define TTBBF_ISSEPARATOR 0x0020
#define TTBBF_ISLBUTTON 0x0040
-#define TTBBF_ICONBYHANDLE 0x0080
+#define TTBBF_ASPUSHBUTTON 0x0080
#define TTBBF_ISSBUTTON 0x0100
-#define TTBBF_ASPUSHBUTTON 0x0200
typedef struct {
int cbSize;
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp
index 7c97602857..5233df1d65 100644
--- a/plugins/FavContacts/src/main.cpp
+++ b/plugins/FavContacts/src/main.cpp
@@ -128,7 +128,7 @@ int ProcessTBLoaded(WPARAM wParam, LPARAM lParam)
button.pszTooltipUp = button.pszTooltipUp =
button.name = LPGEN("Favourite Contacts");
button.pszService = MS_FAVCONTACTS_SHOWMENU;
- button.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_VISIBLE | TTBBF_ICONBYHANDLE;
+ button.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_VISIBLE;
button.hIconHandleUp = (HANDLE)g_icoFavourite;
TopToolbar_AddButton(&button);
return 0;
diff --git a/plugins/ListeningTo/listeningto.cpp b/plugins/ListeningTo/listeningto.cpp
index d36cfecec2..219c92c7e1 100644
--- a/plugins/ListeningTo/listeningto.cpp
+++ b/plugins/ListeningTo/listeningto.cpp
@@ -530,7 +530,7 @@ int TopToolBarLoaded(WPARAM wParam, LPARAM lParam)
ttb.hIconHandleDn = hIcon2;
ttb.hIconHandleUp = hIcon1;
ttb.pszService = MS_LISTENINGTO_TTB;
- ttb.dwFlags = TTBBF_VISIBLE | TTBBF_ICONBYHANDLE | TTBBF_SHOWTOOLTIP | (enabled ? TTBBF_PUSHED : 0);
+ ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | (enabled ? TTBBF_PUSHED : 0);
ttb.name = "Enable/Disable sending Listening To info (to all protocols)";
ttb.pszTooltipDn = LPGEN("Disable ListeningTo (to all protocols)");
ttb.pszTooltipUp = LPGEN("Enable ListeningTo (to all protocols)");
diff --git a/plugins/NewXstatusNotify/main.cpp b/plugins/NewXstatusNotify/main.cpp
index 7519dca662..bb467473e9 100644
--- a/plugins/NewXstatusNotify/main.cpp
+++ b/plugins/NewXstatusNotify/main.cpp
@@ -1333,7 +1333,7 @@ int InitTopToolbar(WPARAM, LPARAM)
tbb.pszTooltipDn = LPGEN("Status notification disabled");
tbb.hIconHandleUp = GetIconHandle(ICO_NOTIFICATION_ON);
tbb.hIconHandleDn = GetIconHandle(ICO_NOTIFICATION_OFF);
- tbb.dwFlags = TTBBF_ICONBYHANDLE | (opt.TempDisabled ? TTBBF_PUSHED : 0);
+ tbb.dwFlags = (opt.TempDisabled ? TTBBF_PUSHED : 0);
hToolbarButton = TopToolbar_AddButton(&tbb);
return 0;
}
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index 66c345017a..4071d2a804 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -208,7 +208,7 @@ static int TTBLoaded(WPARAM wParam,LPARAM lParam)
btn.cbSize = sizeof(btn);
btn.pszService = MENUCOMMAND_SVC;
btn.lParamUp = 1;
- btn.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ btn.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
btn.name = LPGEN("Toggle Popups");
btn.hIconHandleUp = Skin_GetIconHandle(ICO_TB_POPUP_ON);
btn.hIconHandleDn = Skin_GetIconHandle(ICO_TB_POPUP_OFF);
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 53027ee6e3..bb0fd11df7 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -856,7 +856,7 @@ INT_PTR BuildFavMenu(WPARAM wparam,LPARAM lparam)
static int CreateButtons(WPARAM wparam,LPARAM lparam)
{
TTBButton button = {0};
- button.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_VISIBLE | TTBBF_ICONBYHANDLE;
+ button.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_VISIBLE;
button.pszService = MS_SESSIONS_OPENMANAGER;
button.pszTooltipUp = button.name = LPGEN("Open Sessions Manager");
diff --git a/plugins/SimpleStatusMsg/main.cpp b/plugins/SimpleStatusMsg/main.cpp
index de266b6d93..4ba8a8a6a0 100644
--- a/plugins/SimpleStatusMsg/main.cpp
+++ b/plugins/SimpleStatusMsg/main.cpp
@@ -1602,7 +1602,7 @@ static int AddTopToolbarButton(WPARAM wParam, LPARAM lParam)
ttbb.cbSize = sizeof(ttbb);
ttbb.hIconHandleUp = GetIconHandle(IDI_CSMSG);
ttbb.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT;
- ttbb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ ttbb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
ttbb.name = LPGEN("Change Status Message");
ttbb.pszTooltipUp = LPGEN("Change Status Message");
hTTBButton = TopToolbar_AddButton(&ttbb);
diff --git a/plugins/StatusPlugins/StartupStatus/toolbars.cpp b/plugins/StatusPlugins/StartupStatus/toolbars.cpp
index e1b94d8f44..989468cdb4 100644
--- a/plugins/StatusPlugins/StartupStatus/toolbars.cpp
+++ b/plugins/StatusPlugins/StartupStatus/toolbars.cpp
@@ -58,7 +58,7 @@ int CreateTopToolbarButtons(WPARAM wParam, LPARAM lParam)
TTBButton ttb = { 0 };
ttb.cbSize = sizeof(ttb);
- ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
ttb.pszService = MS_SS_LOADANDSETPROFILE;
for (int i=0; i < profileCount; i++) {
char setting[80];
diff --git a/plugins/Svc_crshdmp/crshdmp.cpp b/plugins/Svc_crshdmp/crshdmp.cpp
index 4f0acab235..3dd69dd022 100644
--- a/plugins/Svc_crshdmp/crshdmp.cpp
+++ b/plugins/Svc_crshdmp/crshdmp.cpp
@@ -217,14 +217,14 @@ static int ToolbarModulesLoaded(WPARAM, LPARAM)
tbb.pszService = MS_CRASHDUMPER_STORETOCLIP;
tbb.pszTooltipUp = LPGEN("Version Information To Clipboard");
tbb.hIconHandleUp = GetIconHandle("storeToClip");
- tbb.dwFlags = TTBBF_VISIBLE | TTBBF_ICONBYHANDLE;
+ tbb.dwFlags = TTBBF_VISIBLE;
TopToolbar_AddButton(&tbb);
tbb.name = LPGEN("Version Information To File");
tbb.pszService = MS_CRASHDUMPER_STORETOFILE;
tbb.pszTooltipUp = LPGEN("Version Information To File");
tbb.hIconHandleUp = GetIconHandle("storeToFile");
- tbb.dwFlags = TTBBF_ICONBYHANDLE;
+ tbb.dwFlags = 0;
TopToolbar_AddButton(&tbb);
tbb.name = LPGEN("Show Version Information");
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);
diff --git a/plugins/Updater/updater.cpp b/plugins/Updater/updater.cpp
index db4968c373..72eb686974 100644
--- a/plugins/Updater/updater.cpp
+++ b/plugins/Updater/updater.cpp
@@ -181,7 +181,7 @@ static int ToolbarModulesLoaded(WPARAM, LPARAM)
{
TTBButton tbb = {0};
tbb.cbSize = sizeof(TTBButton);
- tbb.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ tbb.dwFlags = TTBBF_SHOWTOOLTIP;
tbb.name = LPGEN("Check for Updates");
tbb.pszService = MS_UPDATE_CHECKFORUPDATES;
diff --git a/plugins/UserInfoEx/dlg_anniversarylist.cpp b/plugins/UserInfoEx/dlg_anniversarylist.cpp
index 539ba3bd6b..53bd90f0ef 100644
--- a/plugins/UserInfoEx/dlg_anniversarylist.cpp
+++ b/plugins/UserInfoEx/dlg_anniversarylist.cpp
@@ -1092,7 +1092,7 @@ VOID DlgAnniversaryListOnTopToolBarLoaded()
{
TTBButton ttb = { 0 };
ttb.cbSize = sizeof(ttb);
- ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
ttb.pszService = MS_USERINFO_REMINDER_LIST;
ttb.hIconHandleUp = Skin_GetIconHandle(ICO_COMMON_ANNIVERSARY);
ttb.pszTooltipUp = LPGEN("Anniversary list");
diff --git a/plugins/UserInfoEx/svc_reminder.cpp b/plugins/UserInfoEx/svc_reminder.cpp
index 98f52f9c21..f5f42bc20c 100644
--- a/plugins/UserInfoEx/svc_reminder.cpp
+++ b/plugins/UserInfoEx/svc_reminder.cpp
@@ -907,7 +907,7 @@ VOID SvcReminderOnTopToolBarLoaded()
TTBButton ttb = { 0 };
ttb.cbSize = sizeof(ttb);
- ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
ttb.pszService = MS_USERINFO_REMINDER_CHECK;
ttb.name = "Check anniversaries";
ttb.pszTooltipUp = LPGEN("Check anniversaries");