From 64303ec8f7d8fd491247a2c06ee133e4f5f3c942 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 30 Mar 2020 16:52:28 +0300 Subject: Contact lists: - all common options moved to the Clist namespace; - fixes #2281 (Add option to not clear "NotOnList" group at start); --- plugins/Clist_blind/src/clistopts.cpp | 23 ----------------------- plugins/Clist_blind/src/resource.h | 10 +++------- 2 files changed, 3 insertions(+), 30 deletions(-) (limited to 'plugins/Clist_blind/src') diff --git a/plugins/Clist_blind/src/clistopts.cpp b/plugins/Clist_blind/src/clistopts.cpp index 450ffe0f80..e7696f7e2c 100644 --- a/plugins/Clist_blind/src/clistopts.cpp +++ b/plugins/Clist_blind/src/clistopts.cpp @@ -26,30 +26,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { - case WM_USER + 1: - { - MCONTACT hContact = (MCONTACT)wParam; - DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *)lParam; - if (hContact == NULL && ws != nullptr && ws->szModule != nullptr && ws->szSetting != nullptr && - strcmp(ws->szModule, "CList") == 0 && strcmp(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) - CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, ws->value.bVal == 0 ? BST_CHECKED : BST_UNCHECKED); - } - break; - - case WM_DESTROY: - UnhookEvent((HANDLE)GetWindowLongPtr(hwndDlg, GWLP_USERDATA)); - break; - case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)HookEventMessage(ME_DB_CONTACT_SETTINGCHANGED, hwndDlg, WM_USER + 1)); - CheckDlgButton(hwndDlg, IDC_HIDEOFFLINE, g_plugin.getByte("HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_HIDEEMPTYGROUPS, g_plugin.getByte("HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, g_plugin.getByte("UseGroups", SETTING_USEGROUPS_DEFAULT) ? BST_UNCHECKED : BST_CHECKED); CheckDlgButton(hwndDlg, IDC_SORTBYNAME, !g_plugin.getByte("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT) && !g_plugin.getByte("SortByProto", SETTING_SORTBYPROTO_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_SORTBYSTATUS, g_plugin.getByte("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_SORTBYPROTO, g_plugin.getByte("SortByProto", SETTING_SORTBYPROTO_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CONFIRMDELETE, g_plugin.getByte("ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_ONECLK, g_plugin.getByte("Tray1Click", SETTING_TRAY1CLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_ALWAYSSTATUS, g_plugin.getByte("AlwaysStatus", SETTING_ALWAYSSTATUS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); @@ -129,12 +110,8 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP case 0: switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: - g_plugin.setByte("HideOffline", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDEOFFLINE)); - g_plugin.setByte("HideEmptyGroups", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDEEMPTYGROUPS)); - g_plugin.setByte("UseGroups", (BYTE)!IsDlgButtonChecked(hwndDlg, IDC_DISABLEGROUPS)); g_plugin.setByte("SortByStatus", (BYTE) (g_bSortByStatus = IsDlgButtonChecked(hwndDlg, IDC_SORTBYSTATUS))); g_plugin.setByte("SortByProto", (BYTE) (g_bSortByProto = IsDlgButtonChecked(hwndDlg, IDC_SORTBYPROTO))); - g_plugin.setByte("ConfirmDelete", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CONFIRMDELETE)); g_plugin.setByte("Tray1Click", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ONECLK)); g_plugin.setByte("AlwaysStatus", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ALWAYSSTATUS)); g_plugin.setByte("AlwaysMulti", (BYTE)!IsDlgButtonChecked(hwndDlg, IDC_ALWAYSMULTI)); diff --git a/plugins/Clist_blind/src/resource.h b/plugins/Clist_blind/src/resource.h index 260e667fef..f63bf51f17 100644 --- a/plugins/Clist_blind/src/resource.h +++ b/plugins/Clist_blind/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by resource.rc +// Microsoft Visual C++ generated include file. +// Used by W:\miranda-ng\plugins\Clist_blind\res\resource.rc // #define IDD_OPT_CLIST 126 #define IDC_DROP 183 @@ -20,18 +20,14 @@ #define IDC_TOOLWND 1097 #define IDC_ONECLK 1098 #define IDC_SHOWCAPTION 1098 -#define IDC_HIDEOFFLINE 1099 #define IDC_SHOWHIDE 1100 -#define IDC_HIDEEMPTYGROUPS 1100 #define IDC_SORTBYSTATUS 1101 #define IDC_FADEINOUT 1101 #define IDC_READMSG 1102 #define IDC_AUTOSIZE 1102 -#define IDC_DISABLEGROUPS 1102 #define IDC_AUTOSIZEUPWARD 1103 #define IDC_ALWAYSSTATUS 1103 #define IDC_NETSEARCH 1104 -#define IDC_CONFIRMDELETE 1104 #define IDC_SORTBYPROTO 1105 #define IDC_SHOWOPTIONS 1105 #define IDC_SEARCHURL 1106 @@ -138,7 +134,7 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 292 +#define _APS_NEXT_RESOURCE_VALUE 293 #define _APS_NEXT_COMMAND_VALUE 40018 #define _APS_NEXT_CONTROL_VALUE 1662 #define _APS_NEXT_SYMED_VALUE 101 -- cgit v1.2.3