diff options
author | George Hazan <ghazan@miranda.im> | 2023-03-03 12:45:23 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-03-03 12:45:23 +0300 |
commit | ed45aa912e89bb1fabe829c9644d34803a24ddda (patch) | |
tree | 57fb87f3e03f82eb3d5d356e4fcaa7f89215a083 /plugins | |
parent | bde2e74d7aee14a127674aa91a93dc0c982281c8 (diff) |
fixes #3383 (Clist_modern: get rid of inverted logic)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Clist_modern/res/resource.rc | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/init.cpp | 5 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcopts.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcutils.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_contact.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_defsettings.h | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_global_structure.h | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/resource.h | 2 |
8 files changed, 13 insertions, 8 deletions
diff --git a/plugins/Clist_modern/res/resource.rc b/plugins/Clist_modern/res/resource.rc index bc29191dd1..95bdf588f0 100644 --- a/plugins/Clist_modern/res/resource.rc +++ b/plugins/Clist_modern/res/resource.rc @@ -258,7 +258,7 @@ EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
GROUPBOX "Contact list sorting",IDC_STATIC,2,8,294,84,WS_GROUP
- CONTROL "Don't move offline user to bottom",IDC_NOOFFLINEMOVE,
+ CONTROL "Move offline user to bottom",IDC_OFFLINEMOVE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,77,281,10
LTEXT "1st:",IDC_STATIC,15,19,14,8
LTEXT "2nd:",IDC_STATIC,15,35,14,8
diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp index 3026d17ba2..6e809c6b4b 100644 --- a/plugins/Clist_modern/src/init.cpp +++ b/plugins/Clist_modern/src/init.cpp @@ -112,6 +112,11 @@ int CMPlugin::Unload(void) void CMPlugin::ReadSettings()
{
+ if (g_plugin.getBool("NoOfflineBottom")) {
+ g_plugin.setByte("OfflineBottom", false);
+ g_plugin.delSetting("NoOfflineBottom");
+ }
+
wcsncpy_s(secondLine.text, getMStringW("SecondLineText"), _TRUNCATE);
secondLine.iType = getWord("SecondLineType", SETTING_SECONDLINE_TYPE_DEFAULT);
secondLine.bActive = getBool("SecondLineShow", SETTING_SECONDLINE_SHOW_DEFAULT);
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 52e16a6d53..33f7ef7972 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -506,7 +506,7 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_SETCURSEL, i, 0);
}
- CheckDlgButton(hwndDlg, IDC_NOOFFLINEMOVE, g_plugin.getByte("NoOfflineBottom", SETTING_NOOFFLINEBOTTOM_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_OFFLINEMOVE, g_plugin.getByte("OfflineBottom", SETTING_OFFLINEBOTTOM_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
}
return TRUE;
@@ -539,7 +539,7 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, g_plugin.setByte("SortBy2", (uint8_t)s2);
g_plugin.setByte("SortBy3", (uint8_t)s3);
- g_plugin.setByte("NoOfflineBottom", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_NOOFFLINEMOVE));
+ g_plugin.setByte("OfflineBottom", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_OFFLINEMOVE));
g_plugin.setByte("PlaceOfflineToRoot", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_OFFLINETOROOT));
Clist_LoadContactTree(); /* this won't do job properly since it only really works when changes happen */
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index 29e438a846..8de0df74a2 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -462,7 +462,7 @@ void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst) g_CluiData.bSortByOrder[0] = g_plugin.getByte("SortBy1", SETTING_SORTBY1_DEFAULT);
g_CluiData.bSortByOrder[1] = g_plugin.getByte("SortBy2", SETTING_SORTBY2_DEFAULT);
g_CluiData.bSortByOrder[2] = g_plugin.getByte("SortBy3", SETTING_SORTBY3_DEFAULT);
- g_CluiData.fSortNoOfflineBottom = g_plugin.getByte("NoOfflineBottom", SETTING_NOOFFLINEBOTTOM_DEFAULT) != 0;
+ g_CluiData.fSortOfflineBottom = g_plugin.getBool("OfflineBottom", SETTING_OFFLINEBOTTOM_DEFAULT);
// Row
dat->row_min_heigh = g_plugin.getWord("MinRowHeight", CLCDEFAULT_ROWHEIGHT);
diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp index 4a8420752a..8950b6c5c2 100644 --- a/plugins/Clist_modern/src/modern_contact.cpp +++ b/plugins/Clist_modern/src/modern_contact.cpp @@ -101,7 +101,7 @@ int cliCompareContacts(const ClcContact *contact1, const ClcContact *contact2) }
// one is offline: offline goes below online
- if (!g_CluiData.fSortNoOfflineBottom) {
+ if (g_CluiData.fSortOfflineBottom) {
int statusa = c1->getStatus();
int statusb = c2->getStatus();
if ((statusa == ID_STATUS_OFFLINE) != (statusb == ID_STATUS_OFFLINE))
diff --git a/plugins/Clist_modern/src/modern_defsettings.h b/plugins/Clist_modern/src/modern_defsettings.h index 04bfb6f73b..f13bce33db 100644 --- a/plugins/Clist_modern/src/modern_defsettings.h +++ b/plugins/Clist_modern/src/modern_defsettings.h @@ -115,7 +115,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SETTING_SORTBY2_DEFAULT SORTBY_NAME_LOCALE
#define SETTING_SORTBY3_DEFAULT SORTBY_PROTO
-#define SETTING_NOOFFLINEBOTTOM_DEFAULT 0
+#define SETTING_OFFLINEBOTTOM_DEFAULT 1
#define SETTING_HIDEOFFLINEATROOT_DEFAULT 0
#define SETTING_HILIGHTMODE_DEFAULT 1
diff --git a/plugins/Clist_modern/src/modern_global_structure.h b/plugins/Clist_modern/src/modern_global_structure.h index a522dc2165..6012cb61fe 100644 --- a/plugins/Clist_modern/src/modern_global_structure.h +++ b/plugins/Clist_modern/src/modern_global_structure.h @@ -45,7 +45,7 @@ struct CLUIDATA bool fOnDesktop;
bool fSmoothAnimation;
bool fLayered;
- bool fSortNoOfflineBottom;
+ bool fSortOfflineBottom;
bool fAutoSize;
bool fAeroGlass;
uint8_t bCurrentAlpha;
diff --git a/plugins/Clist_modern/src/resource.h b/plugins/Clist_modern/src/resource.h index f2440be68d..bf15e68168 100644 --- a/plugins/Clist_modern/src/resource.h +++ b/plugins/Clist_modern/src/resource.h @@ -245,7 +245,7 @@ #define IDC_BUTTON_BROWSE 1633
#define IDC_UP 1633
#define IDC_DOWN 1634
-#define IDC_NOOFFLINEMOVE 1657
+#define IDC_OFFLINEMOVE 1657
#define IDC_HILIGHTMODE 1658
#define IDC_OFFLINETOROOT 1658
#define IDC_HILIGHTMODE2 1659
|