From 01ff549a2303122360f819c3344ff8a374839d82 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 19 Apr 2016 12:43:33 +0000 Subject: further junk cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@16717 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_clc.cpp | 13 ++----- plugins/Clist_modern/src/modern_clc.h | 1 - plugins/Clist_modern/src/modern_clistsettings.cpp | 26 +++---------- plugins/Clist_modern/src/modern_commonprototypes.h | 1 - plugins/Clist_modern/src/modern_defsettings.h | 1 - plugins/Clist_nicer/src/clc.cpp | 43 +++++++--------------- plugins/Clist_nicer/src/contact.cpp | 2 +- plugins/FavContacts/src/menu.cpp | 2 +- plugins/FloatingContacts/src/thumbs.cpp | 2 +- plugins/NewAwaySysMod/src/ContactList.cpp | 2 +- plugins/QuickContacts/src/quickcontacts.cpp | 5 +-- plugins/QuickSearch/sr_window.pas | 2 +- plugins/RecentContacts/src/RecentContacts.cpp | 2 +- plugins/SeenPlugin/src/missed.cpp | 2 +- plugins/Sessions/Src/Main.cpp | 2 +- plugins/Sessions/Src/Options.cpp | 5 +-- plugins/StopSpamPlus/src/events.cpp | 3 ++ plugins/TipperYM/src/popwin.cpp | 2 +- 18 files changed, 38 insertions(+), 78 deletions(-) (limited to 'plugins') 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) -- cgit v1.2.3