diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2012-12-03 20:11:38 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2012-12-03 20:11:38 +0000 |
commit | 2884a88a686f4a9cb9116ef34865cdf304dc6be5 (patch) | |
tree | 9a8a599e3938a2c8c089470cb0f314d7d8e2138a | |
parent | 604bc182b9b9142a243637ffea620a591f36ad6c (diff) |
fixed icons in FavContacts (fixes #161)
git-svn-id: http://svn.miranda-ng.org/main/trunk@2625 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/FavContacts/src/main.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp index f6675982f8..b8f72e4301 100644 --- a/plugins/FavContacts/src/main.cpp +++ b/plugins/FavContacts/src/main.cpp @@ -42,6 +42,12 @@ PLUGININFOEX pluginInfo = { { 0xce2c0401, 0xf9e0, 0x40d7, { 0x8e, 0x95, 0x1a, 0x41, 0x97, 0xd7, 0xab, 0x4 } }
};
+static IconItem iconList[] =
+{
+ { LPGEN("Favourite Contact"), "favcontacts_favourite", IDI_FAVOURITE },
+ { LPGEN("Regular Contact"), "favcontacts_regular", IDI_REGULAR },
+};
+
#define MS_FAVCONTACTS_SHOWMENU "FavContacts/ShowMenu"
#define MS_FAVCONTACTS_SHOWMENU_CENTERED "FavContacts/ShowMenuCentered"
#define MS_FAVCONTACTS_OPEN_CONTACT "FavContacts/OpenContact"
@@ -62,7 +68,6 @@ INT_PTR svcShowMenuCentered(WPARAM wParam, LPARAM lParam); int ProcessSrmmEvent(WPARAM wParam, LPARAM lParam);
int ProcessSrmmIconClick(WPARAM wParam, LPARAM lParam);
-HANDLE g_icoFavourite=0, g_icoRegular=0;
float g_widthMultiplier = 0;
int g_maxItemWidth = 0;
@@ -124,7 +129,7 @@ int ProcessTBLoaded(WPARAM wParam, LPARAM lParam) button.pszTooltipUp = button.name = LPGEN("Favourite Contacts");
button.pszService = MS_FAVCONTACTS_SHOWMENU;
button.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_VISIBLE;
- button.hIconHandleUp = (HANDLE)g_icoFavourite;
+ button.hIconHandleUp = iconList[0].hIcolib;
TopToolbar_AddButton(&button);
return 0;
}
@@ -175,8 +180,8 @@ int ProcessModulesLoaded(WPARAM wParam, LPARAM lParam) sid.cbSize = sizeof(sid);
sid.szModule = "FavContacts";
sid.szTooltip = "Favourite Contacts";
- sid.hIcon = Skin_GetIconByHandle(g_icoFavourite);
- sid.hIconDisabled = Skin_GetIconByHandle(g_icoRegular);
+ sid.hIcon = Skin_GetIconByHandle(iconList[0].hIcolib);
+ sid.hIconDisabled = Skin_GetIconByHandle(iconList[1].hIcolib);
CallService(MS_MSG_ADDICON, 0, (LPARAM)&sid);
HookEvent(ME_MSG_ICONPRESSED, ProcessSrmmIconClick);
@@ -284,12 +289,6 @@ int ProcessOptInitialise(WPARAM wParam, LPARAM lParam) /////////////////////////////////////////////////////////////////////////////////////
-static IconItem iconList[] =
-{
- { LPGEN("Favourite Contact"), "favcontacts_favourite", IDI_FAVOURITE },
- { LPGEN("Regular Contact"), "favcontacts_regular", IDI_REGULAR },
-};
-
extern "C" __declspec(dllexport) int Load(void)
{
if (!CoreCheck()) return 1;
@@ -718,7 +717,7 @@ static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = NULL) if (options->wMaxRecent && DBGetContactSettingByte(hContact, "FavContacts", "IsFavourite", 0))
{
DrawIconEx(hdcTemp, lpdis->rcItem.right - 18, (lpdis->rcItem.top + lpdis->rcItem.bottom - 16) / 2,
- Skin_GetIconByHandle(g_icoFavourite), 16, 16, 0, NULL, DI_NORMAL);
+ Skin_GetIconByHandle(iconList[0].hIcolib), 16, 16, 0, NULL, DI_NORMAL);
lpdis->rcItem.right -= 20;
}
|