diff options
author | George Hazan <george.hazan@gmail.com> | 2013-12-22 16:20:05 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-12-22 16:20:05 +0000 |
commit | f98e2216f98a31dbb0f77b97249aaaee75b345ed (patch) | |
tree | fa1033da7ca1b02a5238c958cfa6fb5da22ef2c4 /src/modules | |
parent | 87cbc0b769f26286166201018c9e0e357c5caa66 (diff) |
massive garbage removal from extra icons module
git-svn-id: http://svn.miranda-ng.org/main/trunk@7340 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/clist/clcitems.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/clui.cpp | 4 | ||||
-rw-r--r-- | src/modules/extraicons/extraicons.cpp | 4 | ||||
-rw-r--r-- | src/modules/extraicons/extraicons.h | 2 | ||||
-rw-r--r-- | src/modules/extraicons/options_ei.cpp | 3 |
5 files changed, 8 insertions, 7 deletions
diff --git a/src/modules/clist/clcitems.cpp b/src/modules/clist/clcitems.cpp index 139c7e6e70..02818eb71b 100644 --- a/src/modules/clist/clcitems.cpp +++ b/src/modules/clist/clcitems.cpp @@ -422,7 +422,7 @@ void fnRebuildEntireList(HWND hwnd, struct ClcData *dat) }
cli.pfnSortCLC(hwnd, dat, 0);
- cli.pfnSetAllExtraIcons(cli.hwndContactTree, 0);
+ cli.pfnSetAllExtraIcons(0);
}
int fnGetGroupContentsCount(ClcGroup *group, int visibleOnly)
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index 2f98c3c7d1..0e0ef05e14 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -814,11 +814,11 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case CLN_NEWCONTACT:
if (nmc != NULL)
- cli.pfnSetAllExtraIcons(cli.hwndContactTree, nmc->hItem);
+ cli.pfnSetAllExtraIcons(nmc->hItem);
return TRUE;
case CLN_LISTREBUILT:
- cli.pfnSetAllExtraIcons(cli.hwndContactTree, 0);
+ cli.pfnSetAllExtraIcons(NULL);
return(FALSE);
case NM_KEYDOWN:
diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp index 745083590b..4b7876b79c 100644 --- a/src/modules/extraicons/extraicons.cpp +++ b/src/modules/extraicons/extraicons.cpp @@ -320,7 +320,7 @@ void fnReloadExtraIcons() bImageCreated = true;
}
-void fnSetAllExtraIcons(HWND hwndList, HANDLE hContact)
+void fnSetAllExtraIcons(HANDLE hContact)
{
if (cli.hwndContactTree == 0)
return;
@@ -347,7 +347,7 @@ void fnSetAllExtraIcons(HWND hwndList, HANDLE hContact) }
g_mutex_bSetAllExtraIconsCycle = 0;
- cli.pfnInvalidateRect(hwndList, NULL, FALSE);
+ cli.pfnInvalidateRect(cli.hwndContactTree, NULL, FALSE);
Sleep(0);
}
diff --git a/src/modules/extraicons/extraicons.h b/src/modules/extraicons/extraicons.h index b8c346b9f2..c24483def5 100644 --- a/src/modules/extraicons/extraicons.h +++ b/src/modules/extraicons/extraicons.h @@ -48,7 +48,7 @@ void DefaultExtraIcons_Load(); HANDLE ExtraIcon_Add(HICON hIcon);
void fnReloadExtraIcons();
-void fnSetAllExtraIcons(HWND hwndList,HANDLE hContact);
+void fnSetAllExtraIcons(HANDLE hContact);
static inline BOOL IsEmpty(const char *str)
{
diff --git a/src/modules/extraicons/options_ei.cpp b/src/modules/extraicons/options_ei.cpp index e5893ecc9c..a7ce5cb64e 100644 --- a/src/modules/extraicons/options_ei.cpp +++ b/src/modules/extraicons/options_ei.cpp @@ -571,7 +571,8 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (oldSlots[((BaseExtraIcon *) extra)->getID() - 1] == extra->getSlot())
continue;
- extra->applyIcons();
+ if (extra->isEnabled())
+ extra->applyIcons();
}
delete[] oldSlots;
|