summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/buttonsbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/buttonsbar.cpp')
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index 901fbcb4c8..87b1197344 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -1,40 +1,40 @@
#include "commonheaders.h"
-
-#define BBSF_IMBUTTON (1<<0)
-#define BBSF_CHATBUTTON (1<<1)
-#define BBSF_CANBEHIDDEN (1<<2)
-#define BBSF_NTBSWAPED (1<<3)
-#define BBSF_NTBDESTRUCT (1<<4)
-
-struct CustomButtonData : public MZeroedObject
-{
- ~CustomButtonData()
- {
- mir_free(m_pszModuleName);
- mir_free(m_ptszTooltip);
- }
-
- void Accustom(HWND hwnd, TWindowData *dat);
-
- DWORD m_dwPosition; // default order pos of button, counted from window edge (left or right)
-
- DWORD m_dwButtonOrigID; // id of button used while button creation and to store button info in DB
- char *m_pszModuleName; // module name without spaces and underline symbols (e.g. "tabsrmm")
-
- DWORD m_dwButtonCID;
- DWORD m_dwArrowCID; // only use with BBBF_ISARROWBUTTON flag
-
- TCHAR *m_ptszTooltip; // button's tooltip
-
- int m_iButtonWidth; // must be 22 for regular button and 33 for button with arrow
- HANDLE m_hIcon; // Handle to icolib registred icon
-
- bool m_bIMButton, m_bChatButton;
- bool m_bCanBeHidden, m_bHidden, m_bAutoHidden, m_bSeparator, m_bDisabled, m_bPushButton;
- bool m_bLSided, m_bRSided;
- BYTE m_opFlags;
-};
-
+
+#define BBSF_IMBUTTON (1<<0)
+#define BBSF_CHATBUTTON (1<<1)
+#define BBSF_CANBEHIDDEN (1<<2)
+#define BBSF_NTBSWAPED (1<<3)
+#define BBSF_NTBDESTRUCT (1<<4)
+
+struct CustomButtonData : public MZeroedObject
+{
+ ~CustomButtonData()
+ {
+ mir_free(m_pszModuleName);
+ mir_free(m_ptszTooltip);
+ }
+
+ void Accustom(HWND hwnd, TWindowData *dat);
+
+ DWORD m_dwPosition; // default order pos of button, counted from window edge (left or right)
+
+ DWORD m_dwButtonOrigID; // id of button used while button creation and to store button info in DB
+ char *m_pszModuleName; // module name without spaces and underline symbols (e.g. "tabsrmm")
+
+ DWORD m_dwButtonCID;
+ DWORD m_dwArrowCID; // only use with BBBF_ISARROWBUTTON flag
+
+ TCHAR *m_ptszTooltip; // button's tooltip
+
+ int m_iButtonWidth; // must be 22 for regular button and 33 for button with arrow
+ HANDLE m_hIcon; // Handle to icolib registred icon
+
+ bool m_bIMButton, m_bChatButton;
+ bool m_bCanBeHidden, m_bHidden, m_bAutoHidden, m_bSeparator, m_bDisabled, m_bPushButton;
+ bool m_bLSided, m_bRSided;
+ BYTE m_opFlags;
+};
+
static HANDLE hButtonsBarAddButton;
static HANDLE hButtonsBarRemoveButton;
static HANDLE hButtonsBarGetButtonState;
@@ -237,7 +237,7 @@ static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam)
SetDlgItemTextA(hwndDlg, tempCID, bbdi->pszModuleName);
if (bbdi->hIcon)
- SendDlgItemMessage(hwndDlg, tempCID, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(bbdi->hIcon));
+ SendDlgItemMessage(hwndDlg, tempCID, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(bbdi->hIcon));
if (bbdi->pszTooltip)
SendDlgItemMessage(hwndDlg, tempCID, BUTTONADDTOOLTIP, (WPARAM)bbdi->ptszTooltip, (bbdi->bbbFlags & BBBF_ANSITOOLTIP) ? 0 : BATF_TCHAR);
if (bbdi->bbbFlags) {
@@ -471,7 +471,7 @@ static int BuildMenuObjectsTree(HWND hToolBarTree)
}
else {
tvis.item.pszText = TranslateTS(cbd->m_ptszTooltip);
- iImage = ImageList_AddIcon(himgl, Skin_GetIconByHandle(cbd->m_hIcon));
+ iImage = ImageList_AddIcon(himgl, IcoLib_GetIconByHandle(cbd->m_hIcon));
tvis.item.iImage = tvis.item.iSelectedImage = iImage;
}
cbd->m_opFlags = 0;
@@ -499,7 +499,7 @@ static int BuildMenuObjectsTree(HWND hToolBarTree)
}
else {
tvis.item.pszText = TranslateTS(cbd->m_ptszTooltip);
- iImage = ImageList_AddIcon(himgl, Skin_GetIconByHandle(cbd->m_hIcon));
+ iImage = ImageList_AddIcon(himgl, IcoLib_GetIconByHandle(cbd->m_hIcon));
tvis.item.iImage = tvis.item.iSelectedImage = iImage;
}
tvis.item.state = 0;
@@ -808,7 +808,7 @@ void CustomButtonData::Accustom(HWND hwndBtn, TWindowData *dat)
SendMessage(hwndBtn, BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(hwndBtn, BUTTONSETASTHEMEDBTN, CSkin::IsThemed(), 0);
if (m_hIcon)
- SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(m_hIcon));
+ SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(m_hIcon));
if (m_ptszTooltip)
SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(m_ptszTooltip), BATF_TCHAR);
SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
@@ -1155,7 +1155,7 @@ void BB_UpdateIcons(HWND hdlg)
hwndBtn = GetDlgItem(hdlg, cbd->m_dwButtonCID);
if (hwndBtn && cbd->m_hIcon)
- SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->m_hIcon));
+ SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon));
}
}
@@ -1167,7 +1167,7 @@ void BB_UpdateIcons(HWND hdlg)
hwndBtn = GetDlgItem(hdlg, cbd->m_dwButtonCID);
if (hwndBtn && cbd->m_hIcon)
- SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->m_hIcon));
+ SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon));
}
}
}
@@ -1406,7 +1406,7 @@ void CB_ChangeButton(HWND hwndDlg, TWindowData *dat, CustomButtonData *cbd)
HWND hwndBtn = GetDlgItem(hwndDlg, cbd->m_dwButtonCID);
if (hwndBtn) {
if (cbd->m_hIcon)
- SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->m_hIcon));
+ SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon));
if (cbd->m_ptszTooltip)
SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)cbd->m_ptszTooltip, BATF_TCHAR);
SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);