From 7bc07a1bb6dc73029e98ce1c3e9c907ba09f7843 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 15 Nov 2022 17:07:08 +0300 Subject: fixes #3240 (StdClist: get rid of inverted logic) --- plugins/Clist_modern/res/resource.rc | 10 ++--- plugins/Clist_modern/src/modern_clcopts.cpp | 11 +---- plugins/Clist_modern/src/modern_defsettings.h | 2 - plugins/Clist_modern/src/resource.h | 3 -- plugins/Clist_nicer/res/resource.rc | 61 +++++++++++++++++++-------- plugins/Clist_nicer/src/clistopts.cpp | 5 --- plugins/Clist_nicer/src/resource.h | 7 +-- 7 files changed, 49 insertions(+), 50 deletions(-) (limited to 'plugins') diff --git a/plugins/Clist_modern/res/resource.rc b/plugins/Clist_modern/res/resource.rc index 3113b7e2ac..daaa0881bf 100644 --- a/plugins/Clist_modern/res/resource.rc +++ b/plugins/Clist_modern/res/resource.rc @@ -413,15 +413,11 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - CONTROL "Disable icon blinking",IDC_DISABLEBLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,19,156,9 - EDITTEXT IDC_BLINKTIME,12,33,35,12,ES_NUMBER - CONTROL "",IDC_BLINKSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,42,34,11,12 - LTEXT "ms, delay between icon blinking",IDC_STATIC,51,35,104,8 GROUPBOX "System tray icon",IDC_STATIC,2,6,292,54 - CONTROL "Use xStatus icon",IDC_SHOWXSTATUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,171,19,117,10 - CONTROL "Show normal status as overlay",IDC_SHOWNORMAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,171,32,117,10 + CONTROL "Use xStatus icon",IDC_SHOWXSTATUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,19,277,10 + CONTROL "Show normal status as overlay",IDC_SHOWNORMAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,32,277,10 CONTROL "Status overlay opacity is 75%",IDC_TRANSPARENTOVERLAY, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,171,45,117,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,45,277,10 GROUPBOX "Icon mode",IDC_STATIC,2,61,292,110 GROUPBOX "For similar statuses",IDC_STATIC,8,71,138,74 CONTROL "Global status",IDC_ICON_GLOBAL_S,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,14,81,124,10 diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 51120e8fd9..d5d25caf10 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -562,7 +562,6 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); - CheckDlgButton(hwndDlg, IDC_NOOFFLINEMOVE, g_plugin.getByte("NoOfflineBottom", SETTING_NOOFFLINEBOTTOM_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); { uint8_t trayOption = db_get_b(0, "CLUI", "XStatusTray", SETTING_TRAYOPTION_DEFAULT); @@ -574,11 +573,6 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSPARENTOVERLAY), IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS) && IsDlgButtonChecked(hwndDlg, IDC_SHOWNORMAL)); } - CheckDlgButton(hwndDlg, IDC_DISABLEBLINK, g_plugin.getByte("DisableTrayFlash", SETTING_DISABLETRAYFLASH_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED); - - SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_SETRANGE, 0, MAKELONG(0x3FFF, 250)); - SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("IconFlashTime", SETTING_ICONFLASHTIME_DEFAULT), 0)); - // == Tray icon mode == // preparing account list. { @@ -666,7 +660,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L return 0; if (LOWORD(wParam) == IDC_PRIMARYSTATUS_V && HIWORD(wParam) != CBN_SELCHANGE) return 0; - if ((LOWORD(wParam) == IDC_BLINKTIME || LOWORD(wParam) == IDC_CYCLETIME) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) + if ((LOWORD(wParam) == IDC_CYCLETIME) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) return 0; SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); break; @@ -676,9 +670,6 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L case 0: switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: - g_plugin.setWord("IconFlashTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_BLINKSPIN, UDM_GETPOS, 0, 0)); - g_plugin.setByte("DisableTrayFlash", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DISABLEBLINK)); - uint8_t xOptions = 0; xOptions = IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS) ? 1 : 0; xOptions |= (xOptions && IsDlgButtonChecked(hwndDlg, IDC_SHOWNORMAL)) ? 2 : 0; diff --git a/plugins/Clist_modern/src/modern_defsettings.h b/plugins/Clist_modern/src/modern_defsettings.h index eaf83f0e33..966f33e47c 100644 --- a/plugins/Clist_modern/src/modern_defsettings.h +++ b/plugins/Clist_modern/src/modern_defsettings.h @@ -34,8 +34,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SETTING_ONTOP_DEFAULT 1 #define SETTING_MIN2TRAY_DEFAULT 1 #define SETTING_PLACEOFFLINETOROOT_DEFAULT 0 -#define SETTING_DISABLETRAYFLASH_DEFAULT 0 -#define SETTING_ICONFLASHTIME_DEFAULT 550 #define SETTING_THINBORDER_DEFAULT 0 #define SETTING_NOBORDER_DEFAULT 0 #define SETTING_WINDOWSHADOW_DEFAULT 0 diff --git a/plugins/Clist_modern/src/resource.h b/plugins/Clist_modern/src/resource.h index bf18e49539..1655f02bde 100644 --- a/plugins/Clist_modern/src/resource.h +++ b/plugins/Clist_modern/src/resource.h @@ -225,9 +225,6 @@ #define IDC_HIDE 1534 #define IDC_TOPLINE 1535 #define IDC_BRINGTOFRONT 1579 -#define IDC_BLINKTIME 1607 -#define IDC_BLINKSPIN 1608 -#define IDC_DISABLEBLINK 1609 #define IDC_IDLE 1610 #define IDC_META 1611 #define IDC_DROPSHADOW 1612 diff --git a/plugins/Clist_nicer/res/resource.rc b/plugins/Clist_nicer/res/resource.rc index 6f7edb34de..ff7b5a042c 100644 --- a/plugins/Clist_nicer/res/resource.rc +++ b/plugins/Clist_nicer/res/resource.rc @@ -18,7 +18,7 @@ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#pragma code_page(1251) +#pragma code_page(1252) ///////////////////////////////////////////////////////////////////////////// // @@ -64,23 +64,18 @@ BEGIN CONTROL "Show menu and status buttons",IDC_SHOWBOTTOMBUTTONS, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,12,121,10 CONTROL "Draw sunken edge",IDC_CLISTSUNKEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,25,121,10 - GROUPBOX "System tray icon",IDC_STATIC,1,54,163,63 - CONTROL "Disable icon blinking",IDC_DISABLEBLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,67,147,10 - EDITTEXT IDC_BLINKTIME,69,78,57,12,ES_RIGHT | ES_NUMBER - CONTROL "Spin5",IDC_BLINKSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,120,77,11,16 - LTEXT "ms",IDC_STATIC,131,80,24,8 - GROUPBOX "Event area",IDC_STATIC,169,54,133,63 - LTEXT "Set base visibility on the frames menu",IDC_STATIC,176,65,121,20 - CONTROL "Auto mode",IDC_EVENTAREAAUTOHIDE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,176,88,121,10 - CONTROL "Draw sunken edge",IDC_EVENTAREASUNKEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,176,101,121,10 - GROUPBOX "System tray icon when using multiple protocols",IDC_STATIC,1,118,302,71 - CONTROL "Show",IDC_DONTCYCLE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,10,130,92,10 - COMBOBOX IDC_PRIMARYSTATUS,107,129,78,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "icon when statuses differ",IDC_STATIC,189,131,113,8,NOT WS_GROUP - CONTROL "Cycle icons every",IDC_CYCLE,"Button",BS_AUTORADIOBUTTON,10,144,92,10 - EDITTEXT IDC_CYCLETIME,107,144,30,12,ES_RIGHT | ES_NUMBER - CONTROL "Spin1",IDC_CYCLETIMESPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,128,162,11,14 - LTEXT "seconds, when statuses differ",IDC_STATIC,140,146,155,8,NOT WS_GROUP + GROUPBOX "Event area",IDC_STATIC,1,54,301,50 + LTEXT "Set base visibility on the frames menu",IDC_STATIC,11,65,289,11 + CONTROL "Auto mode",IDC_EVENTAREAAUTOHIDE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,77,285,10 + CONTROL "Draw sunken edge",IDC_EVENTAREASUNKEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,90,288,10 + GROUPBOX "System tray icon when using multiple protocols",IDC_STATIC,1,106,302,81 + CONTROL "Show",IDC_DONTCYCLE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,10,121,92,10 + COMBOBOX IDC_PRIMARYSTATUS,107,120,78,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "icon when statuses differ",IDC_STATIC,189,122,113,8,NOT WS_GROUP + CONTROL "Cycle icons every",IDC_CYCLE,"Button",BS_AUTORADIOBUTTON,10,139,92,10 + EDITTEXT IDC_CYCLETIME,107,139,30,12,ES_RIGHT | ES_NUMBER + CONTROL "Spin1",IDC_CYCLETIMESPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,130,138,11,14 + LTEXT "seconds, when statuses differ",IDC_STATIC,140,141,155,8,NOT WS_GROUP CONTROL "Show multiple icons",IDC_MULTITRAY,"Button",BS_AUTORADIOBUTTON,10,158,92,10 CONTROL "Only when statuses differ",IDC_ALWAYSMULTI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,158,186,10 CONTROL "Do not show system tray icon tooltips on mouse over",IDC_NOTRAYINFOTIPS, @@ -528,6 +523,36 @@ IDC_DROP CURSOR "..\\..\\..\\src\\mir_app\\res\\ IDC_DROPUSER CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_drop_user.cur" + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_OPT_CLIST, DIALOG + BEGIN + END + + IDD_OPT_CLUI, DIALOG + BEGIN + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// AFX_DIALOG_LAYOUT +// + +IDD_OPT_CLIST AFX_DIALOG_LAYOUT +BEGIN + 0 +END + #endif // Neutral resources ///////////////////////////////////////////////////////////////////////////// diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index b5cd53c932..8869c4a965 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -54,7 +54,6 @@ public: CheckDlgButton(m_hwnd, IDC_EVENTAREAAUTOHIDE, cfg::dat.dwFlags & CLUI_FRAME_AUTOHIDENOTIFY ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(m_hwnd, IDC_EVENTAREASUNKEN, (cfg::dat.dwFlags & CLUI_FRAME_EVENTAREASUNKEN) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(m_hwnd, IDC_ALWAYSMULTI, !g_plugin.getByte("AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwnd, IDC_DISABLEBLINK, g_plugin.getByte("DisableTrayFlash", 0) == 1 ? BST_CHECKED : BST_UNCHECKED); chkCycle.SetState(g_plugin.getByte("TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_CYCLE); chkMulti.SetState(g_plugin.getByte("TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI); @@ -81,8 +80,6 @@ public: if (CB_ERR == (int)SendDlgItemMessage(m_hwnd, IDC_PRIMARYSTATUS, CB_GETCURSEL, 0, 0)) SendDlgItemMessage(m_hwnd, IDC_PRIMARYSTATUS, CB_SETCURSEL, 0, 0); - SendDlgItemMessage(m_hwnd, IDC_BLINKSPIN, UDM_SETRANGE, 0, MAKELONG(0x3FFF, 250)); - SendDlgItemMessage(m_hwnd, IDC_BLINKSPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("IconFlashTime", 550), 0)); CheckDlgButton(m_hwnd, IDC_NOTRAYINFOTIPS, cfg::dat.bNoTrayTips ? 1 : 0); CheckDlgButton(m_hwnd, IDC_APPLYLASTVIEWMODE, g_plugin.getByte("AutoApplyLastViewMode", 0) ? BST_CHECKED : BST_UNCHECKED); return true; @@ -93,8 +90,6 @@ public: g_plugin.setByte("AlwaysMulti", (uint8_t)BST_UNCHECKED == IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI)); g_plugin.setByte("TrayIcon", (uint8_t)(chkDontCycle.GetState() ? SETTING_TRAYICON_SINGLE : (chkCycle.GetState() ? SETTING_TRAYICON_CYCLE : SETTING_TRAYICON_MULTI))); g_plugin.setWord("CycleTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0)); - g_plugin.setWord("IconFlashTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_BLINKSPIN, UDM_GETPOS, 0, 0)); - g_plugin.setByte("DisableTrayFlash", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_DISABLEBLINK)); g_plugin.setByte("AutoApplyLastViewMode", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_APPLYLASTVIEWMODE)); cfgSetFlag(m_hwnd, CLUI_FRAME_EVENTAREASUNKEN, IDC_EVENTAREASUNKEN); diff --git a/plugins/Clist_nicer/src/resource.h b/plugins/Clist_nicer/src/resource.h index 18610d4d7e..c67d6c1ceb 100644 --- a/plugins/Clist_nicer/src/resource.h +++ b/plugins/Clist_nicer/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. -// Used by d:\Miranda NG Git_orig_commit\miranda-ng\plugins\Clist_nicer\res\resource.rc +// Used by W:\miranda-ng\plugins\clist_nicer\res\resource.rc // #define IDD_OPT_VIEWMODES 1 #define IDD_OPT_SKIN 4 @@ -179,9 +179,6 @@ #define IDC_HIDE 1534 #define IDC_TOPLINE 1535 #define IDC_BRINGTOFRONT 1579 -#define IDC_BLINKTIME 1607 -#define IDC_BLINKSPIN 1608 -#define IDC_DISABLEBLINK 1609 #define IDC_IDLE 1610 #define IDC_SBPANELBEVEL 1611 #define IDC_DBLCLKAVATARS 1611 @@ -326,7 +323,7 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 11 +#define _APS_NEXT_RESOURCE_VALUE 12 #define _APS_NEXT_COMMAND_VALUE 40061 #define _APS_NEXT_CONTROL_VALUE 40066 #define _APS_NEXT_SYMED_VALUE 40154 -- cgit v1.2.3