summaryrefslogtreecommitdiff
path: root/plugins/Popup
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-07-04 19:37:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-07-04 19:37:31 +0000
commit2da1f347012d15530482b2494e83ab0b8c785521 (patch)
tree58d36b9515d4d755a247961608af944566fd6dcd /plugins/Popup
parent21bfe50e8060a5cbede8eb8a79293618c276c05b (diff)
various code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@9678 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup')
-rw-r--r--plugins/Popup/src/opt_contacts.cpp49
1 files changed, 23 insertions, 26 deletions
diff --git a/plugins/Popup/src/opt_contacts.cpp b/plugins/Popup/src/opt_contacts.cpp
index 920c378d3a..62648b97c3 100644
--- a/plugins/Popup/src/opt_contacts.cpp
+++ b/plugins/Popup/src/opt_contacts.cpp
@@ -23,8 +23,29 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "headers.h"
-static void sttResetListOptions(HWND hwndList);
-static void sttSetAllContactIcons(HWND hwndList);
+static void sttResetListOptions(HWND hwndList)
+{
+ SendMessage(hwndList, CLM_SETBKBITMAP, 0, (LPARAM)(HBITMAP)NULL);
+ SendMessage(hwndList, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
+ SendMessage(hwndList, CLM_SETGREYOUTFLAGS, 0, 0);
+ SendMessage(hwndList, CLM_SETLEFTMARGIN, 4, 0);
+ SendMessage(hwndList, CLM_SETINDENT, 20, 0);
+ SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, 1, 0);
+ for (int i = 0; i <= FONTID_MAX; i++)
+ SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
+}
+
+static void sttSetAllContactIcons(HWND hwndList)
+{
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
+ DWORD dwMode = db_get_b(hContact, MODULNAME, "ShowMode", 0);
+ for (int i = 0; i < 4 /*SIZEOF(sttIcons)*/; ++i)
+ //hIml element [0] = SKINICON_OTHER_SMALLDOT
+ //hIml element [1..5] = IcoLib_GetIcon(....) ~ old sttIcons
+ SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(i, (dwMode == i) ? i + 1 : 0));
+ }
+}
INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -102,27 +123,3 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
return FALSE;
}
-
-static void sttResetListOptions(HWND hwndList)
-{
- SendMessage(hwndList,CLM_SETBKBITMAP,0,(LPARAM)(HBITMAP)NULL);
- SendMessage(hwndList,CLM_SETBKCOLOR,GetSysColor(COLOR_WINDOW),0);
- SendMessage(hwndList,CLM_SETGREYOUTFLAGS,0,0);
- SendMessage(hwndList,CLM_SETLEFTMARGIN,4,0);
- SendMessage(hwndList,CLM_SETINDENT,20,0);
- SendMessage(hwndList,CLM_SETHIDEEMPTYGROUPS,1,0);
- for(int i=0;i<=FONTID_MAX;i++)
- SendMessage(hwndList,CLM_SETTEXTCOLOR,i,GetSysColor(COLOR_WINDOWTEXT));
-}
-
-static void sttSetAllContactIcons(HWND hwndList)
-{
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
- DWORD dwMode = db_get_b(hContact, MODULNAME, "ShowMode", 0);
- for (int i=0; i < 4 /*SIZEOF(sttIcons)*/; ++i)
- //hIml element [0] = SKINICON_OTHER_SMALLDOT
- //hIml element [1..5] = IcoLib_GetIcon(....) ~ old sttIcons
- SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(i, (dwMode==i)?i+1:0));
- }
-}