summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-07-26 18:39:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-07-26 18:39:48 +0000
commit3f00912895ae0820b4db9ae7081f5ffcba1b074c (patch)
treed9524551ee0fa19ffb93e7035de334962900dd40 /src/modules
parent535d64f23c465e90f0743108b247563dc2387af7 (diff)
stupid duplicated code of embedded clists removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@9953 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/clist/clc.h1
-rw-r--r--src/modules/clist/clcutils.cpp16
-rw-r--r--src/modules/ignore/ignore.cpp10
-rw-r--r--src/modules/visibility/visibility.cpp7
4 files changed, 17 insertions, 17 deletions
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);
}