summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-03 18:51:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-03 18:51:25 +0000
commit31582b9e959b65cb9e29c4197a42e1a7e9ca804e (patch)
tree23ed81355fc68a8b9812be0c30f20467b4c52cf4 /plugins
parentc8a4c6574f3e0894d97c67cdd45e311a42eda59f (diff)
tray icons code standardization
git-svn-id: http://svn.miranda-ng.org/main/trunk@5569 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Clist_modern/src/hdr/modern_commonprototypes.h2
-rw-r--r--plugins/Clist_modern/src/init.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clisttray.cpp76
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_cluiservices.cpp2
-rw-r--r--plugins/Clist_mw/src/clisttray.cpp125
-rw-r--r--plugins/Clist_mw/src/contact.cpp8
-rw-r--r--plugins/Clist_nicer/src/clistmod.cpp1
-rw-r--r--plugins/Clist_nicer/src/clisttray.cpp26
-rw-r--r--plugins/Clist_nicer/src/init.cpp6
10 files changed, 104 insertions, 148 deletions
diff --git a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h
index 844638c10b..26ef062251 100644
--- a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h
+++ b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h
@@ -300,7 +300,7 @@ int cliShowHide(WPARAM wParam,LPARAM lParam);
BOOL CLUI__cliInvalidateRect(HWND hWnd, CONST RECT* lpRect,BOOL bErase );
int cliCompareContacts(const ClcContact *contact1,const ClcContact *contact2);
int cliFindItem(HWND hwnd,ClcData *dat,HANDLE hItem,ClcContact **contact,ClcGroup **subgroup,int *isVisible);
-void cliTrayIconUpdateBase(const char *szChangedProto);
+int cliTrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCount);
int cliTrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam);
void cliCluiProtocolStatusChanged(int status,const char * proto);
HMENU cliBuildGroupPopupMenu(ClcGroup *group);
diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp
index da3e5d1b0f..876a3b3464 100644
--- a/plugins/Clist_modern/src/init.cpp
+++ b/plugins/Clist_modern/src/init.cpp
@@ -158,7 +158,7 @@ static HRESULT SubclassClistInterface()
pcli->pfnInvalidateDisplayNameCacheEntry = cliInvalidateDisplayNameCacheEntry;
pcli->pfnTrayIconPauseAutoHide = cliTrayIconPauseAutoHide;
- pcli->pfnTrayIconUpdateBase = cliTrayIconUpdateBase;
+ pcli->pfnTrayCalcChanged = cliTrayCalcChanged;
pcli->pfnCluiProtocolStatusChanged = cliCluiProtocolStatusChanged;
pcli->pfnBeginRenameSelection = cliBeginRenameSelection;
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp
index 19a6b8c605..f50a5c3c34 100644
--- a/plugins/Clist_modern/src/modern_clisttray.cpp
+++ b/plugins/Clist_modern/src/modern_clisttray.cpp
@@ -155,33 +155,14 @@ static VOID CALLBACK RefreshTimerProc(HWND hwnd,UINT message,UINT idEvent,DWORD
}
//////// End by FYR /////////
-void cliTrayIconUpdateBase(const char *szChangedProto)
+int cliTrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCount)
{
- if ( !szChangedProto) return;
- if ( !pcli->pfnGetProtocolVisibility(szChangedProto)) return;
-
- int i,count,netProtoCount,changed = -1;
- PROTOACCOUNT **accs;
- int averageMode = 0;
+ int changed = -1;
HWND hwnd = pcli->hwndContactList;
DBVARIANT dbv;
char *szProto = NULL;
- pcli->pfnLockTray();
- if ( pcli->cycleTimerId ) {
- KillTimer( NULL, pcli->cycleTimerId);
- pcli->cycleTimerId = 0;
- }
- ProtoEnumAccounts( &count, &accs );
- for (i=0, netProtoCount = 0;i < count;i++) {
- if ( pcli->pfnGetProtocolVisibility(accs[i]->szModuleName) == 0 ) continue;
- netProtoCount++;
- if ( !lstrcmpA(szChangedProto,accs[i]->szModuleName)) pcli->cycleStep = i;
- if (averageMode == 0) averageMode = CallProtoService(accs[i]->szModuleName,PS_GETSTATUS, 0, 0);
- else if (averageMode != CallProtoService(accs[i]->szModuleName,PS_GETSTATUS, 0, 0)) {averageMode = -1; break;}
- }
-
- if (netProtoCount>1) {
+ if (netProtoCount > 1) {
if (averageMode >= ID_STATUS_OFFLINE) {
if ( db_get_b(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI) {
if ( db_get_b(NULL,"CList","AlwaysMulti",SETTING_ALWAYSMULTI_DEFAULT))
@@ -222,7 +203,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto)
CListTray_GetGlobalStatus(0, 0);
if (g_bMultiConnectionMode) {
if (_strcmpi(szChangedProto, g_szConnectingProto))
- { pcli->pfnUnlockTray(); return; }
+ return -1;
else
hIcon = (HICON)CLUI_GetConnectingIconService(NULL, 1);
}
@@ -252,23 +233,20 @@ void cliTrayIconUpdateBase(const char *szChangedProto)
{
HICON hIcon;
// 1 check if multi connecting icon
- if (g_bMultiConnectionMode)
+ if (g_bMultiConnectionMode) {
if (_strcmpi(szChangedProto,g_szConnectingProto))
- { pcli->pfnUnlockTray(); return; }
- else
- hIcon = (HICON)CLUI_GetConnectingIconService((WPARAM)"",1);
- else
- hIcon = (HICON)CLUI_GetConnectingIconService((WPARAM)szChangedProto,0);
+ return -1;
+ hIcon = (HICON)CLUI_GetConnectingIconService((WPARAM)"",1);
+ }
+ else hIcon = (HICON)CLUI_GetConnectingIconService((WPARAM)szChangedProto,0);
if (hIcon)
changed = pcli->pfnTrayIconSetBaseInfo(hIcon,NULL);
}
}
- else
- {
+ else {
pcli->cycleTimerId = CLUI_SafeSetTimer(NULL, 0, db_get_w(NULL,"CList","CycleTime",SETTING_CYCLETIME_DEFAULT)*1000, pcli->pfnTrayCycleTimerProc);
changed = pcli->pfnTrayIconSetBaseInfo(cliGetIconFromStatusMode(NULL,szChangedProto,status),NULL);
}
-
}
break;
@@ -278,19 +256,13 @@ void cliTrayIconUpdateBase(const char *szChangedProto)
else if ( db_get_b(NULL,"CList","AlwaysMulti",SETTING_ALWAYSMULTI_DEFAULT )) {
if (pcli->pfnGetProtocolVisibility(szChangedProto))
{
-
- int status;
- status = CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0);
- if ((g_StatusBarData.connectingIcon == 1) && status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES)
- {
- //
- HICON hIcon;
- hIcon = (HICON)CLUI_GetConnectingIconService((WPARAM)szChangedProto,0);;
+ int status = CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0);
+ if ((g_StatusBarData.connectingIcon == 1) && status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES) {
+ HICON hIcon = (HICON)CLUI_GetConnectingIconService((WPARAM)szChangedProto,0);
if (hIcon)
changed = pcli->pfnTrayIconSetBaseInfo(hIcon,szChangedProto);
}
- else
- changed = pcli->pfnTrayIconSetBaseInfo(cliGetIconFromStatusMode(NULL,szChangedProto,CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0)),szChangedProto);
+ else changed = pcli->pfnTrayIconSetBaseInfo(cliGetIconFromStatusMode(NULL,szChangedProto,CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0)),szChangedProto);
}
}
else if (pcli->pfnGetProtocolVisibility(szChangedProto)) {
@@ -303,18 +275,18 @@ void cliTrayIconUpdateBase(const char *szChangedProto)
pcli->pfnTrayIconInit(hwnd);
}
else {
- int status;
changed = i;
- status = CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0);
+ int status = CallProtoService(szChangedProto,PS_GETSTATUS, 0, 0);
if ((g_StatusBarData.connectingIcon == 1) && status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES) {
- //
- HICON hIcon;
- hIcon = (HICON)CLUI_GetConnectingIconService((WPARAM)szChangedProto,0);;
- if (hIcon) {
+ HICON hIcon = (HICON)CLUI_GetConnectingIconService((WPARAM)szChangedProto,0);;
+ if (hIcon)
changed = pcli->pfnTrayIconSetBaseInfo(hIcon,szChangedProto);
- } } } }
+ }
+ }
+ }
break;
- } }
+ }
+ }
}
else if ( pcli->pfnGetProtocolVisibility( szChangedProto ))
{
@@ -339,9 +311,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto)
}
}
- if (changed != -1) // && pcli->trayIcon[changed].isBase)
- pcli->pfnTrayIconUpdate(pcli->trayIcon[changed].hBaseIcon,NULL,szChangedProto,1); // by FYR (No suitable protocol)
- { pcli->pfnUnlockTray(); return; }
+ return changed;
}
static UINT_PTR autoHideTimerId;
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 7376a2a363..d8ad4dda50 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -2168,9 +2168,9 @@ LRESULT CLUI::OnStatusBarUpdateTimer(UINT msg, WPARAM wParam, LPARAM lParam)
if (IsWindowVisible(pcli->hwndStatus))
pcli->pfnInvalidateRect(pcli->hwndStatus,NULL,0);
if (pt->bGlobal)
- cliTrayIconUpdateBase(g_szConnectingProto);
+ pcli->pfnTrayIconUpdateBase(g_szConnectingProto);
else
- cliTrayIconUpdateBase(pt->szProto);
+ pcli->pfnTrayIconUpdateBase(pt->szProto);
pcli->pfnInvalidateRect(pcli->hwndStatus,NULL,TRUE);
return DefCluiWndProc( msg, wParam, lParam);
diff --git a/plugins/Clist_modern/src/modern_cluiservices.cpp b/plugins/Clist_modern/src/modern_cluiservices.cpp
index c5813f1439..2203f713e7 100644
--- a/plugins/Clist_modern/src/modern_cluiservices.cpp
+++ b/plugins/Clist_modern/src/modern_cluiservices.cpp
@@ -35,7 +35,7 @@ void cliCluiProtocolStatusChanged(int status,const char * proto)
{
CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE,(WPARAM)pcli->hwndStatus,0);
if (proto)
- cliTrayIconUpdateBase(proto);
+ pcli->pfnTrayIconUpdateBase(proto);
}
static INT_PTR MetaSupportCheck(WPARAM wParam,LPARAM lParam)
diff --git a/plugins/Clist_mw/src/clisttray.cpp b/plugins/Clist_mw/src/clisttray.cpp
index af0f210e14..2aeb9e70d4 100644
--- a/plugins/Clist_mw/src/clisttray.cpp
+++ b/plugins/Clist_mw/src/clisttray.cpp
@@ -36,12 +36,13 @@ INT_PTR TrayIconProcessMessage(WPARAM wParam,LPARAM lParam)
case WM_DRAWITEM:
return CallService(MS_CLIST_MENUDRAWITEM,msg->wParam,msg->lParam);
break;
+
case WM_MEASUREITEM:
return CallService(MS_CLIST_MENUMEASUREITEM,msg->wParam,msg->lParam);
break;
+
case TIM_CALLBACK:
- if (msg->lParam == WM_RBUTTONUP)
- {
+ if (msg->lParam == WM_RBUTTONUP) {
POINT pt;
HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDTRAY,0,0);
@@ -49,7 +50,7 @@ INT_PTR TrayIconProcessMessage(WPARAM wParam,LPARAM lParam)
SetFocus(msg->hwnd);
GetCursorPos(&pt);
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN, pt.x, pt.y, 0, msg->hwnd, NULL);
- DestroyTrayMenu(hMenu);
+ DestroyTrayMenu(hMenu);
}
else break;
@@ -69,10 +70,12 @@ HANDLE hTrayStatusMenuItemProxy;
HANDLE hPreBuildTrayMenuEvent;
//traymenu exec param(ownerdata)
-typedef struct{
-char *szServiceName;
-INT_PTR Param1;
-}TrayMenuExecParam,*lpTrayMenuExecParam;
+typedef struct
+{
+ char *szServiceName;
+ INT_PTR Param1;
+}
+ TrayMenuExecParam,*lpTrayMenuExecParam;
/*
wparam = handle to the menu item returned by MS_CLIST_ADDCONTACTMENUITEM
@@ -159,7 +162,8 @@ INT_PTR TrayMenuonAddService(WPARAM wParam,LPARAM lParam)
//called with:
//wparam - ownerdata
//lparam - lparam from winproc
-INT_PTR TrayMenuExecService(WPARAM wParam,LPARAM lParam) {
+INT_PTR TrayMenuExecService(WPARAM wParam,LPARAM lParam)
+{
if (wParam != 0)
{
lpTrayMenuExecParam mmep = (lpTrayMenuExecParam)wParam;
@@ -223,56 +227,55 @@ void InitTrayMenus(void)
op.Value = (INT_PTR)"CLISTMENUSTRAY/TrayMenuonAddService";
CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
- {
- //add exit command to menu
- CLISTMENUITEM mi = { sizeof(mi) };
- mi.position = 900000;
- mi.pszService = "CloseAction";
- mi.pszName = LPGEN("E&xit");
- AddTrayMenuItem(0,(LPARAM)&mi);
-
- memset(&mi,0,sizeof(mi));
- mi.cbSize = sizeof(mi);
- mi.position = 100000;
- mi.pszService = MS_CLIST_SHOWHIDE;
- mi.pszName = LPGEN("&Hide/Show");
- hHideShowMainMenuItem = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
-
- memset(&mi,0,sizeof(mi));
- mi.cbSize = sizeof(mi);
- mi.position = 200000;
- mi.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_FINDUSER));
- mi.pszService = "FindAdd/FindAddCommand";
- mi.pszName = LPGEN("&Find/Add Contacts...");
- AddTrayMenuItem(0,(LPARAM)&mi);
-
- memset(&mi,0,sizeof(mi));
- mi.cbSize = sizeof(mi);
- mi.position = 300000;
- mi.pszService = "";
- mi.pszName = LPGEN("&Main Menu");
- hTrayMainMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
-
- memset(&mi,0,sizeof(mi));
- mi.cbSize = sizeof(mi);
- mi.position = 300100;
- mi.pszService = "";
- mi.pszName = LPGEN("&Status");
- hTrayStatusMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
-
- memset(&mi,0,sizeof(mi));
- mi.cbSize = sizeof(mi);
- mi.position = 400000;
- mi.hIcon = LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_OPTIONS));
- mi.pszService = "Options/OptionsCommand";
- mi.pszName = LPGEN("&Options...");
- AddTrayMenuItem(0,(LPARAM)&mi);
-
- memset(&mi,0,sizeof(mi));
- mi.cbSize = sizeof(mi);
- mi.position = 500000;
- mi.hIcon = LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_CLIENTMIRANDA));
- mi.pszService = "Help/AboutCommand";
- mi.pszName = LPGEN("&About");
- AddTrayMenuItem(0,(LPARAM)&mi);
-} }
+ //add exit command to menu
+ CLISTMENUITEM mi = { sizeof(mi) };
+ mi.position = 900000;
+ mi.pszService = "CloseAction";
+ mi.pszName = LPGEN("E&xit");
+ AddTrayMenuItem(0,(LPARAM)&mi);
+
+ memset(&mi,0,sizeof(mi));
+ mi.cbSize = sizeof(mi);
+ mi.position = 100000;
+ mi.pszService = MS_CLIST_SHOWHIDE;
+ mi.pszName = LPGEN("&Hide/Show");
+ hHideShowMainMenuItem = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
+
+ memset(&mi,0,sizeof(mi));
+ mi.cbSize = sizeof(mi);
+ mi.position = 200000;
+ mi.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_FINDUSER));
+ mi.pszService = "FindAdd/FindAddCommand";
+ mi.pszName = LPGEN("&Find/Add Contacts...");
+ AddTrayMenuItem(0,(LPARAM)&mi);
+
+ memset(&mi,0,sizeof(mi));
+ mi.cbSize = sizeof(mi);
+ mi.position = 300000;
+ mi.pszService = "";
+ mi.pszName = LPGEN("&Main Menu");
+ hTrayMainMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
+
+ memset(&mi,0,sizeof(mi));
+ mi.cbSize = sizeof(mi);
+ mi.position = 300100;
+ mi.pszService = "";
+ mi.pszName = LPGEN("&Status");
+ hTrayStatusMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
+
+ memset(&mi,0,sizeof(mi));
+ mi.cbSize = sizeof(mi);
+ mi.position = 400000;
+ mi.hIcon = LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_OPTIONS));
+ mi.pszService = "Options/OptionsCommand";
+ mi.pszName = LPGEN("&Options...");
+ AddTrayMenuItem(0,(LPARAM)&mi);
+
+ memset(&mi,0,sizeof(mi));
+ mi.cbSize = sizeof(mi);
+ mi.position = 500000;
+ mi.hIcon = LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_CLIENTMIRANDA));
+ mi.pszService = "Help/AboutCommand";
+ mi.pszName = LPGEN("&About");
+ AddTrayMenuItem(0,(LPARAM)&mi);
+}
diff --git a/plugins/Clist_mw/src/contact.cpp b/plugins/Clist_mw/src/contact.cpp
index 12a82ba2d5..9a818226e1 100644
--- a/plugins/Clist_mw/src/contact.cpp
+++ b/plugins/Clist_mw/src/contact.cpp
@@ -77,9 +77,11 @@ void LoadContactTree(void)
{
int tick = GetTickCount();
CallService(MS_CLUI_LISTBEGINREBUILD,0,0);
- for (int i=1;; i++)
- if ((char*)CallService(MS_CLIST_GROUPGETNAME2, i, 0) != NULL)
- CallService(MS_CLUI_GROUPADDED, i, 0);
+ for (int i=1;; i++) {
+ if ((char*)CallService(MS_CLIST_GROUPGETNAME2, i, 0) == NULL)
+ break;
+ CallService(MS_CLUI_GROUPADDED, i, 0);
+ }
int hideOffline = db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT);
diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp
index ae022a4a7f..bfb01329b5 100644
--- a/plugins/Clist_nicer/src/clistmod.cpp
+++ b/plugins/Clist_nicer/src/clistmod.cpp
@@ -40,7 +40,6 @@ extern int RemoveEvent(WPARAM wParam, LPARAM lParam);
int InitCustomMenus(void);
void UninitCustomMenus(void);
INT_PTR GetContactStatusMessage(WPARAM wParam, LPARAM lParam);
-void TrayIconUpdateBase(const char *szChangedProto);
int EventsProcessContactDoubleClick(HANDLE hContact);
int SetHideOffline(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/Clist_nicer/src/clisttray.cpp b/plugins/Clist_nicer/src/clisttray.cpp
index 9430ed1f56..bad9535193 100644
--- a/plugins/Clist_nicer/src/clisttray.cpp
+++ b/plugins/Clist_nicer/src/clisttray.cpp
@@ -35,29 +35,11 @@ extern HIMAGELIST hCListImages;
#define NIF_STATE 0x00000008
#define NIF_INFO 0x00000010
-void TrayIconUpdateBase(const char *szChangedProto)
+int TrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCount)
{
- int i,count,netProtoCount,changed = -1;
- PROTOACCOUNT **accs;
- int averageMode = 0;
+ int changed = -1;
HWND hwnd = pcli->hwndContactList;
- if (pcli->cycleTimerId)
- KillTimer(NULL, pcli->cycleTimerId); pcli->cycleTimerId = 0;
-
- ProtoEnumAccounts( &count, &accs );
- for (i = 0,netProtoCount = 0; i < count; i++) {
- if ( !pcli->pfnGetProtocolVisibility( accs[i]->szModuleName ))
- continue;
- netProtoCount++;
- if ( !lstrcmpA(szChangedProto, accs[i]->szModuleName ))
- pcli->cycleStep = i;
- if (averageMode == 0)
- averageMode = CallProtoService( accs[i]->szModuleName, PS_GETSTATUS, 0, 0);
- else if (averageMode != CallProtoService( accs[i]->szModuleName, PS_GETSTATUS, 0, 0)) {
- averageMode = -1; break;
- }
- }
if (netProtoCount > 1) {
if (averageMode > 0) {
if (cfg::getByte("CList", "TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI) {
@@ -150,8 +132,8 @@ void TrayIconUpdateBase(const char *szChangedProto)
else
changed = pcli->pfnTrayIconSetBaseInfo(ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL), NULL);
}
- if (changed != -1 && pcli->trayIcon[changed].isBase)
- pcli->pfnTrayIconUpdate( pcli->trayIcon[changed].hBaseIcon, NULL, pcli->trayIcon[changed].szProto, 1);
+
+ return changed;
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp
index 7b8b31de25..f7ac4a02ba 100644
--- a/plugins/Clist_nicer/src/init.cpp
+++ b/plugins/Clist_nicer/src/init.cpp
@@ -51,9 +51,9 @@ TIME_API tmi;
HMENU BuildGroupPopupMenu( ClcGroup* group );
ClcContact* CreateClcContact( void );
-struct CListEvent* fnCreateEvent( void );
+CListEvent* fnCreateEvent( void );
void ReloadThemedOptions();
-void TrayIconUpdateBase(const char *szChangedProto);
+int TrayCalcChanged(const char *szChangedProto, int averageMode, int iProtoCount);
void RegisterCLUIFrameClasses();
void LoadButtonModule();
@@ -299,7 +299,7 @@ extern "C" int __declspec(dllexport) CListInitialise()
pcli->pfnRebuildEntireList = RebuildEntireList;
pcli->pfnRowHitTest = RowHeight::hitTest;
pcli->pfnScrollTo = ScrollTo;
- pcli->pfnTrayIconUpdateBase = TrayIconUpdateBase;
+ pcli->pfnTrayCalcChanged = TrayCalcChanged;
pcli->pfnSetHideOffline = SetHideOffline;
pcli->pfnShowHide = ShowHide;