summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-04-19 12:43:33 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-04-19 12:43:33 +0000
commit01ff549a2303122360f819c3344ff8a374839d82 (patch)
tree2241ad5b66087551f54a726894055d2e08a8763c
parent2201b08878bbf3f72c6e48ef82e4b80374f58c29 (diff)
further junk cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@16717 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/delphi/m_clist.inc11
-rw-r--r--include/m_clist.h9
-rw-r--r--include/m_clistint.h2
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp13
-rw-r--r--plugins/Clist_modern/src/modern_clc.h1
-rw-r--r--plugins/Clist_modern/src/modern_clistsettings.cpp26
-rw-r--r--plugins/Clist_modern/src/modern_commonprototypes.h1
-rw-r--r--plugins/Clist_modern/src/modern_defsettings.h1
-rw-r--r--plugins/Clist_nicer/src/clc.cpp43
-rw-r--r--plugins/Clist_nicer/src/contact.cpp2
-rw-r--r--plugins/FavContacts/src/menu.cpp2
-rw-r--r--plugins/FloatingContacts/src/thumbs.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/ContactList.cpp2
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp5
-rw-r--r--plugins/QuickSearch/sr_window.pas2
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp2
-rw-r--r--plugins/SeenPlugin/src/missed.cpp2
-rw-r--r--plugins/Sessions/Src/Main.cpp2
-rw-r--r--plugins/Sessions/Src/Options.cpp5
-rw-r--r--plugins/StopSpamPlus/src/events.cpp3
-rw-r--r--plugins/TipperYM/src/popwin.cpp2
-rw-r--r--src/mir_app/src/clc.cpp31
-rw-r--r--src/mir_app/src/clc.h4
-rw-r--r--src/mir_app/src/clcitems.cpp4
-rw-r--r--src/mir_app/src/clcmsgs.cpp4
-rw-r--r--src/mir_app/src/clistevents.cpp9
-rw-r--r--src/mir_app/src/clistmod.cpp13
-rw-r--r--src/mir_app/src/clistsettings.cpp19
-rw-r--r--src/mir_app/src/contact.cpp8
-rw-r--r--src/mir_app/src/meta_menu.cpp4
30 files changed, 73 insertions, 161 deletions
diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc
index eeb564581d..d7d94563af 100644
--- a/include/delphi/m_clist.inc
+++ b/include/delphi/m_clist.inc
@@ -157,17 +157,6 @@ const
{
wParam : TMCONTACT
- lParam : 0
- Affect : Get the icon that should be associated with a contact
- Returns: an index into the contact list imagelist, if the icon
- is a flashing icon, this service won't return information about it
- see below
- Version: v0.1.2.0+
- }
- MS_CLIST_GETCONTACTICON:PAnsiChar = 'CList/GetContactIcon';
-
- {
- wParam : TMCONTACT
lParam : ICON_ID
Affect : The icon of a contact in the contact list has changed,
ICON_ID is an index to what image has changed
diff --git a/include/m_clist.h b/include/m_clist.h
index 1475fca43d..3d3e8cfbda 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -253,15 +253,6 @@ typedef struct {
#define IMAGE_GROUPSHUT 12
/////////////////////////////////////////////////////////////////////////////////////////
-// get the icon that should be associated with a contact
-// wParam = (MCONTACT)hContact
-// lParam = 0
-// returns an index into the contact list imagelist. See clist/geticonsimagelist
-// If the contact is flashing an icon, this function will not return that
-// flashing icon. Use me_clist_contacticonchanged to get info about that.
-#define MS_CLIST_GETCONTACTICON "CList/GetContactIcon"
-
-/////////////////////////////////////////////////////////////////////////////////////////
// The icon of a contact in the contact list has changed
// wParam = (MCONTACT)hContact
// lParam = iconId
diff --git a/include/m_clistint.h b/include/m_clistint.h
index 778debe03f..23a415f7f3 100644
--- a/include/m_clistint.h
+++ b/include/m_clistint.h
@@ -387,7 +387,7 @@ struct CLIST_INTERFACE
void (*pfnOnCreateClc)(void);
/* contact.c */
- void (*pfnChangeContactIcon)(MCONTACT hContact, int iIcon, int add);
+ void (*pfnChangeContactIcon)(MCONTACT hContact, int iIcon);
void (*pfnLoadContactTree)(void);
int (*pfnCompareContacts)(const ClcContact *contact1, const ClcContact *contact2);
int (*pfnSetHideOffline)(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index eb903f5111..d93c693191 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -136,9 +136,7 @@ static int clcHookSettingChanged(WPARAM hContact, LPARAM lParam)
}
}
else {
- if (!strcmp(cws->szSetting, "TickTS"))
- pcli->pfnClcBroadcast(INTM_STATUSCHANGED, hContact, 0);
- else if (!strcmp(cws->szModule, "UserInfo")) {
+ if (!strcmp(cws->szModule, "UserInfo")) {
if (!strcmp(cws->szSetting, "Timezone"))
pcli->pfnClcBroadcast(INTM_TIMEZONECHANGED, hContact, 0);
}
@@ -1360,7 +1358,7 @@ static LRESULT clcOnIntmGroupChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wPara
SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm);
dat->needsResort = 1;
}
- SetTimer(hwnd, TIMERID_REBUILDAFTER, 1, NULL);
+ pcli->pfnInitAutoRebuild(hwnd);
return 0;
}
@@ -1564,7 +1562,6 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM
if (wParam != 0) {
ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry(wParam);
if (pdnce && pdnce->m_pszProto) {
- pdnce->m_iStatus = GetStatusForContact(pdnce->hContact, pdnce->m_pszProto);
if (!dat->force_in_dialog && (dat->second_line_show || dat->third_line_show))
gtaRenewText(pdnce->hContact);
SendMessage(hwnd, INTM_ICONCHANGED, wParam, corecli.pfnGetContactIcon(wParam));
@@ -1581,11 +1578,7 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM
}
}
- if (db_get_b(NULL, "CList", "PlaceOfflineToRoot", SETTING_PLACEOOFLINETOROOT_DEFAULT))
- pcli->pfnInitAutoRebuild(hwnd);
- else
- PostMessage(hwnd, INTM_INVALIDATE, 0, 0);
-
+ pcli->pfnInitAutoRebuild(hwnd);
return ret;
}
diff --git a/plugins/Clist_modern/src/modern_clc.h b/plugins/Clist_modern/src/modern_clc.h
index df08939883..72ae4d3b02 100644
--- a/plugins/Clist_modern/src/modern_clc.h
+++ b/plugins/Clist_modern/src/modern_clc.h
@@ -425,6 +425,5 @@ TCHAR* GetGroupNameTS(int idx, DWORD* pdwFlags);
int RenameGroupT(WPARAM groupID, LPARAM newName);
int GetContactCachedStatus(MCONTACT hContact);
-char *GetContactCachedProtocol(MCONTACT hContact);
#endif /* _CLC_H_ */
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp
index 83f3ac0478..5586f5cba8 100644
--- a/plugins/Clist_modern/src/modern_clistsettings.cpp
+++ b/plugins/Clist_modern/src/modern_clistsettings.cpp
@@ -243,15 +243,6 @@ void IvalidateDisplayNameCache()
}
}
-char* GetContactCachedProtocol(MCONTACT hContact)
-{
- ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(hContact);
- if (cacheEntry && cacheEntry->m_pszProto)
- return cacheEntry->m_pszProto;
-
- return NULL;
-}
-
int GetStatusForContact(MCONTACT hContact, char *szProto)
{
return (szProto) ? db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE) : ID_STATUS_OFFLINE;
@@ -259,8 +250,7 @@ int GetStatusForContact(MCONTACT hContact, char *szProto)
int GetContactInfosForSort(MCONTACT hContact, char **Proto, TCHAR **Name, int *Status)
{
- ClcCacheEntry *cacheEntry = NULL;
- cacheEntry = pcli->pfnGetCacheEntry(hContact);
+ ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(hContact);
if (cacheEntry != NULL) {
if (Proto != NULL) *Proto = cacheEntry->m_pszProto;
if (Name != NULL) *Name = cacheEntry->tszName;
@@ -277,7 +267,7 @@ int GetContactCachedStatus(MCONTACT hContact)
int ContactAdded(WPARAM hContact, LPARAM)
{
if (!MirandaExiting())
- pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode((char*)GetContactCachedProtocol(hContact), ID_STATUS_OFFLINE, hContact), 1); ///by FYR
+ pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(GetContactProto(hContact), ID_STATUS_OFFLINE, hContact));
return 0;
}
@@ -320,7 +310,6 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
amRequestAwayMsg(hContact);
pcli->pfnClcBroadcast(INTM_STATUSCHANGED, hContact, 0);
- pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact), 0); //by FYR
}
else if (!strcmp(cws->szModule, META_PROTO) && !memcmp(cws->szSetting, "Status", 6)) { // Status0..N for metacontacts
if (pcli->hwndContactTree && g_flag_bOnModulesLoadedCalled)
@@ -352,11 +341,9 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
else if (!strcmp(cws->szSetting, "Hidden")) {
pdnce->bIsHidden = cws->value.bVal;
- if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) {
- char *szProto = GetContactProto(hContact);
- pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(szProto,
- szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact), 1); //by FYR
- }
+ if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0)
+ pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(pdnce->m_pszProto, pdnce->getStatus(), hContact));
+
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
}
else if (!strcmp(cws->szSetting, "noOffline")) {
@@ -368,8 +355,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
if (!strcmp(cws->szSetting, "p")) {
pdnce->m_pszProto = GetContactProto(hContact);
char *szProto = (cws->value.type == DBVT_DELETED) ? NULL : cws->value.pszVal;
- pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(szProto,
- szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact), 0);
+ pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(szProto, pdnce->getStatus(), hContact));
}
}
diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h
index afc8d6040e..d28d2f08f5 100644
--- a/plugins/Clist_modern/src/modern_commonprototypes.h
+++ b/plugins/Clist_modern/src/modern_commonprototypes.h
@@ -184,7 +184,6 @@ HRESULT BackgroundsLoadModule();
int BackgroundsUnloadModule();
INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); //RowTemplate.c
BOOL FindMenuHanleByGlobalID(HMENU hMenu, int globalID, struct _MenuItemHandles * dat); //GenMenu.c
-char* GetContactCachedProtocol(MCONTACT hContact); //clistsettings.c
char* GetParamN(char *string, char *buf, int buflen, BYTE paramN, char Delim, BOOL SkipSpaces); //mod_skin_selector.c
WCHAR* GetParamN(WCHAR *string, WCHAR *buf, int buflen, BYTE paramN, WCHAR Delim, BOOL SkipSpaces);
DWORD CompareContacts2_getLMTime(MCONTACT u); //contact.c
diff --git a/plugins/Clist_modern/src/modern_defsettings.h b/plugins/Clist_modern/src/modern_defsettings.h
index 9f624b0976..60ab0ce282 100644
--- a/plugins/Clist_modern/src/modern_defsettings.h
+++ b/plugins/Clist_modern/src/modern_defsettings.h
@@ -133,7 +133,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define SETTING_SORTBY2_DEFAULT SORTBY_NAME //"CList","SortBy2"
#define SETTING_SORTBY3_DEFAULT SORTBY_STATUS //"CList","SortBy3"
-#define SETTING_PLACEOOFLINETOROOT_DEFAULT 0 //"CList","PlaceOfflineToRoot"
#define SETTING_NOOFFLINEBOTTOM_DEFAULT 0 //"CList","NoOfflineBottom"
#define SETTING_HIDEOFFLINEATROOT_DEFAULT 0 //"CLC","HideOfflineRoot"
#define SETTING_HILIGHTMODE_DEFAULT 0 //todo replace by constant //"CLC","HiLightMode"
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp
index a04c0f26b7..82d65461ea 100644
--- a/plugins/Clist_nicer/src/clc.cpp
+++ b/plugins/Clist_nicer/src/clc.cpp
@@ -125,28 +125,13 @@ static int ClcSettingChanged(WPARAM hContact, LPARAM lParam)
szProto_s = NULL;
else
szProto_s = cws->value.pszVal;
- pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(szProto_s, szProto_s == NULL ? ID_STATUS_OFFLINE : cfg::getWord(hContact, szProto_s, "Status", ID_STATUS_OFFLINE), hContact, NULL), 0);
+ pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(szProto_s, szProto_s == NULL ? ID_STATUS_OFFLINE : cfg::getWord(hContact, szProto_s, "Status", ID_STATUS_OFFLINE), hContact, NULL));
}
// something is being written to a protocol module
if (!__strcmp(szProto, cws->szModule)) {
// was a unique setting key written?
pcli->pfnInvalidateDisplayNameCacheEntry(hContact);
- if (!__strcmp(cws->szSetting, "Status")) {
- if (!cfg::getByte(hContact, "CList", "Hidden", 0)) {
- if (cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) {
- // User's state is changing, and we are hideOffline-ing
- if (cws->value.wVal == ID_STATUS_OFFLINE) {
- pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(cws->szModule, cws->value.wVal, hContact, NULL), 0);
- return 0;
- }
- pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(cws->szModule, cws->value.wVal, hContact, NULL), 1);
- }
- pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(cws->szModule, cws->value.wVal, hContact, NULL), 0);
- }
- SendMessage(pcli->hwndContactTree, INTM_STATUSCHANGED, hContact, lParam);
- return 0;
- }
- else if (strstr("YMsg|StatusDescr|XStatusMsg", cws->szSetting))
+ if (strstr("YMsg|StatusDescr|XStatusMsg", cws->szSetting))
SendMessage(pcli->hwndContactTree, INTM_STATUSMSGCHANGED, hContact, lParam);
else if (strstr(cws->szSetting, "XStatus"))
SendMessage(pcli->hwndContactTree, INTM_XSTATUSCHANGED, hContact, lParam);
@@ -343,7 +328,7 @@ LBL_Def:
}
}
else {
- //item in list already
+ // item in list already
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
if (contact->iImage == (WORD)lParam)
break;
@@ -441,7 +426,7 @@ LBL_Def:
if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL))
return 0;
-
+
contact->ace = cEntry;
if (cEntry == NULL)
contact->cFlags &= ~ECF_AVATAR;
@@ -651,19 +636,16 @@ LBL_Def:
return TRUE;
case WM_CONTEXTMENU:
+ pcli->pfnEndRename(hwnd, dat, 1);
+ pcli->pfnHideInfoTip(hwnd, dat);
+ KillTimer(hwnd, TIMERID_RENAME);
+ KillTimer(hwnd, TIMERID_INFOTIP);
+ if (GetFocus() != hwnd)
+ SetFocus(hwnd);
+ dat->iHotTrack = -1;
+ dat->szQuickSearch[0] = 0;
{
- HMENU hMenu = NULL;
DWORD hitFlags;
-
- pcli->pfnEndRename(hwnd, dat, 1);
- pcli->pfnHideInfoTip(hwnd, dat);
- KillTimer(hwnd, TIMERID_RENAME);
- KillTimer(hwnd, TIMERID_INFOTIP);
- if (GetFocus() != hwnd)
- SetFocus(hwnd);
- dat->iHotTrack = -1;
- dat->szQuickSearch[0] = 0;
-
POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
if (pt.x == -1 && pt.y == -1) {
dat->selection = pcli->pfnGetRowByIndex(dat, dat->selection, &contact, NULL);
@@ -682,6 +664,7 @@ LBL_Def:
pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0);
UpdateWindow(hwnd);
+ HMENU hMenu = NULL;
if (dat->selection != -1 && hitFlags & (CLCHT_ONITEMICON | CLCHT_ONITEMCHECK | CLCHT_ONITEMLABEL)) {
if (contact->type == CLCIT_GROUP) {
hMenu = Menu_BuildSubGroupMenu(contact->group);
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp
index b5ff16c270..26dc01f498 100644
--- a/plugins/Clist_nicer/src/contact.cpp
+++ b/plugins/Clist_nicer/src/contact.cpp
@@ -141,7 +141,7 @@ void LoadContactTree(void)
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
status = GetContactStatus(hContact);
if ((!hideOffline || status != ID_STATUS_OFFLINE) && !CLVM_GetContactHiddenStatus(hContact, NULL, NULL))
- pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(GetContactProto(hContact), status, hContact, NULL), 1);
+ pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(GetContactProto(hContact), status, hContact, NULL));
// build initial data for message frequency
if (!bMsgFrequency)
diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp
index 150145e693..e9c2bd5287 100644
--- a/plugins/FavContacts/src/menu.cpp
+++ b/plugins/FavContacts/src/menu.cpp
@@ -242,7 +242,7 @@ static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = NULL)
char *proto = GetContactProto(hContact);
HIMAGELIST hIml = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0);
- int iIcon = CallService(MS_CLIST_GETCONTACTICON, hContact, 0);
+ int iIcon = pcli->pfnGetContactIcon(hContact);
if (db_get_dw(hContact, proto, "IdleTS", 0)) {
ImageList_DrawDimmed(hIml, iIcon, hdcTemp,
diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp
index eb3659e425..51dc4132d1 100644
--- a/plugins/FloatingContacts/src/thumbs.cpp
+++ b/plugins/FloatingContacts/src/thumbs.cpp
@@ -302,7 +302,7 @@ void ThumbInfo::ResizeThumb()
void ThumbInfo::RefreshContactIcon(int _iIcon)
{
if (_iIcon == 0xFFFFFFFF || ImageList_GetImageCount(himlMiranda) <= _iIcon)
- iIcon = CallService(MS_CLIST_GETCONTACTICON, hContact, 0);
+ iIcon = pcli->pfnGetContactIcon(hContact);
else
iIcon = _iIcon;
diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp
index 17f12f5f65..ce2d3f9a03 100644
--- a/plugins/NewAwaySysMod/src/ContactList.cpp
+++ b/plugins/NewAwaySysMod/src/ContactList.cpp
@@ -371,7 +371,7 @@ HTREEITEM CCList::AddContact(MCONTACT hContact)
tvIns.item.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
tvIns.hInsertAfter = TVI_ROOT;
tvIns.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
- tvIns.item.iImage = tvIns.item.iSelectedImage = CallService(MS_CLIST_GETCONTACTICON, hContact, 0);
+ tvIns.item.iImage = tvIns.item.iSelectedImage = pcli->pfnGetContactIcon(hContact);
tvIns.item.lParam = Items.AddElem(CCLItemData(hContact));
return TreeView_InsertItem(hTreeView, &tvIns);
}
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index fb3d4c3e9a..fe0b5db968 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -469,7 +469,7 @@ void EnableButtons(HWND hwndDlg, MCONTACT hContact)
EnableWindow(GetDlgItem(hwndDlg, IDC_HISTORY), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_MENU), TRUE);
- HICON ico = ImageList_GetIcon(hIml, CallService(MS_CLIST_GETCONTACTICON, hContact, 0), ILD_IMAGE);
+ HICON ico = ImageList_GetIcon(hIml, pcli->pfnGetContactIcon(hContact), ILD_IMAGE);
SendDlgItemMessage(hwndDlg, IDC_ICO, STM_SETICON, (WPARAM) ico, 0);
}
}
@@ -1025,8 +1025,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
// Draw icon
rc.left = lpdis->rcItem.left + 5;
rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - icon_height) / 2;
- ImageList_Draw(hIml, CallService(MS_CLIST_GETCONTACTICON, (WPARAM)contacts[lpdis->itemData]->hcontact, 0),
- lpdis->hDC, rc.left, rc.top, ILD_NORMAL);
+ ImageList_Draw(hIml, pcli->pfnGetContactIcon(contacts[lpdis->itemData]->hcontact), lpdis->hDC, rc.left, rc.top, ILD_NORMAL);
// Make rect for text
rc.left += icon_width + 5;
diff --git a/plugins/QuickSearch/sr_window.pas b/plugins/QuickSearch/sr_window.pas
index 84bc9a7d10..9521d9525e 100644
--- a/plugins/QuickSearch/sr_window.pas
+++ b/plugins/QuickSearch/sr_window.pas
@@ -123,7 +123,7 @@ begin
FillChar(li,SizeOf(li),0);
li.iItem :=100000; //!! need append
li.mask :=LVIF_IMAGE or LVIF_PARAM;
- li.iImage:=CallService(MS_CLIST_GETCONTACTICON,hContact,0);
+ li.iImage:=cli^.pfnGetContactIcon(hContact);
li.lParam:=num;
li.iItem :=SendMessageW(grid,LVM_INSERTITEMW,0,lparam(@li));
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index b15c991127..45e07dd431 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -256,7 +256,7 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
str = _A2T(strtim);
str += cname;
lvi.pszText = (LPTSTR)str.c_str();
- lvi.iImage = CallService(MS_CLIST_GETCONTACTICON, (WPARAM)curContact->second, 0);
+ lvi.iImage = pcli->pfnGetContactIcon(curContact->second);
ListView_InsertItem(hList, &lvi);
i++;
diff --git a/plugins/SeenPlugin/src/missed.cpp b/plugins/SeenPlugin/src/missed.cpp
index 5b1a2574cd..07f5c52fac 100644
--- a/plugins/SeenPlugin/src/missed.cpp
+++ b/plugins/SeenPlugin/src/missed.cpp
@@ -52,7 +52,7 @@ int ResetMissed(void)
int CheckIfOnline(void)
{
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
- if (CallService(MS_CLIST_GETCONTACTICON, hContact, 0) != ICON_OFFLINE)
+ if (pcli->pfnGetContactIcon(hContact) != ICON_OFFLINE)
db_set_b(hContact, S_MOD, "Missed", 2);
return 0;
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 07c327fa0a..f1263a92aa 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -182,7 +182,7 @@ INT_PTR CALLBACK SaveSessionDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM l
SetWindowPos(hdlg, NULL, rWnd.left, rWnd.top, x + dx, y + (dx / 3), SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE);
SetWindowPos(hClistControl, 0, x - dd, dd, dx - dd, y + (dx / 12), SWP_NOZORDER/*|SWP_NOSIZE|SWP_SHOWWINDOW*/);
- SendMessage(hClistControl, WM_TIMER, TIMERID_REBUILDAFTER, 0);
+ SendMessage(hClistControl, CLM_AUTOREBUILD, 0, 0);
for (i = 0; session_list[i] > 0; i++) {
hItem = (HANDLE)SendMessage(hClistControl, CLM_FINDCONTACT, (WPARAM)session_list[i], 0);
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp
index cb71969c54..4825450c9e 100644
--- a/plugins/Sessions/Src/Options.cpp
+++ b/plugins/Sessions/Src/Options.cpp
@@ -341,9 +341,8 @@ static INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM l
SetWindowLongPtr(hOpClistControl, GWL_STYLE,
GetWindowLongPtr(hOpClistControl, GWL_STYLE) | CLS_CHECKBOXES | CLS_HIDEEMPTYGROUPS | CLS_USEGROUPS | CLS_GREYALTERNATE | CLS_GROUPCHECKBOXES);
SendMessage(hOpClistControl, CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP | CLS_EX_TRACKSELECT, 0);
-
- SendMessage(hOpClistControl, WM_TIMER, TIMERID_REBUILDAFTER, 0);
-
+ SendMessage(hOpClistControl, CLM_AUTOREBUILD, 0, 0);
+
for (int i = 0; session_list_t[i] > 0; i++) {
HANDLE hItem = (HANDLE)SendMessage(hOpClistControl, CLM_FINDCONTACT, (WPARAM)session_list_t[i], 0);
SendMessage(hOpClistControl, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp
index 045c189e44..a7cdf9ed0f 100644
--- a/plugins/StopSpamPlus/src/events.cpp
+++ b/plugins/StopSpamPlus/src/events.cpp
@@ -2,6 +2,7 @@
MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam)
{
+ UNREFERENCED_PARAMETER(wParam);
MEVENT hDbEvent = (MEVENT)lParam;
DBEVENTINFO dbei = { 0 };
@@ -163,6 +164,8 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
MIRANDA_HOOK_EVENT(ME_OPT_INITIALISE, w, l)
{
+ UNREFERENCED_PARAMETER(l);
+
OPTIONSDIALOGPAGE odp = { 0 };
odp.pszGroup = LPGEN("Message sessions");
odp.pszTitle = pluginName;
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp
index 55c00e03bc..0d57b32c73 100644
--- a/plugins/TipperYM/src/popwin.cpp
+++ b/plugins/TipperYM/src/popwin.cpp
@@ -300,7 +300,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
pwd->iIndent = opt.iTextIndent;
pwd->iSidebarWidth = opt.iSidebarWidth;
pwd->hContact = (DWORD_PTR)pwd->clcit.hItem;
- pwd->iIconIndex = (int)CallService(MS_CLIST_GETCONTACTICON, pwd->hContact, 0);
+ pwd->iIconIndex = pcli->pfnGetContactIcon(pwd->hContact);
// don't use stored status message
if (!opt.bWaitForContent)
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp
index 246f7e6b45..556e2ca308 100644
--- a/src/mir_app/src/clc.cpp
+++ b/src/mir_app/src/clc.cpp
@@ -32,10 +32,9 @@ void UninitCustomMenus(void);
void MTG_OnmodulesLoad(void);
static bool bModuleInitialized = false;
-static MWindowList hClcWindowList;
static HANDLE hShowInfoTipEvent;
HANDLE hHideInfoTipEvent;
-static LIST<void> arEvents(10);
+MWindowList hClcWindowList;
int g_IconWidth, g_IconHeight;
@@ -165,12 +164,6 @@ static int ClcContactDeleted(WPARAM wParam, LPARAM lParam)
return 0;
}
-static int ClcContactIconChanged(WPARAM wParam, LPARAM lParam)
-{
- WindowList_BroadcastAsync(hClcWindowList, INTM_ICONCHANGED, wParam, lParam);
- return 0;
-}
-
static int ClcIconsChanged(WPARAM, LPARAM)
{
WindowList_BroadcastAsync(hClcWindowList, INTM_INVALIDATE, 0, 0);
@@ -191,7 +184,6 @@ static INT_PTR GetInfoTipHoverTime(WPARAM, LPARAM)
static void SortClcByTimer(HWND hwnd)
{
- KillTimer(hwnd, TIMERID_DELAYEDRESORTCLC);
SetTimer(hwnd, TIMERID_DELAYEDRESORTCLC, 200, NULL);
}
@@ -210,14 +202,13 @@ int LoadCLCModule(void)
InitFileDropping();
- arEvents.insert(HookEvent(ME_SYSTEM_MODULESLOADED, ClcModulesLoaded));
- arEvents.insert(HookEvent(ME_PROTO_ACCLISTCHANGED, ClcAccountsChanged));
- arEvents.insert(HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ClcSettingChanged));
- arEvents.insert(HookEvent(ME_DB_CONTACT_ADDED, ClcContactAdded));
- arEvents.insert(HookEvent(ME_DB_CONTACT_DELETED, ClcContactDeleted));
- arEvents.insert(HookEvent(ME_CLIST_CONTACTICONCHANGED, ClcContactIconChanged));
- arEvents.insert(HookEvent(ME_SKIN_ICONSCHANGED, ClcIconsChanged));
- arEvents.insert(HookEvent(ME_PROTO_ACK, ClcProtoAck));
+ HookEvent(ME_SYSTEM_MODULESLOADED, ClcModulesLoaded);
+ HookEvent(ME_PROTO_ACCLISTCHANGED, ClcAccountsChanged);
+ HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ClcSettingChanged);
+ HookEvent(ME_DB_CONTACT_ADDED, ClcContactAdded);
+ HookEvent(ME_DB_CONTACT_DELETED, ClcContactDeleted);
+ HookEvent(ME_SKIN_ICONSCHANGED, ClcIconsChanged);
+ HookEvent(ME_PROTO_ACK, ClcProtoAck);
InitCustomMenus();
return 0;
@@ -228,9 +219,6 @@ void UnloadClcModule()
if (!bModuleInitialized)
return;
- for (int i = 0; i < arEvents.getCount(); i++)
- UnhookEvent(arEvents[i]);
-
mir_free(cli.clcProto);
WindowList_Destroy(hClcWindowList); hClcWindowList = NULL;
@@ -461,7 +449,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
// this means an offline msg is flashing, so the contact should be shown
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
int shouldShow = (style & CLS_SHOWHIDDEN || !db_get_b(wParam, "CList", "Hidden", 0))
- && (!cli.pfnIsHiddenMode(dat, status) || CallService(MS_CLIST_GETCONTACTICON, wParam, 0) != lParam);
+ && (!cli.pfnIsHiddenMode(dat, status) || cli.pfnGetContactIcon(wParam) != lParam);
contact = NULL;
group = NULL;
@@ -841,6 +829,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
KillTimer(hwnd, TIMERID_REBUILDAFTER);
cli.pfnInvalidateRect(hwnd, NULL, FALSE);
cli.pfnSaveStateAndRebuildList(hwnd, dat);
+ cli.bAutoRebuild = false;
break;
case TIMERID_DELAYEDRESORTCLC:
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h
index bebef650b7..3d41d0931b 100644
--- a/src/mir_app/src/clc.h
+++ b/src/mir_app/src/clc.h
@@ -36,6 +36,8 @@ struct ClcCacheEntry : public ClcCacheEntryBase
/* clc.c */
extern int g_IconWidth, g_IconHeight;
+extern MWindowList hClcWindowList;
+extern HIMAGELIST hCListImages;
void fnClcOptionsChanged(void);
void fnClcBroadcast(int msg, WPARAM wParam, LPARAM lParam);
@@ -183,7 +185,7 @@ void fnCluiProtocolStatusChanged(int, const char*);
void fnDrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, HICON eventIcon);
/* contact.c */
-void fnChangeContactIcon(MCONTACT hContact, int iIcon, int add);
+void fnChangeContactIcon(MCONTACT hContact, int iIcon);
void fnLoadContactTree(void);
int fnSetHideOffline(WPARAM wParam, LPARAM lParam);
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp
index 9f249e3d30..15b9f41bfc 100644
--- a/src/mir_app/src/clcitems.cpp
+++ b/src/mir_app/src/clcitems.cpp
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
#include "clc.h"
-//routines for managing adding/removal of items in the list, including sorting
+// routines for managing adding/removal of items in the list, including sorting
int fnAddItemToGroup(ClcGroup *group, int iAboveItem)
{
@@ -188,7 +188,7 @@ int fnAddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact)
i = cli.pfnAddItemToGroup(group, index + 1);
char *szProto = GetContactProto(hContact);
group->cl.items[i]->type = CLCIT_CONTACT;
- group->cl.items[i]->iImage = CallService(MS_CLIST_GETCONTACTICON, hContact, 0);
+ group->cl.items[i]->iImage = cli.pfnGetContactIcon(hContact);
group->cl.items[i]->hContact = hContact;
group->cl.items[i]->proto = szProto;
if (szProto != NULL && !cli.pfnIsHiddenMode(dat, db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)))
diff --git a/src/mir_app/src/clcmsgs.cpp b/src/mir_app/src/clcmsgs.cpp
index 80d3e47f19..04cadc8fb1 100644
--- a/src/mir_app/src/clcmsgs.cpp
+++ b/src/mir_app/src/clcmsgs.cpp
@@ -75,9 +75,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR
}
case CLM_AUTOREBUILD:
- KillTimer(hwnd, TIMERID_REBUILDAFTER);
- cli.pfnSaveStateAndRebuildList(hwnd, dat);
- cli.bAutoRebuild = false;
+ SetTimer(hwnd, TIMERID_REBUILDAFTER, 50, 0);
break;
case CLM_DELETEITEM:
diff --git a/src/mir_app/src/clistevents.cpp b/src/mir_app/src/clistevents.cpp
index 65985d8ed1..bf38e584ec 100644
--- a/src/mir_app/src/clistevents.cpp
+++ b/src/mir_app/src/clistevents.cpp
@@ -33,8 +33,6 @@ struct CListImlIcon
static struct CListImlIcon *imlIcon;
static int imlIconCount;
-extern HIMAGELIST hCListImages;
-
static UINT_PTR flashTimerId;
static int iconsOn;
static int disableTrayFlash;
@@ -116,7 +114,7 @@ static VOID CALLBACK IconFlashTimer(HWND, UINT, UINT_PTR idEvent, DWORD)
if (g_cliEvents[j].hContact == g_cliEvents[i].hContact)
break;
if (j >= i)
- cli.pfnChangeContactIcon(g_cliEvents[i].hContact, iconsOn || disableIconFlash ? g_cliEvents[i].imlIconIndex : 0, 0);
+ cli.pfnChangeContactIcon(g_cliEvents[i].hContact, iconsOn || disableIconFlash ? g_cliEvents[i].imlIconIndex : 0);
// decrease eflashes in any case - no need to collect all events
if (g_cliEvents[i].flags & CLEF_ONLYAFEW)
@@ -169,7 +167,7 @@ CListEvent* fnAddEvent(CLISTEVENT *cle)
flashTimerId = SetTimer(NULL, 0, db_get_w(NULL, "CList", "IconFlashTime", 550), IconFlashTimer);
cli.pfnTrayIconUpdateWithImageList(p->imlIconIndex, p->ptszTooltip, szProto);
}
- cli.pfnChangeContactIcon(cle->hContact, p->imlIconIndex, 1);
+ cli.pfnChangeContactIcon(cle->hContact, p->imlIconIndex);
return p;
}
@@ -191,8 +189,7 @@ int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent)
// Update contact's icon
char *szProto = GetContactProto(hContact);
- cli.pfnChangeContactIcon(g_cliEvents[i].hContact,
- CallService(MS_CLIST_GETCONTACTICON, (WPARAM)g_cliEvents[i].hContact, 1), 0);
+ cli.pfnChangeContactIcon(g_cliEvents[i].hContact, cli.pfnGetContactIcon(g_cliEvents[i].hContact));
// Free any memory allocated to the event
g_cliEvents.remove(i);
diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp
index ce2516b70c..6ccdeb7e14 100644
--- a/src/mir_app/src/clistmod.cpp
+++ b/src/mir_app/src/clistmod.cpp
@@ -165,11 +165,6 @@ int fnGetContactIcon(MCONTACT hContact)
szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact);
}
-static INT_PTR GetContactIcon(WPARAM wParam, LPARAM)
-{
- return cli.pfnGetContactIcon(wParam);
-}
-
static void AddProtoIconIndex(PROTOACCOUNT *pa)
{
ProtoIconIndex *pii = new ProtoIconIndex;
@@ -394,6 +389,13 @@ int fnShowHide(WPARAM, LPARAM)
return 0;
}
+void fnChangeContactIcon(MCONTACT hContact, int iIcon)
+{
+ WindowList_BroadcastAsync(hClcWindowList, INTM_ICONCHANGED, hContact, iIcon);
+
+ NotifyEventHooks(hContactIconChangedEvent, hContact, iIcon);
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
static INT_PTR CompareContacts(WPARAM wParam, LPARAM lParam)
@@ -437,7 +439,6 @@ int LoadContactListModule2(void)
CreateServiceFunction(MS_CLIST_DOCKINGPROCESSMESSAGE, Docking_ProcessWindowMessageStub);
CreateServiceFunction(MS_CLIST_DOCKINGISDOCKED, Docking_IsDocked);
CreateServiceFunction(MS_CLIST_HOTKEYSPROCESSMESSAGE, HotkeysProcessMessageStub);
- CreateServiceFunction(MS_CLIST_GETCONTACTICON, GetContactIcon);
InitCListEvents();
InitGroupServices();
diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp
index 51fbb266d0..390e4d5f38 100644
--- a/src/mir_app/src/clistsettings.cpp
+++ b/src/mir_app/src/clistsettings.cpp
@@ -145,7 +145,7 @@ INT_PTR InvalidateDisplayName(WPARAM wParam, LPARAM)
int ContactAdded(WPARAM wParam, LPARAM)
{
- cli.pfnChangeContactIcon(wParam, cli.pfnIconFromStatusMode(GetContactProto(wParam), ID_STATUS_OFFLINE, NULL), 1);
+ cli.pfnChangeContactIcon(wParam, cli.pfnIconFromStatusMode(GetContactProto(wParam), ID_STATUS_OFFLINE, NULL));
return 0;
}
@@ -190,23 +190,14 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
cli.pfnCheckCacheItem(pdnce);
}
else if (!strcmp(cws->szSetting, "Status")) {
- if (!db_get_b(hContact, "CList", "Hidden", 0)) {
- if (db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) {
- // User's state is changing, and we are hideOffline-ing
- if (cws->value.wVal == ID_STATUS_OFFLINE) {
- cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact), 0);
- return 0;
- }
- cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact), 1);
- }
- cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact), 0);
- }
+ if (!db_get_b(hContact, "CList", "Hidden", 0))
+ cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact));
}
}
else if (!strcmp(cws->szModule, "CList")) {
if (!strcmp(cws->szSetting, "Hidden")) {
if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0)
- cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact), 1);
+ cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact));
}
else if (!strcmp(cws->szSetting, "MyHandle")) {
ClcCacheEntry *pdnce = cli.pfnGetCacheEntry(hContact);
@@ -225,7 +216,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
else
szProto = cws->value.pszVal;
cli.pfnChangeContactIcon(hContact,
- cli.pfnIconFromStatusMode(szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact), 0);
+ cli.pfnIconFromStatusMode(szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact));
}
}
return 0;
diff --git a/src/mir_app/src/contact.cpp b/src/mir_app/src/contact.cpp
index 76466126db..d86c8b8127 100644
--- a/src/mir_app/src/contact.cpp
+++ b/src/mir_app/src/contact.cpp
@@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
#include "clc.h"
-extern HANDLE hContactIconChangedEvent;
extern HANDLE hGroupChangeEvent;
static int GetContactStatus(MCONTACT hContact)
@@ -36,11 +35,6 @@ static int GetContactStatus(MCONTACT hContact)
return db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
}
-void fnChangeContactIcon(MCONTACT hContact, int iIcon, int)
-{
- NotifyEventHooks(hContactIconChangedEvent, hContact, iIcon);
-}
-
void fnLoadContactTree(void)
{
CallService(MS_CLUI_LISTBEGINREBUILD, 0, 0);
@@ -54,7 +48,7 @@ void fnLoadContactTree(void)
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
int status = GetContactStatus(hContact);
if ((!hideOffline || status != ID_STATUS_OFFLINE) && !db_get_b(hContact, "CList", "Hidden", 0))
- cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(GetContactProto(hContact), status, hContact), 1);
+ cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(GetContactProto(hContact), status, hContact));
}
CallService(MS_CLUI_LISTENDREBUILD, 0, 0);
}
diff --git a/src/mir_app/src/meta_menu.cpp b/src/mir_app/src/meta_menu.cpp
index 3c7228a30b..7c6cf58832 100644
--- a/src/mir_app/src/meta_menu.cpp
+++ b/src/mir_app/src/meta_menu.cpp
@@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "stdafx.h"
+#include "clc.h"
#include <m_nudge.h>
#include "metacontacts.h"
@@ -281,8 +282,7 @@ int Meta_ModifyMenu(WPARAM hMeta, LPARAM)
}
else ptszName = cli.pfnGetContactDisplayName(hContact, 0);
- int iconIndex = CallService(MS_CLIST_GETCONTACTICON, hContact, 0);
- HICON hIcon = ImageList_GetIcon((HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0), iconIndex, 0);
+ HICON hIcon = ImageList_GetIcon(hCListImages, cli.pfnGetContactIcon(hContact), 0);
Menu_ModifyItem(hMenuContact[i], ptszName, hIcon, 0);
DestroyIcon(hIcon);