diff options
26 files changed, 29 insertions, 254 deletions
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index cceb8098a7..e322532f7b 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -2352,7 +2352,6 @@ void HistoryWindow::SelectContact(MCONTACT _hContact) void ResetCList(HWND hWnd)
{
COLORREF bkCLColor = Options::instance->GetColor(Options::ContactListBackground);
- SendDlgItemMessage(hWnd, IDC_LIST_CONTACTS, CLM_SETBKBITMAP, 0, (LPARAM)(HBITMAP) NULL);
SendDlgItemMessage(hWnd, IDC_LIST_CONTACTS, CLM_SETBKCOLOR, bkCLColor, 0);
SendDlgItemMessage(hWnd, IDC_LIST_CONTACTS, CLM_SETUSEGROUPS, Options::instance->showContactGroups, 0);
}
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index b7456985a6..1036f9945b 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -1556,17 +1556,6 @@ INT_PTR CALLBACK Options::DlgProcOptsScheduler(HWND hwndDlg, UINT msg, WPARAM wP return FALSE;
}
-void ResetListOptions(HWND hwnd)
-{
- SendMessage(hwnd, CLM_SETGREYOUTFLAGS, 0, 0);
- SendMessage(hwnd, CLM_SETLEFTMARGIN, 2, 0);
- SendMessage(hwnd, CLM_SETBKBITMAP, 0, (LPARAM)(HBITMAP) NULL);
- SendMessage(hwnd, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
- SendMessage(hwnd, CLM_SETINDENT, 10, 0);
- for (int i = 0; i <= FONTID_MAX; i++)
- SendMessage(hwnd, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
-}
-
void RebuildList(HWND hwnd, MCONTACT hSystem, TaskOptions* to)
{
HANDLE hItem;
@@ -1739,7 +1728,6 @@ INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, cii.pszText = TranslateT("System");
hSystem = (MCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
SendMessage(contactList, CLM_AUTOREBUILD, 0, 0);
- ResetListOptions(contactList);
RebuildList(contactList, hSystem, to);
SendMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDC_TASK_TYPE, CBN_SELCHANGE), NULL);
@@ -1928,13 +1916,6 @@ INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, }
}
return TRUE;
-
- case WM_NOTIFY:
- NMHDR* nmhdr = (NMHDR *) lParam;
- if (nmhdr->idFrom == IDC_LIST_CONTACTSEX && nmhdr->code == CLN_OPTIONSCHANGED)
- ResetListOptions(hwndDlg);
-
- return TRUE;
}
return FALSE;
diff --git a/plugins/Clist_nicer/src/Include/clc.h b/plugins/Clist_nicer/src/Include/clc.h index 4c78d3ab42..9294481495 100644 --- a/plugins/Clist_nicer/src/Include/clc.h +++ b/plugins/Clist_nicer/src/Include/clc.h @@ -439,7 +439,6 @@ void ReloadSkinItemsToCache(); //clcopts.c
int ClcOptInit(WPARAM wParam, LPARAM lParam);
-DWORD GetDefaultExStyle(void);
void GetFontSetting(int i, LOGFONTA *lf, COLORREF *colour);
void CluiProtocolStatusChanged( int parStatus, const char* szProto );
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index 461910b721..91a32f2a1a 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -160,25 +160,6 @@ int TSendContactsData::SendContacts(HWND hwndDlg) /* Send Dialog Implementation */
-static void ResetListOptions(HWND hwndList)
-{
- COLORREF bgColour, fgColour;
-
- SendMessage(hwndList, CLM_SETBKBITMAP, 0, (LPARAM)(HBITMAP)NULL);
- bgColour = GetSysColor(COLOR_WINDOW);
- SendMessage(hwndList, CLM_SETBKCOLOR, bgColour, 0);
- SendMessage(hwndList, CLM_SETGREYOUTFLAGS, 0, 0);
- SendMessage(hwndList, CLM_SETLEFTMARGIN, 4, 0);
- SendMessage(hwndList, CLM_SETINDENT, 10, 0);
- for (int i = 0; i <= FONTID_MAX; i++) {
- fgColour = (COLORREF)SendMessage(hwndList, CLM_GETTEXTCOLOR, i, 0);
- if (abs(GetRValue(fgColour) - GetRValue(bgColour)) < 10 &&
- abs(GetGValue(fgColour) - GetGValue(bgColour)) < 10 &&
- abs(GetBValue(fgColour) - GetBValue(bgColour)) < 10)
- SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
- }
-}
-
static MCONTACT FindNextClistContact(HWND hList, MCONTACT hContact, MCONTACT *phItem)
{
MCONTACT hNextContact = db_find_next(hContact);
@@ -250,7 +231,6 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(IDI_CONTACTS)));
- ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST));
SetAllContactChecks(GetDlgItem(hwndDlg, IDC_LIST), lParam);
WindowList_Add(ghSendWindowList, hwndDlg, lParam);
wndData = new TSendContactsData(lParam);
@@ -275,9 +255,6 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara case CLN_NEWCONTACT:
case CLN_LISTREBUILT: // rebuild list
if (wndData) SetAllContactChecks(GetDlgItem(hwndDlg, IDC_LIST), wndData->hContact);
- case CLN_OPTIONSCHANGED:
- ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST));
- break;
}
}
break;
diff --git a/plugins/FavContacts/src/options.cpp b/plugins/FavContacts/src/options.cpp index 2afb2e1ae8..4824d54eb8 100644 --- a/plugins/FavContacts/src/options.cpp +++ b/plugins/FavContacts/src/options.cpp @@ -56,15 +56,8 @@ static void sttSaveOptions() 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, 10, 0);
SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, 1, 0);
SendMessage(hwndList, CLM_SETHIDEOFFLINEROOT, 1, 0);
- for (int i = 0; i <= FONTID_MAX; ++i)
- SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
}
static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/HistoryStats/src/dlgoption_subexclude.cpp b/plugins/HistoryStats/src/dlgoption_subexclude.cpp index dd031b2c4f..ae81f88bec 100644 --- a/plugins/HistoryStats/src/dlgoption_subexclude.cpp +++ b/plugins/HistoryStats/src/dlgoption_subexclude.cpp @@ -194,15 +194,6 @@ void DlgOption::SubExclude::saveSettings() void DlgOption::SubExclude::customizeList(HWND hCList)
{
- SendMessage(hCList, CLM_SETBKBITMAP, 0, NULL);
- SendMessage(hCList, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
- SendMessage(hCList, CLM_SETGREYOUTFLAGS, 0, 0);
- SendMessage(hCList, CLM_SETLEFTMARGIN, 2, 0);
- SendMessage(hCList, CLM_SETINDENT, 10, 0);
-
- for (int i = 0; i <= FONTID_MAX; ++i)
- SendMessage(hCList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
-
SetWindowLongPtr(hCList, GWL_STYLE, GetWindowLongPtr(hCList, GWL_STYLE) | CLS_SHOWHIDDEN);
}
diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp index 0877d70d48..3c93437366 100644 --- a/plugins/HistorySweeperLight/src/options.cpp +++ b/plugins/HistorySweeperLight/src/options.cpp @@ -86,20 +86,6 @@ void ReleaseIconEx(const char* name) HANDLE hAllContacts, hSystemHistory;
-void ResetListOptions(HWND hwndList)
-{
- int i;
-
- SendMessage(hwndList, CLM_SETBKBITMAP, 0, 0);
- SendMessage(hwndList, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
- SendMessage(hwndList, CLM_SETGREYOUTFLAGS, 0, 0);
- SendMessage(hwndList, CLM_SETLEFTMARGIN, 4, 0);
- SendMessage(hwndList, CLM_SETINDENT, 10, 0);
-
- for (i=0; i<=FONTID_MAX; i++)
- SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
-}
-
static void ShowAllContactIcons(HWND hwndList)
{
SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hAllContacts,
@@ -235,7 +221,6 @@ INT_PTR CALLBACK DlgProcHSOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_SETEXTRACOLUMNS, 1, 0);
TranslateDialogDefault(hwndDlg);
- ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST));
LoadSettings(hwndDlg);
}
return TRUE;
@@ -270,10 +255,6 @@ INT_PTR CALLBACK DlgProcHSOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa ShowAllContactIcons(nmc->hdr.hwndFrom);
break;
- case CLN_OPTIONSCHANGED:
- ResetListOptions(nmc->hdr.hwndFrom);
- break;
-
case NM_CLICK:
{
HANDLE hItem; DWORD hitFlags; int iImage;
diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp index 299481793b..6f97c61aa9 100644 --- a/plugins/KeyboardNotify/src/ignore.cpp +++ b/plugins/KeyboardNotify/src/ignore.cpp @@ -121,16 +121,7 @@ static void SetAllChildIcons(HWND hwndList, HANDLE hFirstItem, int iColumn, int static void ResetListOptions(HWND hwndList)
{
- int i;
-
- SendMessage(hwndList, CLM_SETBKBITMAP, 0, 0);
- SendMessage(hwndList, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
- SendMessage(hwndList, CLM_SETGREYOUTFLAGS, 0, 0);
- SendMessage(hwndList, CLM_SETLEFTMARGIN, 4, 0);
- SendMessage(hwndList, CLM_SETINDENT, 10, 0);
SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, 1, 0);
- for (i=0; i <= FONTID_MAX; i++)
- SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
}
static void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int iColumn, int iImage)
diff --git a/plugins/MirFox/src/MirandaOptions.cpp b/plugins/MirFox/src/MirandaOptions.cpp index c14edd8689..30595f53ea 100644 --- a/plugins/MirFox/src/MirandaOptions.cpp +++ b/plugins/MirFox/src/MirandaOptions.cpp @@ -302,32 +302,9 @@ static void setAllChildIcons(HWND hwndList, HANDLE hFirstItem, int iColumn, int /**
* set colors, margins, indents, styles etc of list
*/
-static void resetListOptions(HWND hwndList){
-
- //background image = null
- SendMessage(hwndList, CLM_SETBKBITMAP, 0, (LPARAM)(HBITMAP)NULL);
-
- //background color //TODO - colours
- SendMessage(hwndList, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
-
- //?
- SendMessage(hwndList, CLM_SETGREYOUTFLAGS, 0, 0);
-
- //left margin
- SendMessage(hwndList, CLM_SETLEFTMARGIN, 2, 0);
-
- //indent
- SendMessage(hwndList, CLM_SETINDENT, 10, 0);
-
- //font color //TODO - colours
- int i;
- for(i=0; i<=FONTID_MAX; i++){ // FONTID_MAX - miranda const
- SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
- }
-
- //?
+static void resetListOptions(HWND hwndList)
+{
SetWindowLongPtr(hwndList, GWL_STYLE, GetWindowLongPtr(hwndList,GWL_STYLE)|CLS_SHOWHIDDEN);
-
}
diff --git a/plugins/NewAwaySysMod/src/AwayOpt.cpp b/plugins/NewAwaySysMod/src/AwayOpt.cpp index 0e75d5a8be..4cc1ebff71 100644 --- a/plugins/NewAwaySysMod/src/AwayOpt.cpp +++ b/plugins/NewAwaySysMod/src/AwayOpt.cpp @@ -1100,6 +1100,7 @@ static LRESULT CALLBACK ContactsSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, INT_PTR CALLBACK ContactsOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
+ HWND hwndList = GetDlgItem(hwndDlg, IDC_CONTACTSDLG_LIST);
static HANDLE hItemAll, hItemUnknown;
switch (msg) {
@@ -1107,7 +1108,6 @@ INT_PTR CALLBACK ContactsOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP TranslateDialogDefault(hwndDlg);
{
MySetPos(hwndDlg);
- HWND hwndList = GetDlgItem(hwndDlg, IDC_CONTACTSDLG_LIST);
HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 5, 2);
ImageList_AddIcon(hIml, LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_DOT)));
ImageList_AddIcon(hIml, LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_IGNORE)));
@@ -1143,21 +1143,11 @@ INT_PTR CALLBACK ContactsOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break;
case UM_CONTACTSDLG_RESETLISTOPTIONS:
- {
- HWND hwndList = GetDlgItem(hwndDlg, IDC_CONTACTSDLG_LIST);
- SendMessage(hwndList, CLM_SETBKBITMAP, 0, 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, 10, 0);
- SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, 1, 0);
- for (int i = 0; i <= FONTID_MAX; i++)
- SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
- }
+ SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, 1, 0);
break;
case WM_SETFOCUS:
- SetFocus(GetDlgItem(hwndDlg, IDC_CONTACTSDLG_LIST));
+ SetFocus(hwndList);
break;
case WM_NOTIFY:
@@ -1166,10 +1156,10 @@ INT_PTR CALLBACK ContactsOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP switch (((LPNMHDR)lParam)->code) {
case CLN_NEWCONTACT:
case CLN_LISTREBUILT:
- SetAllContactIcons(GetDlgItem(hwndDlg, IDC_CONTACTSDLG_LIST), hItemUnknown);
+ SetAllContactIcons(hwndList, hItemUnknown);
// fall through
case CLN_CONTACTMOVED:
- SetListGroupIcons(GetDlgItem(hwndDlg, IDC_CONTACTSDLG_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CONTACTSDLG_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll);
+ SetListGroupIcons(hwndList, (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll);
break;
case CLN_OPTIONSCHANGED:
SendMessage(hwndDlg, UM_CONTACTSDLG_RESETLISTOPTIONS, 0, 0);
@@ -1179,7 +1169,6 @@ INT_PTR CALLBACK ContactsOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case NM_DBLCLK:
{
NMCLISTCONTROL *nm = (NMCLISTCONTROL*)lParam;
- HWND hwndList = GetDlgItem(hwndDlg, IDC_CONTACTSDLG_LIST);
if (nm->iColumn == -1)
break;
@@ -1213,19 +1202,19 @@ INT_PTR CALLBACK ContactsOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CONTACTSDLG_LIST, CLM_FINDCONTACT, hContact, 0);
+ HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0);
if (hItem)
- SaveItemState(GetDlgItem(hwndDlg, IDC_CONTACTSDLG_LIST), hContact, hItem);
+ SaveItemState(hwndList, hContact, hItem);
}
- SaveItemState(GetDlgItem(hwndDlg, IDC_CONTACTSDLG_LIST), INVALID_CONTACT_ID, hItemUnknown);
+ SaveItemState(hwndList, INVALID_CONTACT_ID, hItemUnknown);
return true;
}
}
break;
case WM_DESTROY:
- HIMAGELIST hIml = (HIMAGELIST)SendDlgItemMessage(hwndDlg, IDC_CONTACTSDLG_LIST, CLM_GETEXTRAIMAGELIST, 0, 0);
+ HIMAGELIST hIml = (HIMAGELIST)SendMessage(hwndList, CLM_GETEXTRAIMAGELIST, 0, 0);
_ASSERT(hIml);
ImageList_Destroy(hIml);
break;
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index f64b225988..b1776c9898 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -305,15 +305,6 @@ int UserInfoInitialise(WPARAM wParam, LPARAM lParam) void ResetListOptions(HWND hwndList)
{
- SendMessage(hwndList, CLM_SETBKBITMAP, 0, 0);
- SendMessage(hwndList, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
- SendMessage(hwndList, CLM_SETGREYOUTFLAGS, 0, 0);
- SendMessage(hwndList, CLM_SETLEFTMARGIN, 4, 0);
- SendMessage(hwndList, CLM_SETINDENT, 10, 0);
-
- for (int i = 0; i <= FONTID_MAX; i++)
- SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
-
SetWindowLongPtr(hwndList, GWL_STYLE, GetWindowLongPtr(hwndList,GWL_STYLE) | CLS_SHOWHIDDEN);
}
diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp index 26595cd1e6..d116fad726 100644 --- a/plugins/NoHistory/src/options.cpp +++ b/plugins/NoHistory/src/options.cpp @@ -72,13 +72,6 @@ static void SetAllChildIcons(HWND hwndList,HANDLE hFirstItem,int iColumn,int iIm static void ResetListOptions(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,2,0);
- SendMessage(hwndList,CLM_SETINDENT,10,0);
- for(int i=0; i <= FONTID_MAX; i++)
- SendMessage(hwndList,CLM_SETTEXTCOLOR,i,GetSysColor(COLOR_WINDOWTEXT));
SetWindowLongPtr(hwndList,GWL_STYLE,GetWindowLongPtr(hwndList,GWL_STYLE)|CLS_SHOWHIDDEN);
}
diff --git a/plugins/Popup/src/opt_contacts.cpp b/plugins/Popup/src/opt_contacts.cpp index 62648b97c3..6540d9e645 100644 --- a/plugins/Popup/src/opt_contacts.cpp +++ b/plugins/Popup/src/opt_contacts.cpp @@ -25,14 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 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)
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index cb6450c778..53d2703f72 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -825,13 +825,6 @@ static void ResetCList(HWND hwndDlg) else
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETBKBITMAP, 0, (LPARAM)(HBITMAP)NULL);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETINDENT, 10, 0);
- for (int i = 0; i <= FONTID_MAX; i++)
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
}
static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 290f68af5a..43b46f8818 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -1726,14 +1726,6 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP }
switch (((NMHDR*)lParam)->idFrom) {
- case IDC_CLIST:
- switch (((NMHDR*)lParam)->code) {
- case CLN_OPTIONSCHANGED:
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0);
- }
- break;
-
case IDC_LOG:
case IDC_MESSAGE:
switch (((NMHDR*)lParam)->code) {
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index a7ac5fad7b..fed530290a 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -806,13 +806,6 @@ static void ResetCList(HWND hwndDlg) else
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETBKBITMAP, 0, (LPARAM)(HBITMAP)NULL);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETINDENT, 10, 0);
- for (int i = 0; i <= FONTID_MAX; i++)
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
}
static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp index f3af41a20b..39d567c990 100644 --- a/plugins/Variables/src/help.cpp +++ b/plugins/Variables/src/help.cpp @@ -105,15 +105,7 @@ void ResetCList(HWND hwndDlg) else
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETBKBITMAP, 0, NULL);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETINDENT, 10, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
-
- for (int i = 0; i <= FONTID_MAX; i++)
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
}
static int clistDialogResize(HWND hwndDlg, LPARAM lParam, UTILRESIZECONTROL *urc)
diff --git a/plugins/WinterSpeak/src/DialogConfigActive.cpp b/plugins/WinterSpeak/src/DialogConfigActive.cpp index 471b0a944b..8ed0c17b20 100644 --- a/plugins/WinterSpeak/src/DialogConfigActive.cpp +++ b/plugins/WinterSpeak/src/DialogConfigActive.cpp @@ -102,7 +102,6 @@ void DialogConfigActive::notify(HWND hwndDlg, LPARAM lParam) { SetListGroupIcons( GetDlgItem(hwndDlg, IDC_ACTIVE_USERS), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_ACTIVE_USERS, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, NULL);
break;
case CLN_OPTIONSCHANGED:
-
ResetListOptions( GetDlgItem(hwndDlg, IDC_ACTIVE_USERS));
break;
case CLN_CHECKCHANGED:
@@ -268,16 +267,7 @@ void DialogConfigActive::SetAllContactIcons(HWND hwndList, HWND window) { }
void DialogConfigActive::ResetListOptions(HWND listview) {
- SendMessage(listview, CLM_SETBKBITMAP, 0, (LPARAM)(HBITMAP)NULL);
- SendMessage(listview, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
- SendMessage(listview, CLM_SETGREYOUTFLAGS, 0, 0);
- SendMessage(listview, CLM_SETLEFTMARGIN, 2, 0);
- SendMessage(listview, CLM_SETINDENT, 10, 0);
SendMessage(listview, CLM_SETHIDEEMPTYGROUPS, 1, 0);
-
- for (int i=0; i <= FONTID_MAX; i++)
- SendMessage(listview, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
-
SetWindowLongPtr(listview, GWL_STYLE, GetWindowLongPtr(listview, GWL_STYLE) | CLS_SHOWHIDDEN);
}
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index 7f7eb49ca1..97b3eea6a5 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -406,15 +406,7 @@ static MCONTACT gg_getsubcontact(GGPROTO* gg, MCONTACT hContact) static void gg_gc_resetclistopts(HWND hwndList)
{
- int i;
- SendMessage(hwndList, CLM_SETLEFTMARGIN, 2, 0);
- 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_SETINDENT, 10, 0);
SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, TRUE, 0);
- for (i = 0; i <= FONTID_MAX; i++)
- SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
}
static int gg_gc_countcheckmarks(HWND hwndList)
diff --git a/protocols/IcqOscarJ/src/icq_uploadui.cpp b/protocols/IcqOscarJ/src/icq_uploadui.cpp index 9947e794a0..652462d060 100644 --- a/protocols/IcqOscarJ/src/icq_uploadui.cpp +++ b/protocols/IcqOscarJ/src/icq_uploadui.cpp @@ -42,15 +42,6 @@ static int cbGroupIds = 0; // Init default clist options
static void ResetCListOptions(HWND hwndList)
{
- int i;
-
- 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, 2, 0);
- SendMessage(hwndList, CLM_SETINDENT, 10, 0);
- for(i=0; i<=FONTID_MAX; i++)
- SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
SetWindowLongPtr(hwndList, GWL_STYLE, GetWindowLongPtr(hwndList, GWL_STYLE)|CLS_SHOWHIDDEN);
if (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_HIDEEMPTYGROUPS) // hide empty groups
SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, (WPARAM) TRUE, 0);
diff --git a/protocols/MSN/src/msn_lists.cpp b/protocols/MSN/src/msn_lists.cpp index 2e2b181113..94c51a3a62 100644 --- a/protocols/MSN/src/msn_lists.cpp +++ b/protocols/MSN/src/msn_lists.cpp @@ -427,18 +427,6 @@ static void AddPrivacyListEntries(HWND hwndList, CMsnProto *proto) }
}
-static void ResetListOptions(HWND hwndList)
-{
- SendMessage(hwndList, CLM_SETBKBITMAP, 0, 0);
- SendMessage(hwndList, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
- SendMessage(hwndList, CLM_SETGREYOUTFLAGS, 0, 0);
- SendMessage(hwndList, CLM_SETLEFTMARGIN, 2, 0);
- SendMessage(hwndList, CLM_SETINDENT, 10, 0);
-
- for (int i=0; i<=FONTID_MAX; i++)
- SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
-}
-
static void SetContactIcons(MCONTACT hItem, HWND hwndList, CMsnProto* proto)
{
if (!proto->MSN_IsMyContact(hItem)) {
@@ -594,7 +582,6 @@ INT_PTR CALLBACK DlgProcMsnServLists(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SendMessage(hwndList, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)hIml);
SendMessage(hwndList, CLM_SETEXTRACOLUMNS, 5, 0);
- ResetListOptions(hwndList);
EnableWindow(hwndList, ((CMsnProto*)lParam)->msnLoggedIn);
}
return TRUE;
@@ -640,10 +627,6 @@ INT_PTR CALLBACK DlgProcMsnServLists(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SetAllContactIcons(NULL, nmc->hdr.hwndFrom, proto);
break;
- case CLN_OPTIONSCHANGED:
- ResetListOptions(nmc->hdr.hwndFrom);
- break;
-
case NM_CLICK:
HANDLE hItem;
DWORD hitFlags;
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index 5d687b3705..f40fa6e49b 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -422,14 +422,8 @@ static void ResetCList(HWND hwndDlg) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, (WPARAM)FALSE, 0);
else
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, (WPARAM)TRUE, 0);
+
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETBKBITMAP, 0, (LPARAM)(HBITMAP)NULL);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETINDENT, 10, 0);
- for (int i = 0; i <= FONTID_MAX; i++)
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
}
static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
diff --git a/src/modules/clist/clc.h b/src/modules/clist/clc.h index ba8bee42d2..35c3a4b004 100644 --- a/src/modules/clist/clc.h +++ b/src/modules/clist/clc.h @@ -106,7 +106,6 @@ int fnRowHitTest(struct ClcData *dat, int y); /* clcopts.c */
int ClcOptInit(WPARAM wParam, LPARAM lParam);
-DWORD GetDefaultExStyle(void);
void GetFontSetting(int i, LOGFONTA *lf, COLORREF *colour);
/* clistmenus.c */
diff --git a/src/modules/clist/clcutils.cpp b/src/modules/clist/clcutils.cpp index 87222c1ce1..50c2e45b0b 100644 --- a/src/modules/clist/clcutils.cpp +++ b/src/modules/clist/clcutils.cpp @@ -737,6 +737,22 @@ void fnLoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst) dat->quickSearchColour = db_get_dw(NULL, "CLC", "QuickSearchColour", CLCDEFAULT_QUICKSEARCHCOLOUR);
dat->useWindowsColours = db_get_b(NULL, "CLC", "UseWinColours", CLCDEFAULT_USEWINDOWSCOLOURS);
+ if (cli.hwndContactTree != NULL && hwnd != cli.hwndContactTree) {
+ dat->bkChanged = true; // block custom background
+ dat->bkColour = GetSysColor(COLOR_WINDOW);
+ if (dat->hBmpBackground) {
+ DeleteObject(dat->hBmpBackground);
+ dat->hBmpBackground = NULL;
+ }
+
+ dat->greyoutFlags = 0;
+ dat->leftMargin = 4;
+ dat->groupIndent = 10;
+
+ for (int i=0; i <= FONTID_MAX; i++)
+ dat->fontInfo[i].colour = GetSysColor(COLOR_WINDOWTEXT);
+ }
+
if (!dat->bkChanged) {
dat->bkColour = db_get_dw(NULL, "CLC", "BkColour", CLCDEFAULT_BKCOLOUR);
if (dat->hBmpBackground) {
diff --git a/src/modules/ignore/ignore.cpp b/src/modules/ignore/ignore.cpp index 23fca20224..ecd480cd46 100644 --- a/src/modules/ignore/ignore.cpp +++ b/src/modules/ignore/ignore.cpp @@ -110,15 +110,7 @@ static void SetAllChildIcons(HWND hwndList, HANDLE hFirstItem, int iColumn, int static void ResetListOptions(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, 10, 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 SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int iColumn, int iImage)
@@ -222,7 +214,7 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM SendDlgItemMessage(hwndDlg, IDC_ADDED, STM_SETICON, (WPARAM)hIcons[7], 0);
SendDlgItemMessage(hwndDlg, IDC_TYPINGICON, STM_SETICON, (WPARAM)hIcons[8], 0);
- ResetListOptions( GetDlgItem(hwndDlg, IDC_LIST));
+ ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST));
SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_SETEXTRACOLUMNS, IGNOREEVENT_MAX+2, 0);
{
CLCINFOITEM cii = { sizeof(cii) };
diff --git a/src/modules/visibility/visibility.cpp b/src/modules/visibility/visibility.cpp index 678b905fdc..fd61e25189 100644 --- a/src/modules/visibility/visibility.cpp +++ b/src/modules/visibility/visibility.cpp @@ -95,13 +95,6 @@ static void SetAllChildIcons(HWND hwndList, HANDLE hFirstItem, int iColumn, int static void ResetListOptions(HWND hwndList)
{
- SendMessage(hwndList, CLM_SETBKBITMAP, 0, 0);
- SendMessage(hwndList, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
- SendMessage(hwndList, CLM_SETGREYOUTFLAGS, 0, 0);
- SendMessage(hwndList, CLM_SETLEFTMARGIN, 2, 0);
- SendMessage(hwndList, CLM_SETINDENT, 10, 0);
- for (int i=0; i <= FONTID_MAX; i++)
- SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
SetWindowLongPtr(hwndList, GWL_STYLE, GetWindowLongPtr(hwndList, GWL_STYLE)|CLS_SHOWHIDDEN);
}
|