From c594b68137f68116be052d19c1895945e5e50461 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 31 Oct 2013 18:53:36 +0000 Subject: tabSRMM: - corrected default for group chat filters; - fix for a little quirk in GUI git-svn-id: http://svn.miranda-ng.org/main/trunk@6724 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/chat/options.cpp | 22 +++++++++++----------- plugins/TabSRMM/src/controls.cpp | 7 ++++--- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index df3d6d1ab0..f75d16ac5e 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -1131,23 +1131,23 @@ static UINT _eventorder[] = #define GC_EVENT_ALL (GC_EVENT_ACTION | GC_EVENT_MESSAGE | GC_EVENT_NICK | GC_EVENT_JOIN | \ GC_EVENT_PART | GC_EVENT_TOPIC | GC_EVENT_ADDSTATUS | GC_EVENT_INFORMATION | GC_EVENT_QUIT | \ - GC_EVENT_KICK | GC_EVENT_NOTICE) + GC_EVENT_KICK | GC_EVENT_NOTICE) /** * Dialog procedure for group chat options tab #3 (event filter configuration) * * @return */ + INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); - { DWORD dwFilterFlags = M.GetDword("Chat", "FilterFlags", GC_EVENT_ALL); - DWORD dwTrayFlags = M.GetDword("Chat", "TrayIconFlags", GC_EVENT_ALL); - DWORD dwPopupFlags = M.GetDword("Chat", "PopupFlags", GC_EVENT_ALL); + DWORD dwTrayFlags = M.GetDword("Chat", "TrayIconFlags", GC_EVENT_HIGHLIGHT); + DWORD dwPopupFlags = M.GetDword("Chat", "PopupFlags", GC_EVENT_HIGHLIGHT); DWORD dwLogFlags = M.GetDword("Chat", "DiskLogFlags", GC_EVENT_ALL); for (int i=0; i < SIZEOF(_eventorder); i++) { @@ -1158,15 +1158,15 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM CheckDlgButton(hwndDlg, IDC_P1 + i, dwPopupFlags & _eventorder[i] ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_T1 + i, dwTrayFlags & _eventorder[i] ? BST_CHECKED : BST_UNCHECKED); } - SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_ADDSTRING, -1, (LPARAM)TranslateT("No markers")); - SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_ADDSTRING, -1, (LPARAM)TranslateT("Show as icons")); - SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_ADDSTRING, -1, (LPARAM)TranslateT("Show as text symbols")); + } + SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_ADDSTRING, -1, (LPARAM)TranslateT("No markers")); + SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_ADDSTRING, -1, (LPARAM)TranslateT("Show as icons")); + SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_ADDSTRING, -1, (LPARAM)TranslateT("Show as text symbols")); - SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_SETCURSEL, (g_Settings.bLogSymbols ? 2 : (g_Settings.dwIconFlags ? 1 : 0)), 0); + SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_SETCURSEL, (g_Settings.bLogSymbols ? 2 : (g_Settings.dwIconFlags ? 1 : 0)), 0); - CheckDlgButton(hwndDlg, IDC_NOPOPUPSFORCLOSEDWINDOWS, M.GetByte("Chat", "SkipWhenNoWindow", 0) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_TRAYONLYFORINACTIVE, M.GetByte("Chat", "TrayIconInactiveOnly", 0) ? BST_CHECKED : BST_UNCHECKED); - } + CheckDlgButton(hwndDlg, IDC_NOPOPUPSFORCLOSEDWINDOWS, M.GetByte("Chat", "SkipWhenNoWindow", 0) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_TRAYONLYFORINACTIVE, M.GetByte("Chat", "TrayIconInactiveOnly", 0) ? BST_CHECKED : BST_UNCHECKED); break; case WM_COMMAND: diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp index f269d6a11d..9bc16310f8 100644 --- a/plugins/TabSRMM/src/controls.cpp +++ b/plugins/TabSRMM/src/controls.cpp @@ -821,9 +821,9 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR if (PluginConfig.m_visualMessageSizeIndicator && i == 0) { if (dat && dat->bType == SESSIONTYPE_IM) { - HBRUSH br = CreateSolidBrush(RGB(0, 255, 0)); - HBRUSH brOld = (HBRUSH)SelectObject(hdcMem, br); - RECT rc = itemRect; + HBRUSH br = CreateSolidBrush(RGB(0, 255, 0)); + HBRUSH brOld = (HBRUSH)SelectObject(hdcMem, br); + RECT rc = itemRect; rc.top = rc.bottom - 3; rc.left = 0; @@ -859,6 +859,7 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR FillRect(hdcMem, &rc, br); } } + SelectObject(hdcMem, brOld); DeleteObject(br); } } -- cgit v1.2.3