diff options
Diffstat (limited to 'plugins/Popup/src/opt_contacts.cpp')
-rw-r--r-- | plugins/Popup/src/opt_contacts.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/plugins/Popup/src/opt_contacts.cpp b/plugins/Popup/src/opt_contacts.cpp index 59532d3325..31041c357a 100644 --- a/plugins/Popup/src/opt_contacts.cpp +++ b/plugins/Popup/src/opt_contacts.cpp @@ -2,9 +2,9 @@ Popup Plus plugin for Miranda IM
Copyright © 2002 Luca Santarelli,
- © 2004-2007 Victor Pavlychko
- © 2010 MPK
- © 2010 Merlin_de
+© 2004-2007 Victor Pavlychko
+© 2010 MPK
+© 2010 Merlin_de
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -46,17 +46,17 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM, LPARAM lParam) case WM_INITDIALOG:
TranslateDialogDefault(hwnd);
- SendDlgItemMessage(hwnd, IDC_ICO_AUTO, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_DEF,0), 0);
- SendDlgItemMessage(hwnd, IDC_ICO_FAVORITE, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_FAV,0), 0);
- SendDlgItemMessage(hwnd, IDC_ICO_FULLSCREEN, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_FULLSCREEN,0), 0);
- SendDlgItemMessage(hwnd, IDC_ICO_BLOCK, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_BLOCK,0), 0);
+ SendDlgItemMessage(hwnd, IDC_ICO_AUTO, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_DEF, 0), 0);
+ SendDlgItemMessage(hwnd, IDC_ICO_FAVORITE, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_FAV, 0), 0);
+ SendDlgItemMessage(hwnd, IDC_ICO_FULLSCREEN, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_FULLSCREEN, 0), 0);
+ SendDlgItemMessage(hwnd, IDC_ICO_BLOCK, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_BLOCK, 0), 0);
{
HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 5, 5);
ImageList_AddIcon(hIml, LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT));
- ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_DEF,0));
- ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_FAV,0));
- ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_FULLSCREEN,0));
- ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_BLOCK,0));
+ ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_DEF, 0));
+ ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_FAV, 0));
+ ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_FULLSCREEN, 0));
+ ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_BLOCK, 0));
SendDlgItemMessage(hwnd, IDC_LIST, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)hIml);
SendDlgItemMessage(hwnd, IDC_LIST, CLM_SETEXTRACOLUMNS, 4 /*SIZEOF(sttIcons)*/, 0);
sttResetListOptions(GetDlgItem(hwnd, IDC_LIST));
@@ -65,31 +65,31 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM, LPARAM lParam) break;
case WM_NOTIFY:
- switch(((LPNMHDR)lParam)->idFrom) {
+ switch (((LPNMHDR)lParam)->idFrom) {
case IDC_LIST:
switch (((LPNMHDR)lParam)->code) {
case CLN_NEWCONTACT:
case CLN_LISTREBUILT:
- sttSetAllContactIcons(GetDlgItem(hwnd,IDC_LIST));
+ sttSetAllContactIcons(GetDlgItem(hwnd, IDC_LIST));
break;
case CLN_OPTIONSCHANGED:
- sttResetListOptions(GetDlgItem(hwnd,IDC_LIST));
+ sttResetListOptions(GetDlgItem(hwnd, IDC_LIST));
break;
case NM_CLICK:
- NMCLISTCONTROL *nm=(NMCLISTCONTROL*)lParam;
- if (nm->iColumn==-1) break;
+ NMCLISTCONTROL *nm = (NMCLISTCONTROL*)lParam;
+ if (nm->iColumn == -1) break;
DWORD hitFlags;
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwnd,IDC_LIST,CLM_HITTEST,(WPARAM)&hitFlags,MAKELPARAM(nm->pt.x,nm->pt.y));
- if (hItem==NULL) break;
+ HANDLE hItem = (HANDLE)SendDlgItemMessage(hwnd, IDC_LIST, CLM_HITTEST, (WPARAM)&hitFlags, MAKELPARAM(nm->pt.x, nm->pt.y));
+ if (hItem == NULL) break;
if (!(hitFlags&CLCHT_ONITEMEXTRA)) break;
- int iImage = SendDlgItemMessage(hwnd,IDC_LIST,CLM_GETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(nm->iColumn,0));
+ int iImage = SendDlgItemMessage(hwnd, IDC_LIST, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(nm->iColumn, 0));
if (iImage != EMPTY_EXTRA_ICON) {
- for (int i=0; i < 4 /*SIZEOF(sttIcons)*/; ++i)
+ for (int i = 0; i < 4 /*SIZEOF(sttIcons)*/; ++i)
// hIml element [0] = SKINICON_OTHER_SMALLDOT
- // hIml element [1..5] = IcoLib_GetIcon(....) ~ old sttIcons
- SendDlgItemMessage(hwnd, IDC_LIST, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(i, (i==nm->iColumn)?i+1:0));
+ // hIml element [1..5] = IcoLib_GetIcon(....) ~ old sttIcons
+ SendDlgItemMessage(hwnd, IDC_LIST, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(i, (i == nm->iColumn) ? i + 1 : 0));
}
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
}
@@ -101,8 +101,8 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM, LPARAM lParam) HWND hwndList = GetDlgItem(hwnd, IDC_LIST);
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
- for (int i=0; i < 4 /*SIZEOF(sttIcons)*/; ++i) {
- if (SendMessage(hwndList,CLM_GETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(i,0))) {
+ for (int i = 0; i < 4 /*SIZEOF(sttIcons)*/; ++i) {
+ if (SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(i, 0))) {
db_set_b(hContact, MODULNAME, "ShowMode", i);
break;
}
|