diff options
author | George Hazan <george.hazan@gmail.com> | 2016-04-19 12:43:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-04-19 12:43:33 +0000 |
commit | 01ff549a2303122360f819c3344ff8a374839d82 (patch) | |
tree | 2241ad5b66087551f54a726894055d2e08a8763c /plugins/Clist_nicer/src | |
parent | 2201b08878bbf3f72c6e48ef82e4b80374f58c29 (diff) |
further junk cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@16717 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src')
-rw-r--r-- | plugins/Clist_nicer/src/clc.cpp | 43 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/contact.cpp | 2 |
2 files changed, 14 insertions, 31 deletions
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)
|