summaryrefslogtreecommitdiff
path: root/src/modules/extraicons/extraicons.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-04 22:36:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-04 22:36:16 +0000
commit0a668c8eb335ba601d97fc7c8dbbecb1c7455408 (patch)
tree5ea7696fe3e98623abfad58e62422b5538e2a36e /src/modules/extraicons/extraicons.cpp
parent3ed8130e44a7f076fba9f4957c09920716441f48 (diff)
massive extinction of clutches:
- nicer own extra icons; - duplicate cache entries in modern - many other quirks git-svn-id: http://svn.miranda-ng.org/main/trunk@2201 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/extraicons/extraicons.cpp')
-rw-r--r--src/modules/extraicons/extraicons.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp
index 9688ec364c..7a4f1a40e6 100644
--- a/src/modules/extraicons/extraicons.cpp
+++ b/src/modules/extraicons/extraicons.cpp
@@ -96,7 +96,7 @@ int Clist_SetExtraIcon(HANDLE hContact, int slot, HANDLE hImage)
if (hItem == 0)
return -1;
- SendMessage(cli.hwndContactTree, CLM_SETWIDEEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(icol,hImage));
+ SendMessage(cli.hwndContactTree, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(icol,hImage));
return 0;
}
@@ -276,33 +276,34 @@ int ClistExtraClick(WPARAM wParam, LPARAM lParam)
static HANDLE hEventExtraImageListRebuilding, hEventExtraImageApplying, hEventExtraClick;
static bool bImageCreated = false;
static int g_mutex_bSetAllExtraIconsCycle = 0;
+static HIMAGELIST hExtraImageList;
HANDLE ExtraIcon_Add(HICON hIcon)
{
- if (cli.hExtraImageList == 0 || hIcon == 0)
+ if (hExtraImageList == 0 || hIcon == 0)
return INVALID_HANDLE_VALUE;
- int res = ImageList_AddIcon(cli.hExtraImageList, hIcon);
+ int res = ImageList_AddIcon(hExtraImageList, hIcon);
return (res > 0xFFFE) ? INVALID_HANDLE_VALUE : (HANDLE)res;
}
void fnReloadExtraIcons()
{
- SendMessage(cli.hwndContactTree, CLM_SETEXTRACOLUMNSSPACE, db_get_b(NULL,"CLUI","ExtraColumnSpace",18), 0);
+ SendMessage(cli.hwndContactTree, CLM_SETEXTRASPACE, db_get_b(NULL,"CLUI","ExtraColumnSpace",18), 0);
SendMessage(cli.hwndContactTree, CLM_SETEXTRAIMAGELIST, 0, 0);
- if (cli.hExtraImageList)
- ImageList_Destroy(cli.hExtraImageList);
+ if (hExtraImageList)
+ ImageList_Destroy(hExtraImageList);
- cli.hExtraImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),ILC_COLOR32|ILC_MASK,1,256);
+ hExtraImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),ILC_COLOR32|ILC_MASK,1,256);
- SendMessage(cli.hwndContactTree,CLM_SETEXTRAIMAGELIST,(WPARAM)cli.hExtraImageList,0);
- SendMessage(cli.hwndContactTree,CLM_SETEXTRACOLUMNS, EXTRA_ICON_COUNT, 0);
+ SendMessage(cli.hwndContactTree, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)hExtraImageList);
+ SendMessage(cli.hwndContactTree, CLM_SETEXTRACOLUMNS, EXTRA_ICON_COUNT, 0);
NotifyEventHooks(hEventExtraImageListRebuilding,0,0);
bImageCreated = true;
}
-void fnSetAllExtraIcons(HWND hwndList,HANDLE hContact)
+void fnSetAllExtraIcons(HWND hwndList, HANDLE hContact)
{
if (cli.hwndContactTree == 0)
return;
@@ -313,7 +314,7 @@ void fnSetAllExtraIcons(HWND hwndList,HANDLE hContact)
if (!bImageCreated)
cli.pfnReloadExtraIcons();
- SendMessage(cli.hwndContactTree,CLM_SETEXTRACOLUMNS, EXTRA_ICON_COUNT, 0);
+ SendMessage(cli.hwndContactTree, CLM_SETEXTRACOLUMNS, EXTRA_ICON_COUNT, 0);
if (hContact == NULL)
hContact = db_find_first();