From 218ce60228981746b57531bb2dcb1bdb4a0f96b5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 2 Dec 2012 21:40:05 +0000 Subject: useless options dialog removed git-svn-id: http://svn.miranda-ng.org/main/trunk@2614 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdfile/resource.rc | 8 ----- src/modules/options/filter.cpp | 67 ----------------------------------------- src/modules/options/filter.h | 3 -- src/modules/options/options.cpp | 15 +++------ src/resource.h | 1 - src/resource.rc | 10 ------ 6 files changed, 5 insertions(+), 99 deletions(-) diff --git a/src/core/stdfile/resource.rc b/src/core/stdfile/resource.rc index 2d910b632b..e48b2d001d 100644 --- a/src/core/stdfile/resource.rc +++ b/src/core/stdfile/resource.rc @@ -252,14 +252,6 @@ BEGIN BOTTOMMARGIN, 176 END - IDD_OPT_KEYWORDFILTER, DIALOG - BEGIN - LEFTMARGIN, 4 - RIGHTMARGIN, 247 - TOPMARGIN, 4 - BOTTOMMARGIN, 69 - END - IDD_OPT_FILETRANSFER, DIALOG BEGIN VERTGUIDE, 8 diff --git a/src/modules/options/filter.cpp b/src/modules/options/filter.cpp index 13799b602f..c4cad5a70f 100644 --- a/src/modules/options/filter.cpp +++ b/src/modules/options/filter.cpp @@ -24,8 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "..\..\core\commonheaders.h" #include "filter.h" -HANDLE hOptionsInitialize; - CPageList filterStrings(1); void AddFilterString(const PageHash key, TCHAR *data) @@ -152,68 +150,3 @@ void GetDialogStrings(int enableKeywordFiltering, const PageHash key, TCHAR *plu EnumChildWindows(hWnd, GetDialogStringsCallback, (LPARAM) key); } } - -static INT_PTR CALLBACK DlgProcOptSearch(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) { - case WM_INITDIALOG: - TranslateDialogDefault(hWnd); - - CheckDlgButton(hWnd, IDC_ENABLE_KEYWORDFILTERING, db_get_w(NULL, "Options", "EnableKeywordFiltering", TRUE) ? BST_CHECKED : BST_UNCHECKED); - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDC_ENABLE_KEYWORDFILTERING: - SendMessage(GetParent(hWnd), PSM_CHANGED, 0, 0); - break; - } - break; - - case WM_SETFOCUS: - SetFocus( GetDlgItem(hWnd, IDC_ENABLE_KEYWORDFILTERING)); - break; - - case WM_NOTIFY: - switch(((LPNMHDR)lParam)->idFrom) { - case 0: - switch (((LPNMHDR)lParam)->code) { - case PSN_APPLY: - DBWriteContactSettingWord(NULL, "Options", "EnableKeywordFiltering", IsDlgButtonChecked(hWnd, IDC_ENABLE_KEYWORDFILTERING)); - break; - } - } - break; - } - - return 0; -} - -static int OnOptionsInitialise(WPARAM wParam, LPARAM) -{ - OPTIONSDIALOGPAGE odp = {0}; - - odp.cbSize = sizeof(odp); - odp.position = -190000000; - odp.hInstance = hInst; - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_KEYWORDFILTER); - odp.pszTitle = LPGEN("Options search"); - odp.pszGroup = LPGEN("Customize"); - odp.groupPosition = 810000000; - odp.flags = ODPF_BOLDGROUPS; - odp.pfnDlgProc = DlgProcOptSearch; - Options_AddPage(wParam, &odp); - return 0; -} - -int HookFilterEvents() -{ - hOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OnOptionsInitialise); - return 0; -} - -int UnhookFilterEvents() -{ - UnhookEvent(hOptionsInitialize); - return 0; -} diff --git a/src/modules/options/filter.h b/src/modules/options/filter.h index a0ee0f8851..c8a62665d3 100644 --- a/src/modules/options/filter.h +++ b/src/modules/options/filter.h @@ -26,9 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern HANDLE hOptionsInitialize; -int HookFilterEvents(); -int UnhookFilterEvents(); - typedef DWORD PageHash; void AddFilterString(const PageHash key, const TCHAR *data); diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index 4af9638e87..27b9baa06d 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -773,12 +773,11 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L MapWindowPoints(NULL, hdlg, (LPPOINT)&dat->rcTab, 2); TabCtrl_AdjustRect( GetDlgItem(hdlg, IDC_TAB), FALSE, &dat->rcTab); - //!!!!!!!!!! int enableKeywordFiltering = db_get_w(NULL, "Options", "EnableKeywordFiltering", TRUE); - FillFilterCombo(0, hdlg, dat); //!!!!!!!!!! enableKeywordFiltering, + FillFilterCombo(0, hdlg, dat); SendMessage(hdlg, DM_REBUILDPAGETREE, 0, 0); - - return TRUE; } + return TRUE; + case DM_REBUILDPAGETREE: { BOOL bRemoveFocusFromFilter = FALSE; @@ -1429,11 +1428,9 @@ static int OptModulesLoaded(WPARAM, LPARAM) int ShutdownOptionsModule(WPARAM, LPARAM) { - if (IsWindow(hwndOptions)) DestroyWindow(hwndOptions); + if ( IsWindow(hwndOptions)) + DestroyWindow(hwndOptions); hwndOptions = NULL; - - //!!!!!!!!!! UnhookFilterEvents(); - return 0; } @@ -1447,7 +1444,5 @@ int LoadOptionsModule(void) CreateServiceFunction("Options/OptionsCommand", OpenOptionsDialog); HookEvent(ME_SYSTEM_MODULESLOADED, OptModulesLoaded); HookEvent(ME_SYSTEM_PRESHUTDOWN, ShutdownOptionsModule); - - //!!!!!!!!!! HookFilterEvents(); return 0; } diff --git a/src/resource.h b/src/resource.h index 91a816b4e1..6587f8cb77 100644 --- a/src/resource.h +++ b/src/resource.h @@ -133,7 +133,6 @@ #define IDD_WAITRESTART 285 #define IDD_FTMGR 286 #define IDD_FTPAGE 287 -#define IDD_OPT_KEYWORDFILTER 288 #define IDI_JOINCHAT 289 #define IDD_CHOOSE_FONT_EFFECT 289 #define IDI_LEAVECHAT 290 diff --git a/src/resource.rc b/src/resource.rc index 0498736971..44bf643535 100644 --- a/src/resource.rc +++ b/src/resource.rc @@ -606,16 +606,6 @@ BEGIN PUSHBUTTON "Close",IDCANCEL,110,49,50,14 END -IDD_OPT_KEYWORDFILTER DIALOGEX 0, 0, 251, 73 -STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - CONTROL "Enable keyword search in options dialog",IDC_ENABLE_KEYWORDFILTERING, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,4,243,10 - LTEXT "If this option is checked it allows you to search for option pages that contain the search string or plugin name.",IDC_STATIC,4,20,243,49,NOT WS_GROUP -END - IDD_ERROR_LIST DIALOGEX 0, 0, 312, 209 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_CONTROLPARENT -- cgit v1.2.3