summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-14 13:17:26 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-14 13:17:26 +0000
commit02ed4455c23e3562d71bfc80a0e2c4fede8708f1 (patch)
tree115a3d24e4a3877cd28bd4ff2d9d4011b790cc5f /plugins/TabSRMM
parentc72584d6b934b37dbd18d5f15ffb24a140e1e3f2 (diff)
- all icolib services removed;
- IcoLib_* functions are bound directly to the code git-svn-id: http://svn.miranda-ng.org/main/trunk@14161 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp86
-rw-r--r--plugins/TabSRMM/src/chat/options.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp4
-rw-r--r--plugins/TabSRMM/src/globals.cpp4
-rw-r--r--plugins/TabSRMM/src/msgs.cpp18
5 files changed, 57 insertions, 57 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);
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp
index c8754ccab7..094579efa5 100644
--- a/plugins/TabSRMM/src/chat/options.cpp
+++ b/plugins/TabSRMM/src/chat/options.cpp
@@ -350,7 +350,7 @@ HICON LoadIconEx(char *pszIcoLibName)
{
char szTemp[256];
mir_snprintf(szTemp, "chat_%s", pszIcoLibName);
- return Skin_GetIcon(szTemp);
+ return IcoLib_GetIcon(szTemp);
}
static void InitSetting(TCHAR* &ppPointer, const char *pszSetting, const TCHAR *pszDefault)
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index a597dac691..5af8dc4a6a 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -2186,7 +2186,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
if (g_Settings.bShowContactStatus && g_Settings.bContactStatusFirst && ui->ContactStatus) {
HICON hIcon = LoadSkinnedProtoIcon(si->pszModule, ui->ContactStatus);
DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 8, hIcon, 16, 16, 0, NULL, DI_NORMAL);
- Skin_ReleaseIcon(hIcon);
+ IcoLib_ReleaseIcon(hIcon);
x_offset += 18;
}
@@ -2210,7 +2210,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
if (g_Settings.bShowContactStatus && !g_Settings.bContactStatusFirst && ui->ContactStatus) {
HICON hIcon = LoadSkinnedProtoIcon(si->pszModule, ui->ContactStatus);
DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 8, hIcon, 16, 16, 0, NULL, DI_NORMAL);
- Skin_ReleaseIcon(hIcon);
+ IcoLib_ReleaseIcon(hIcon);
x_offset += 18;
}
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index d64543ff14..8d85c8e0bd 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -271,13 +271,13 @@ int CGlobals::TopToolbarLoaded(WPARAM, LPARAM)
ttb.pszService = MS_TABMSG_TRAYSUPPORT;
ttb.name = "TabSRMM session list";
ttb.pszTooltipUp = LPGEN("TabSRMM session list");
- ttb.hIconHandleUp = Skin_GetIcon("tabSRMM_sb_slist");
+ ttb.hIconHandleUp = IcoLib_GetIcon("tabSRMM_sb_slist");
TopToolbar_AddButton(&ttb);
ttb.name = "TabSRMM Menu";
ttb.pszTooltipUp = LPGEN("TabSRMM menu");
ttb.lParamUp = ttb.lParamDown = 1;
- ttb.hIconHandleUp = Skin_GetIcon("tabSRMM_container");
+ ttb.hIconHandleUp = IcoLib_GetIcon("tabSRMM_container");
TopToolbar_AddButton(&ttb);
return 0;
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 4f2ee0568a..b9312fa29d 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -806,9 +806,9 @@ static int TSAPI SetupIconLibConfig()
sid.iDefaultIndex = ICONBLOCKS[n].idesc[i].uId == -IDI_HISTORY ? 0 : ICONBLOCKS[n].idesc[i].uId; // workaround problem /w icoLib and a resource id of 1 (actually, a Windows problem)
if (n > 0 && n < 4)
- PluginConfig.g_buttonBarIconHandles[j++] = Skin_AddIcon(&sid);
+ PluginConfig.g_buttonBarIconHandles[j++] = IcoLib_AddIcon(&sid);
else
- Skin_AddIcon(&sid);
+ IcoLib_AddIcon(&sid);
}
}
@@ -816,19 +816,19 @@ static int TSAPI SetupIconLibConfig()
sid.pszName = "tabSRMM_clock_symbol";
sid.description.a = LPGEN("Clock symbol (for the info panel clock)");
sid.iDefaultIndex = -IDI_CLOCK;
- Skin_AddIcon(&sid);
+ IcoLib_AddIcon(&sid);
_tcsncpy(szFilename, _T("plugins\\tabsrmm.dll"), MAX_PATH);
sid.pszName = "tabSRMM_overlay_disabled";
sid.description.a = LPGEN("Feature disabled (used as overlay)");
sid.iDefaultIndex = -IDI_FEATURE_DISABLED;
- Skin_AddIcon(&sid);
+ IcoLib_AddIcon(&sid);
sid.pszName = "tabSRMM_overlay_enabled";
sid.description.a = LPGEN("Feature enabled (used as overlay)");
sid.iDefaultIndex = -IDI_FEATURE_ENABLED;
- Skin_AddIcon(&sid);
+ IcoLib_AddIcon(&sid);
return 1;
}
@@ -838,7 +838,7 @@ static int TSAPI LoadFromIconLib()
{
for (int n = 0; n < SIZEOF(ICONBLOCKS); n++)
for (int i = 0; i < ICONBLOCKS[n].nItems; i++)
- *(ICONBLOCKS[n].idesc[i].phIcon) = Skin_GetIcon(ICONBLOCKS[n].idesc[i].szName);
+ *(ICONBLOCKS[n].idesc[i].phIcon) = IcoLib_GetIcon(ICONBLOCKS[n].idesc[i].szName);
PluginConfig.g_buttonBarIcons[0] = LoadSkinnedIcon(SKINICON_OTHER_ADDCONTACT);
PluginConfig.g_buttonBarIcons[1] = LoadSkinnedIcon(SKINICON_OTHER_HISTORY);
@@ -853,10 +853,10 @@ static int TSAPI LoadFromIconLib()
PluginConfig.g_IconGroupOpen = LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN);
PluginConfig.g_IconGroupClose = LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT);
- PluginConfig.g_iconOverlayEnabled = Skin_GetIcon("tabSRMM_overlay_enabled");
- PluginConfig.g_iconOverlayDisabled = Skin_GetIcon("tabSRMM_overlay_disabled");
+ PluginConfig.g_iconOverlayEnabled = IcoLib_GetIcon("tabSRMM_overlay_enabled");
+ PluginConfig.g_iconOverlayDisabled = IcoLib_GetIcon("tabSRMM_overlay_disabled");
- PluginConfig.g_iconClock = Skin_GetIcon("tabSRMM_clock_symbol");
+ PluginConfig.g_iconClock = IcoLib_GetIcon("tabSRMM_clock_symbol");
CacheMsgLogIcons();
M.BroadcastMessage(DM_LOADBUTTONBARICONS, 0, 0);