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/res/resource.rc | 43 ++- plugins/Clist_blind/src/clistopts.cpp | 23 -- plugins/Clist_blind/src/resource.h | 10 +- plugins/Clist_modern/res/resource.rc | 36 ++- plugins/Clist_modern/src/modern_clc.cpp | 4 +- plugins/Clist_modern/src/modern_clcitems.cpp | 2 +- plugins/Clist_modern/src/modern_clcopts.cpp | 49 ++-- plugins/Clist_modern/src/modern_clistopts.cpp | 1 - plugins/Clist_modern/src/modern_clui.cpp | 11 +- plugins/Clist_modern/src/modern_contact.cpp | 2 +- plugins/Clist_modern/src/modern_defsettings.h | 4 - plugins/Clist_modern/src/modern_static_clui.h | 1 - plugins/Clist_modern/src/modern_toolbar.cpp | 4 +- plugins/Clist_modern/src/modern_viewmodebar.cpp | 4 +- plugins/Clist_modern/src/resource.h | 8 +- plugins/Clist_nicer/clist_nicer.vcxproj | 34 +++ plugins/Clist_nicer/clist_nicer.vcxproj.filters | 371 +++++++++++++++++++++++- plugins/Clist_nicer/res/resource.rc | 62 ++-- plugins/Clist_nicer/src/CLCButton.cpp | 6 +- plugins/Clist_nicer/src/clc.cpp | 4 +- plugins/Clist_nicer/src/clistopts.cpp | 22 -- plugins/Clist_nicer/src/clui.cpp | 12 +- plugins/Clist_nicer/src/resource.h | 4 - plugins/Clist_nicer/src/viewmodes.cpp | 2 +- plugins/ContactsPlus/src/send.cpp | 5 +- plugins/Scriver/src/msgoptions.cpp | 2 +- plugins/ShellExt/src/shlcom.cpp | 4 +- plugins/ShellExt/src/stdafx.h | 1 + plugins/StopSpamMod/src/stdafx.h | 2 +- plugins/StopSpamMod/src/utilities.cpp | 2 +- plugins/StopSpamPlus/src/services.cpp | 2 +- plugins/TabSRMM/src/generic_msghandlers.cpp | 4 +- plugins/TabSRMM/src/msgoptions.cpp | 5 +- plugins/TipperYM/src/options.cpp | 2 +- plugins/TooltipNotify/src/TooltipNotify.cpp | 2 +- plugins/TopToolBar/src/InternalButtons.cpp | 7 +- plugins/Variables/src/help.cpp | 2 +- plugins/Variables/src/stdafx.h | 2 +- 38 files changed, 546 insertions(+), 215 deletions(-) (limited to 'plugins') diff --git a/plugins/Clist_blind/res/resource.rc b/plugins/Clist_blind/res/resource.rc index 5e139eeb32..a0bd8c9d68 100644 --- a/plugins/Clist_blind/res/resource.rc +++ b/plugins/Clist_blind/res/resource.rc @@ -14,7 +14,7 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// Русский (Россия) resources +// Russian (Russia) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT @@ -64,17 +64,13 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - CONTROL "Hide offline users",IDC_HIDEOFFLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,17,124,10 - CONTROL "Hide empty groups",IDC_HIDEEMPTYGROUPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,33,124,10 - CONTROL "Disable groups",IDC_DISABLEGROUPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,50,124,10 - CONTROL "Ask before deleting contacts",IDC_CONFIRMDELETE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,67,124,10 - CONTROL "Sort contacts by name",IDC_SORTBYNAME,"Button",BS_AUTORADIOBUTTON | WS_GROUP,153,14,144,10 - CONTROL "Sort contacts by status",IDC_SORTBYSTATUS,"Button",BS_AUTORADIOBUTTON,153,26,149,10 - CONTROL "Sort contacts by protocol",IDC_SORTBYPROTO,"Button",BS_AUTORADIOBUTTON,153,38,151,10 - CONTROL "Single click interface",IDC_ONECLK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,152,68,150,10 - CONTROL "Always show status in tooltip",IDC_ALWAYSSTATUS,"Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,152,81,151,11 - CONTROL "Disable icon blinking",IDC_DISABLEBLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,152,95,86,9 - EDITTEXT IDC_BLINKTIME,153,109,35,12,ES_NUMBER + CONTROL "Sort contacts by name",IDC_SORTBYNAME,"Button",BS_AUTORADIOBUTTON | WS_GROUP,10,14,246,10 + CONTROL "Sort contacts by status",IDC_SORTBYSTATUS,"Button",BS_AUTORADIOBUTTON,10,26,246,10 + CONTROL "Sort contacts by protocol",IDC_SORTBYPROTO,"Button",BS_AUTORADIOBUTTON,10,38,246,10 + CONTROL "Single click interface",IDC_ONECLK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,68,265,10 + CONTROL "Always show status in tooltip",IDC_ALWAYSSTATUS,"Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,10,81,274,11 + CONTROL "Disable icon blinking",IDC_DISABLEBLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,95,86,9 + EDITTEXT IDC_BLINKTIME,11,109,35,12,ES_NUMBER LTEXT "ms delay",IDC_STMSDELAY,192,110,113,8 CONTROL "Show",IDC_DONTCYCLE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,10,143,97,10 COMBOBOX IDC_PRIMARYSTATUS,107,142,78,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP @@ -85,10 +81,9 @@ BEGIN LTEXT "seconds, when statuses differ",IDC_STATIC,140,161,165,8,NOT WS_GROUP CONTROL "Show multiple icons",IDC_MULTITRAY,"Button",BS_AUTORADIOBUTTON,10,177,98,10 CONTROL "Only when statuses differ",IDC_ALWAYSMULTI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,177,198,10 - GROUPBOX "Contact list",IDC_STCLISTGROUP,2,2,135,126 - GROUPBOX "System tray icon",IDC_STATIC,143,57,169,70 + GROUPBOX "System tray icon",IDC_STATIC,2,57,310,70 GROUPBOX "System tray icon when using multiple protocols",IDC_STATIC,2,131,310,66 - GROUPBOX "Contact list sorting",IDC_STATIC,143,2,169,54,WS_GROUP + GROUPBOX "Contact list sorting",IDC_STATIC,2,2,310,54,WS_GROUP CONTROL "Spin5",IDC_BLINKSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,173,97,11,21 END @@ -299,19 +294,35 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDI_RENAME ICON "rename.ico" + IDI_BLANK ICON "..\\..\\..\\src\\mir_app\\res\\_blank.ico" + IDI_DELETE ICON "delete.ico" + ///////////////////////////////////////////////////////////////////////////// // // Cursor // IDC_HYPERLINKHAND CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_hyperlink.cur" + IDC_DROP CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_drag_copy.cur" + IDC_DROPUSER CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_drop_user.cur" -#endif // Русский (Россия) resources + +///////////////////////////////////////////////////////////////////////////// +// +// AFX_DIALOG_LAYOUT +// + +IDD_OPT_CLIST AFX_DIALOG_LAYOUT +BEGIN + 0 +END + +#endif // Russian (Russia) resources ///////////////////////////////////////////////////////////////////////////// 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 diff --git a/plugins/Clist_modern/res/resource.rc b/plugins/Clist_modern/res/resource.rc index a286dff11b..bbb59d7968 100644 --- a/plugins/Clist_modern/res/resource.rc +++ b/plugins/Clist_modern/res/resource.rc @@ -299,28 +299,23 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - CONTROL "Hide offline users",IDC_HIDEOFFLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,25,124,10 - CONTROL "Hide empty groups",IDC_HIDEEMPTYGROUPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,37,124,10 - CONTROL "Disable groups",IDC_DISABLEGROUPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,49,124,10 - CONTROL "Ask before deleting contacts",IDC_CONFIRMDELETE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,61,124,10 + GROUPBOX "Contact list sorting",IDC_STATIC,2,8,294,84,WS_GROUP CONTROL "Don't move offline user to bottom",IDC_NOOFFLINEMOVE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,153,77,141,10 - GROUPBOX "Contact list",IDC_STCLISTGROUP,2,8,142,84 - GROUPBOX "Contact list sorting",IDC_STATIC,146,8,154,84,WS_GROUP - LTEXT "1st:",IDC_STATIC,153,19,14,8 - LTEXT "2nd:",IDC_STATIC,153,35,14,8 - LTEXT "3rd:",IDC_STATIC,153,49,14,8 - COMBOBOX IDC_CLSORT1,169,18,125,146,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_CLSORT2,169,33,125,140,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_CLSORT3,169,48,125,140,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + "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 + LTEXT "3rd:",IDC_STATIC,15,49,14,8 + COMBOBOX IDC_CLSORT1,31,18,125,146,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_CLSORT2,31,33,125,140,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_CLSORT3,31,48,125,140,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Place offline users out of groups",IDC_OFFLINETOROOT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,153,64,141,10 - CONTROL "Gamma correction",IDC_GAMMACORRECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,180,124,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,64,276,10 + GROUPBOX "Selection mode",IDC_STATIC,2,95,294,101 CONTROL "Default",IDC_HILIGHTMODE4,"Button",BS_AUTORADIOBUTTON,12,115,119,10 CONTROL "Full selection",IDC_HILIGHTMODE1,"Button",BS_AUTORADIOBUTTON,12,131,119,10 CONTROL "Less selection",IDC_HILIGHTMODE2,"Button",BS_AUTORADIOBUTTON,12,147,119,10 CONTROL "No selection",IDC_HILIGHTMODE3,"Button",BS_AUTORADIOBUTTON,12,163,119,10 - GROUPBOX "Selection mode",IDC_STATIC,2,101,142,95 + CONTROL "Gamma correction",IDC_GAMMACORRECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,179,124,10 END IDD_OPT_CLUI_2 DIALOGEX 0, 0, 291, 224 @@ -824,6 +819,10 @@ BEGIN BEGIN END + IDD_OPT_CLIST, DIALOG + BEGIN + END + IDD_OPT_CLUI_2, DIALOG BEGIN RIGHTMARGIN, 285 @@ -848,6 +847,11 @@ BEGIN 0 END +IDD_OPT_CLIST AFX_DIALOG_LAYOUT +BEGIN + 0 +END + #endif // Russian (Russia) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 35fe88811f..72f00bc572 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1646,9 +1646,9 @@ HRESULT ClcLoadModule() int ClcUnloadModule() { if (g_CluiData.bOldUseGroups != (BYTE)-1) - g_plugin.setByte("UseGroups", (BYTE)g_CluiData.bOldUseGroups); + Clist::UseGroups = g_CluiData.bOldUseGroups; if (g_CluiData.boldHideOffline != (BYTE)-1) - g_plugin.setByte("HideOffline", (BYTE)g_CluiData.boldHideOffline); + Clist::HideOffline = g_CluiData.boldHideOffline; return 0; } diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index 2cbf993321..8048ac070b 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -40,7 +40,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) cont->subcontacts = (ClcContact *)mir_calloc(sizeof(ClcContact) * subcount); cont->iSubAllocated = subcount; int i = 0; - int bHideOffline = g_plugin.getByte("HideOffline", SETTING_HIDEOFFLINE_DEFAULT); + int bHideOffline = Clist::HideOffline; for (int j = 0; j < subcount; j++) { MCONTACT hsub = db_mc_getSub(cont->hContact, j); if (hsub == -1) diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 2c12815ff5..e090ed6601 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -30,25 +30,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -#define FONTF_NORMAL 0 -#define FONTF_BOLD 1 -#define FONTF_ITALIC 2 -#define FONTF_UNDERLINE 4 - -#define CLCGROUP LPGENW("Contact list") L"/" LPGENW("Contact names") -#define CLCLINESGROUP LPGENW("Contact list") L"/" LPGENW("Row items") -#define CLCFRAMESGROUP LPGENW("Contact list") L"/" LPGENW("Frame texts") -#define CLCCOLOURSGROUP LPGENW("Contact list") L"/" LPGENW("Special colors") +#define FONTF_NORMAL 0 +#define FONTF_BOLD 1 +#define FONTF_ITALIC 2 +#define FONTF_UNDERLINE 4 + +#define CLCGROUP LPGENW("Contact list") L"/" LPGENW("Contact names") +#define CLCLINESGROUP LPGENW("Contact list") L"/" LPGENW("Row items") +#define CLCFRAMESGROUP LPGENW("Contact list") L"/" LPGENW("Frame texts") +#define CLCCOLOURSGROUP LPGENW("Contact list") L"/" LPGENW("Special colors") #define DEFAULT_COLOUR RGB(0, 0, 0) #define DEFAULT_GREYCOLOUR RGB(128, 128, 128) #define DEFAULT_BACKCOLOUR RGB(255, 255, 255) -#define DEFAULT_FAMILY L"Arial" -#define DEFAULT_EFFECT { 0, 0x00000000, 0x00000000 } +#define DEFAULT_FAMILY L"Arial" +#define DEFAULT_EFFECT { 0, 0x00000000, 0x00000000 } -#define DEFAULT_SIZE -11 -#define DEFAULT_SMALLSIZE -8 +#define DEFAULT_SIZE -11 +#define DEFAULT_SMALLSIZE -8 struct { @@ -476,7 +476,18 @@ static int _GetNetVisibleProtoCount() return netProtoCount; } -static wchar_t* sortby[] = { LPGENW("Name"), LPGENW("Name (use locale settings)"), LPGENW("Status"), LPGENW("Last message time"), LPGENW("Account name"), LPGENW("Rate"), LPGENW("Last online"), LPGENW("-Nothing-") }; +static wchar_t* sortby[] = +{ + LPGENW("Name"), + LPGENW("Name (use locale settings)"), + LPGENW("Status"), + LPGENW("Last message time"), + LPGENW("Account name"), + LPGENW("Rate"), + LPGENW("Last online"), + LPGENW("-Nothing-") +}; + static int sortbyValue[] = { SORTBY_NAME, SORTBY_NAME_LOCALE, SORTBY_STATUS, SORTBY_LASTMSG, SORTBY_PROTO, SORTBY_RATE, SORTBY_LAST_ONLINE, SORTBY_NOTHING }; static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -485,11 +496,6 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); - 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_CONFIRMDELETE, g_plugin.getByte("ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_GAMMACORRECT, db_get_b(0, "CLC", "GammaCorrect", CLCDEFAULT_GAMMACORRECT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_HILIGHTMODE4, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 0 ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_HILIGHTMODE1, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED); @@ -534,11 +540,6 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, 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)BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DISABLEGROUPS)); - g_plugin.setByte("ConfirmDelete", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CONFIRMDELETE)); - db_set_b(0, "CLC", "GammaCorrect", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_GAMMACORRECT)); int hil = 0; if (IsDlgButtonChecked(hwndDlg, IDC_HILIGHTMODE1)) hil = 1; diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp index 0eb7645f1a..3332536da5 100644 --- a/plugins/Clist_modern/src/modern_clistopts.cpp +++ b/plugins/Clist_modern/src/modern_clistopts.cpp @@ -913,7 +913,6 @@ int CListOptInit(WPARAM wParam, LPARAM) { OPTIONSDIALOGPAGE odp = {}; odp.position = -200000000; - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ITEMS); odp.szGroup.a = LPGEN("Contact list"); odp.szTitle.a = LPGEN("Row items"); odp.flags = ODPF_BOLDGROUPS; diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 1705568ee5..62cde0a7fb 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -270,10 +270,10 @@ m_hDwmapiDll(nullptr) LoadCLUIFramesModule(); g_CluiData.boldHideOffline = -1; - bOldHideOffline = g_plugin.getByte("HideOffline", SETTING_HIDEOFFLINE_DEFAULT); + bOldHideOffline = Clist::HideOffline; g_CluiData.bOldUseGroups = -1; - bOldUseGroups = g_plugin.getByte("UseGroups", SETTING_USEGROUPS_DEFAULT); + bOldUseGroups = Clist::UseGroups; } CLUI::~CLUI() @@ -332,11 +332,7 @@ HRESULT CLUI::RegisterAvatarMenu() HRESULT CLUI::CreateCLCWindow(const HWND hwndClui) { g_clistApi.hwndContactTree = CreateWindow(CLISTCONTROL_CLASSW, L"", - WS_CHILD | WS_CLIPCHILDREN | CLS_CONTACTLIST - | (g_plugin.getByte("UseGroups", SETTING_USEGROUPS_DEFAULT) ? CLS_USEGROUPS : 0) - | (g_plugin.getByte("HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? CLS_HIDEOFFLINE : 0) - | (g_plugin.getByte("HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) ? CLS_HIDEEMPTYGROUPS : 0 - | CLS_MULTICOLUMN), + WS_CHILD | WS_CLIPCHILDREN | CLS_CONTACTLIST | (Clist::UseGroups ? CLS_USEGROUPS : 0) | (Clist::HideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::HideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0 | CLS_MULTICOLUMN), 0, 0, 0, 0, hwndClui, nullptr, g_plugin.getInst(), nullptr); return S_OK; @@ -2494,7 +2490,6 @@ LRESULT CLUI::OnDestroy(UINT, WPARAM, LPARAM) if (state == SETTING_STATE_NORMAL) CLUI_ShowWindowMod(m_hWnd, SW_HIDE); UnLoadContactListModule(); - ClcUnloadModule(); RemoveMenu(g_clistApi.hMenuMain, 0, MF_BYPOSITION); RemoveMenu(g_clistApi.hMenuMain, 0, MF_BYPOSITION); diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp index 3535f28e70..53a4ba2e22 100644 --- a/plugins/Clist_modern/src/modern_contact.cpp +++ b/plugins/Clist_modern/src/modern_contact.cpp @@ -161,7 +161,7 @@ INT_PTR SetUseGroups(WPARAM wParam, LPARAM) if (!newVal == (int)wParam) return 0; newVal = wParam; } - g_plugin.setByte("UseGroups", (BYTE)newVal); + Clist::UseGroups = newVal; SendMessage(g_clistApi.hwndContactTree, CLM_SETUSEGROUPS, newVal, 0); return 0; } diff --git a/plugins/Clist_modern/src/modern_defsettings.h b/plugins/Clist_modern/src/modern_defsettings.h index cd0eba1616..979baa5aee 100644 --- a/plugins/Clist_modern/src/modern_defsettings.h +++ b/plugins/Clist_modern/src/modern_defsettings.h @@ -33,9 +33,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SETTING_TOOLWINDOW_DEFAULT 1 #define SETTING_ONTOP_DEFAULT 1 #define SETTING_MIN2TRAY_DEFAULT 1 -#define SETTING_HIDEOFFLINE_DEFAULT 0 -#define SETTING_HIDEEMPTYGROUPS_DEFAULT 0 -#define SETTING_USEGROUPS_DEFAULT 1 #define SETTING_PLACEOFFLINETOROOT_DEFAULT 0 #define SETTING_DISABLETRAYFLASH_DEFAULT 0 #define SETTING_ICONFLASHTIME_DEFAULT 550 @@ -198,7 +195,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SETTING_TRANSPARENT_DEFAULT 0 #define SETTING_AUTOALPHA_DEFAULT 150 -#define SETTING_CONFIRMDELETE_DEFAULT 1 #define SETTING_AUTOHIDE_DEFAULT 0 #define SETTING_HIDETIME_DEFAULT 30 #define SETTING_CYCLETIME_DEFAULT 4 diff --git a/plugins/Clist_modern/src/modern_static_clui.h b/plugins/Clist_modern/src/modern_static_clui.h index ca1640adcf..3f43e68804 100644 --- a/plugins/Clist_modern/src/modern_static_clui.h +++ b/plugins/Clist_modern/src/modern_static_clui.h @@ -54,7 +54,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* Declaration of prototypes in other modules */ -int ClcUnloadModule(); int ClcEnterDragToScroll(HWND hwnd, int Y); int CListMod_ContactListShutdownProc(WPARAM wParam, LPARAM lParam); diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp index 69d26cc069..e62ca8db61 100644 --- a/plugins/Clist_modern/src/modern_toolbar.cpp +++ b/plugins/Clist_modern/src/modern_toolbar.cpp @@ -85,8 +85,8 @@ void Modern_InitButtons() BTNS[i].hButton = g_plugin.addTTB(&tbb); } - SetButtonPressed(3, g_plugin.getByte("HideOffline", SETTING_HIDEOFFLINE_DEFAULT)); - SetButtonPressed(6, g_plugin.getByte("UseGroups", SETTING_USEGROUPS_DEFAULT)); + SetButtonPressed(3, Clist::HideOffline); + SetButtonPressed(6, Clist::UseGroups); SetButtonPressed(7, db_get_b(0, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT)); } diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 91d6f2e114..5f52895231 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -1312,7 +1312,7 @@ void ApplyViewMode(const char *szName, bool onlySelector) if (g_CluiData.bFilterEffective & CLVM_FILTER_STATUS) { if (g_CluiData.boldHideOffline == (BYTE)-1) - g_CluiData.boldHideOffline = g_plugin.getByte("HideOffline", SETTING_HIDEOFFLINE_DEFAULT); + g_CluiData.boldHideOffline = Clist::HideOffline; g_clistApi.pfnSetHideOffline(false); } @@ -1329,7 +1329,7 @@ void ApplyViewMode(const char *szName, bool onlySelector) if (bUseGroups != -1) { if (g_CluiData.bOldUseGroups == (BYTE)-1) - g_CluiData.bOldUseGroups = g_plugin.getByte("UseGroups", SETTING_USEGROUPS_DEFAULT); + g_CluiData.bOldUseGroups = Clist::UseGroups; CallService(MS_CLIST_SETUSEGROUPS, bUseGroups, 0); } diff --git a/plugins/Clist_modern/src/resource.h b/plugins/Clist_modern/src/resource.h index ddaf7b5b40..527d5a1309 100644 --- a/plugins/Clist_modern/src/resource.h +++ b/plugins/Clist_modern/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. -// Used by ..\res\resource.rc +// Used by w:\miranda-ng\plugins\Clist_modern\res\resource.rc // #define IDC_ALWAYS_VISIBLEICON 0 #define IDC_APPLY 3 @@ -114,14 +114,10 @@ #define IDC_TOOLWND 1097 #define IDC_ONECLK 1098 #define IDC_SHOWCAPTION 1098 -#define IDC_HIDEOFFLINE 1099 -#define IDC_HIDEEMPTYGROUPS 1100 #define IDC_FADEINOUT 1101 #define IDC_AUTOSIZE 1102 -#define IDC_DISABLEGROUPS 1102 #define IDC_AUTOSIZEUPWARD 1103 #define IDC_ALWAYSSTATUS 1103 -#define IDC_CONFIRMDELETE 1104 #define IDC_LOCKSIZING 1111 #define IDC_TRANSPARENT 1124 #define IDC_TRANSINACTIVE 1126 @@ -496,7 +492,7 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 511 +#define _APS_NEXT_RESOURCE_VALUE 512 #define _APS_NEXT_COMMAND_VALUE 40022 #define _APS_NEXT_CONTROL_VALUE 2025 #define _APS_NEXT_SYMED_VALUE 101 diff --git a/plugins/Clist_nicer/clist_nicer.vcxproj b/plugins/Clist_nicer/clist_nicer.vcxproj index 5ce4a6fb8b..9544f8e18b 100644 --- a/plugins/Clist_nicer/clist_nicer.vcxproj +++ b/plugins/Clist_nicer/clist_nicer.vcxproj @@ -18,6 +18,40 @@ x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Clist_nicer {3C42510C-A29E-4A53-899C-203BFA874E0B} diff --git a/plugins/Clist_nicer/clist_nicer.vcxproj.filters b/plugins/Clist_nicer/clist_nicer.vcxproj.filters index 7ef90967de..382996ad02 100644 --- a/plugins/Clist_nicer/clist_nicer.vcxproj.filters +++ b/plugins/Clist_nicer/clist_nicer.vcxproj.filters @@ -5,14 +5,379 @@ Header Files - + Source Files + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Resource Files - + + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + Resource Files + + + + + Resource Files + + + Resource Files + + Resource Files - + \ No newline at end of file diff --git a/plugins/Clist_nicer/res/resource.rc b/plugins/Clist_nicer/res/resource.rc index 7f4918c797..b9b57d1b32 100644 --- a/plugins/Clist_nicer/res/resource.rc +++ b/plugins/Clist_nicer/res/resource.rc @@ -53,46 +53,41 @@ BEGIN LTEXT "This will erase all history and settings for this contact!",IDC_STATIC,7,18,239,16 END -IDD_OPT_CLIST DIALOGEX 0, 0, 305, 226 +IDD_OPT_CLIST DIALOGEX 0, 0, 305, 209 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - GROUPBOX "Contact list",IDC_STCLISTGROUP,1,0,163,91 - CONTROL "Hide offline users",IDC_HIDEOFFLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,12,147,10 - CONTROL "Hide empty groups",IDC_HIDEEMPTYGROUPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,25,147,10 - CONTROL "Disable groups",IDC_DISABLEGROUPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,38,147,10 - CONTROL "Ask before deleting contacts",IDC_CONFIRMDELETE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,51,147,10 - CONTROL "Disable icon blinking",IDC_ICONBLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,64,147,10 + GROUPBOX "Contact list",IDC_STCLISTGROUP,1,0,301,67 + CONTROL "Disable icon blinking",IDC_ICONBLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,38,147,10 CONTROL "Apply last active view mode",IDC_APPLYLASTVIEWMODE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,77,147,10 - GROUPBOX "Contact list layout",IDC_STATIC,169,0,133,91 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,51,147,10 CONTROL "Show menu and status buttons",IDC_SHOWBOTTOMBUTTONS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,176,12,121,10 - CONTROL "Draw sunken edge",IDC_CLISTSUNKEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,176,25,121,10 - GROUPBOX "System tray icon",IDC_STATIC,1,91,163,63 - CONTROL "Single click interface",IDC_ONECLK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,101,147,10 - CONTROL "Always show status in tooltip",IDC_ALWAYSSTATUS,"Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,10,113,147,10 - CONTROL "Disable icon blinking",IDC_DISABLEBLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,125,147,10 - EDITTEXT IDC_BLINKTIME,69,136,57,12,ES_RIGHT | ES_NUMBER - CONTROL "Spin5",IDC_BLINKSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,110,134,11,16 - LTEXT "ms",IDC_STATIC,131,138,24,8 - GROUPBOX "Event area",IDC_STATIC,169,91,133,63 - LTEXT "Set base visibility on the frames menu",IDC_STATIC,176,102,121,20 - CONTROL "Auto mode",IDC_EVENTAREAAUTOHIDE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,176,125,121,10 - CONTROL "Draw sunken edge",IDC_EVENTAREASUNKEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,176,138,121,10 - GROUPBOX "System tray icon when using multiple protocols",IDC_STATIC,1,154,302,71 - CONTROL "Show",IDC_DONTCYCLE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,10,166,92,10 - COMBOBOX IDC_PRIMARYSTATUS,107,165,78,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "icon when statuses differ",IDC_STATIC,189,167,113,8,NOT WS_GROUP - CONTROL "Cycle icons every",IDC_CYCLE,"Button",BS_AUTORADIOBUTTON,10,180,92,10 - EDITTEXT IDC_CYCLETIME,107,180,30,12,ES_RIGHT | ES_NUMBER - CONTROL "Spin1",IDC_CYCLETIMESPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,126,179,10,14 - LTEXT "seconds, when statuses differ",IDC_STATIC,140,182,155,8,NOT WS_GROUP - CONTROL "Show multiple icons",IDC_MULTITRAY,"Button",BS_AUTORADIOBUTTON,10,194,92,10 - CONTROL "Only when statuses differ",IDC_ALWAYSMULTI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,194,186,10 + "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,69,163,63 + CONTROL "Single click interface",IDC_ONECLK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,79,147,10 + CONTROL "Always show status in tooltip",IDC_ALWAYSSTATUS,"Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,10,91,147,10 + CONTROL "Disable icon blinking",IDC_DISABLEBLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,103,147,10 + EDITTEXT IDC_BLINKTIME,69,114,57,12,ES_RIGHT | ES_NUMBER + CONTROL "Spin5",IDC_BLINKSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,119,113,11,16 + LTEXT "ms",IDC_STATIC,131,116,24,8 + GROUPBOX "Event area",IDC_STATIC,169,69,133,63 + LTEXT "Set base visibility on the frames menu",IDC_STATIC,176,80,121,20 + CONTROL "Auto mode",IDC_EVENTAREAAUTOHIDE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,176,103,121,10 + CONTROL "Draw sunken edge",IDC_EVENTAREASUNKEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,176,116,121,10 + GROUPBOX "System tray icon when using multiple protocols",IDC_STATIC,1,135,302,71 + CONTROL "Show",IDC_DONTCYCLE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,10,147,92,10 + COMBOBOX IDC_PRIMARYSTATUS,107,146,78,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "icon when statuses differ",IDC_STATIC,189,148,113,8,NOT WS_GROUP + CONTROL "Cycle icons every",IDC_CYCLE,"Button",BS_AUTORADIOBUTTON,10,161,92,10 + EDITTEXT IDC_CYCLETIME,107,161,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,163,155,8,NOT WS_GROUP + CONTROL "Show multiple icons",IDC_MULTITRAY,"Button",BS_AUTORADIOBUTTON,10,175,92,10 + CONTROL "Only when statuses differ",IDC_ALWAYSMULTI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,175,186,10 CONTROL "Do not show system tray icon tooltips on mouse over",IDC_NOTRAYINFOTIPS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,208,284,12 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,189,284,12 END IDD_OPT_DSPGROUPS DIALOGEX 0, 0, 305, 205 @@ -443,6 +438,7 @@ BEGIN PUSHBUTTON "Export to skin file",IDC_EXPORT,19,229,125,15 END + #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // diff --git a/plugins/Clist_nicer/src/CLCButton.cpp b/plugins/Clist_nicer/src/CLCButton.cpp index 38bb6e0e2d..aefe2bb6bf 100644 --- a/plugins/Clist_nicer/src/CLCButton.cpp +++ b/plugins/Clist_nicer/src/CLCButton.cpp @@ -32,7 +32,7 @@ struct CluiTopButton BTNS[] = { IDC_TBFINDANDADD, "CLN_findadd", nullptr, LPGEN("Find and add contacts"), 1, 1, 0 }, { IDC_TBACCOUNTS, "CLN_accounts", nullptr, LPGEN("Accounts"), 1, 1, 0 }, { IDC_TBOPTIONS, "CLN_options", nullptr, LPGEN("Open preferences"), 1, 1, 0 }, - { IDC_TBSOUND, "CLN_sound", "CLN_soundsoff", LPGEN("Enable/Disable sounds"), 0, 1, 0 }, + { IDC_TBSOUND, "CLN_sound", "CLN_soundsoff", LPGEN("Enable/Disable sounds"), 0, 1, 0 }, { IDC_TBMINIMIZE, "CLN_minimize", nullptr, LPGEN("Minimize contact list"), 1, 0, 0 }, { IDC_TBTOPSTATUS, "CLN_topstatus", nullptr, LPGEN("Status menu"), 1, 0, 1 }, @@ -65,8 +65,8 @@ static void InitDefaultButtons() } g_index = -1; - ClcSetButtonState(IDC_TBHIDEOFFLINE, g_plugin.getByte("HideOffline", SETTING_HIDEOFFLINE_DEFAULT)); - ClcSetButtonState(IDC_TBHIDEGROUPS, g_plugin.getByte("UseGroups", SETTING_USEGROUPS_DEFAULT)); + ClcSetButtonState(IDC_TBHIDEOFFLINE, Clist::HideOffline); + ClcSetButtonState(IDC_TBHIDEGROUPS, Clist::UseGroups); ClcSetButtonState(IDC_TBSOUND, db_get_b(0, "Skin", "UseSound", 1) ? BST_UNCHECKED : BST_CHECKED); } diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index d95f6edce2..b74caf29f5 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -133,7 +133,7 @@ static int ClcSettingChanged(WPARAM hContact, LPARAM lParam) if (!__strcmp(cws->szSetting, "Status")) { if (!Contact_IsHidden(hContact)) if (cws->value.wVal == ID_STATUS_OFFLINE) - if (g_plugin.getByte("HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) + if (Clist::HideOffline) return 0; SendMessage(g_clistApi.hwndContactTree, INTM_STATUSCHANGED, hContact, lParam); @@ -161,7 +161,7 @@ static int ClcSettingChanged(WPARAM hContact, LPARAM lParam) SetButtonStates(); } else if (!__strcmp(cws->szModule, "CList") && !__strcmp(cws->szSetting, "UseGroups")) { - ClcSetButtonState(IDC_TBHIDEGROUPS, db_get_b(0, cws->szModule, cws->szSetting, SETTING_USEGROUPS_DEFAULT)); + ClcSetButtonState(IDC_TBHIDEGROUPS, cws->value.bVal); SetButtonStates(); } else if (!__strcmp(cws->szModule, "TopToolBar") && !__strcmp(cws->szSetting, "UseFlatButton")) { diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index cca420dd0a..9aefd129fe 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -34,27 +34,9 @@ static void __setFlag(DWORD dwFlag, int iMode) INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { - case WM_USER + 1: - { - MCONTACT hContact = 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: opt_gen_opts_changed = 0; 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_CONFIRMDELETE, g_plugin.getByte("ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_SHOWBOTTOMBUTTONS, cfg::dat.dwFlags & CLUI_FRAME_SHOWBOTTOMBUTTONS ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_CLISTSUNKEN, cfg::dat.dwFlags & CLUI_FRAME_CLISTSUNKEN ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_EVENTAREAAUTOHIDE, cfg::dat.dwFlags & CLUI_FRAME_AUTOHIDENOTIFY ? BST_CHECKED : BST_UNCHECKED); @@ -135,10 +117,6 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (!opt_gen_opts_changed) return TRUE; - g_plugin.setByte("HideOffline", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDEOFFLINE)); - g_plugin.setByte("HideEmptyGroups", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDEEMPTYGROUPS)); - g_plugin.setByte("UseGroups", (BYTE)BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DISABLEGROUPS)); - 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)BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_ALWAYSMULTI)); diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index a1d45b2638..58c9ccfc3a 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -160,11 +160,7 @@ static int FS_FontsChanged(WPARAM, LPARAM) static HWND PreCreateCLC(HWND parent) { g_clistApi.hwndContactTree = CreateWindow(CLISTCONTROL_CLASSW, L"", - WS_CHILD | CLS_CONTACTLIST - | (g_plugin.getByte("UseGroups", SETTING_USEGROUPS_DEFAULT) ? CLS_USEGROUPS : 0) - | (g_plugin.getByte("HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? CLS_HIDEOFFLINE : 0) - | (g_plugin.getByte("HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) ? CLS_HIDEEMPTYGROUPS : 0) - | CLS_MULTICOLUMN, + WS_CHILD | CLS_CONTACTLIST | (Clist::UseGroups ? CLS_USEGROUPS : 0) | (Clist::HideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::HideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0) | CLS_MULTICOLUMN, 0, 0, 0, 0, parent, nullptr, g_plugin.getInst(), (LPVOID)0xff00ff00); cfg::clcdat = (struct ClcData *)GetWindowLongPtr(g_clistApi.hwndContactTree, 0); @@ -450,10 +446,10 @@ void SetButtonStates() SendMessage(buttonItem->hWnd, BM_SETCHECK, cfg::dat.soundsOff ? BST_CHECKED : BST_UNCHECKED, 0); break; case IDC_STBHIDEOFFLINE: - SendMessage(buttonItem->hWnd, BM_SETCHECK, g_plugin.getByte("HideOffline", 0) ? BST_CHECKED : BST_UNCHECKED, 0); + SendMessage(buttonItem->hWnd, BM_SETCHECK, Clist::HideOffline, 0); break; case IDC_STBHIDEGROUPS: - SendMessage(buttonItem->hWnd, BM_SETCHECK, g_plugin.getByte("UseGroups", 0) ? BST_CHECKED : BST_UNCHECKED, 0); + SendMessage(buttonItem->hWnd, BM_SETCHECK, Clist::UseGroups, 0); break; } } @@ -1816,7 +1812,7 @@ void LoadCLUIModule(void) wndclass.lpszClassName = L"EventAreaClass"; RegisterClass(&wndclass); - oldhideoffline = g_plugin.getByte("HideOffline", SETTING_HIDEOFFLINE_DEFAULT); + oldhideoffline = Clist::HideOffline; cluiPos.left = g_plugin.getDword("x", 600); cluiPos.top = g_plugin.getDword("y", 200); cluiPos.right = g_plugin.getDword("Width", 150); diff --git a/plugins/Clist_nicer/src/resource.h b/plugins/Clist_nicer/src/resource.h index c530f2f768..ab925ce8cd 100644 --- a/plugins/Clist_nicer/src/resource.h +++ b/plugins/Clist_nicer/src/resource.h @@ -50,12 +50,10 @@ #define IDC_LASTMSG 1023 #define IDC_IGN_AUTH 1023 #define IDC_IGN_ADD 1024 -#define IDC_CONFIRMDELETE 1025 #define IDC_IGN_ONLINE 1025 #define IDC_IGN_ALWAYSONLINE 1026 #define IDC_IGN_ALWAYSOFFLINE 1027 #define IDC_IGN_PRIORITY 1028 -#define IDC_DISABLEGROUPS 1030 #define IDC_DROPSHADOW 1035 #define IDC_EQUALSELECTION 1040 #define IDC_USEPERPROTO 1041 @@ -79,12 +77,10 @@ #define IDC_ONTOP 1074 #define IDC_SHOWMAINMENU 1075 #define IDC_CLIENTDRAG 1076 -#define IDC_HIDEEMPTYGROUPS 1077 #define IDC_CTOPSPIN 1077 #define IDC_CBOTTOM 1078 #define IDC_CBOTTOMSPIN 1079 #define IDC_CRIGHT 1080 -#define IDC_HIDEOFFLINE 1081 #define IDC_CRIGHTSPIN 1081 #define IDC_HIDEOFFLINEOPTS 1082 #define IDC_LEFTMARGINSPIN 1092 diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index cc4ffe31a9..8b05e1ef22 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -1100,7 +1100,7 @@ void ApplyViewMode(const char *name) cfg::dat.bFilterEffective |= CLVM_STICKY_CONTACTS; if (cfg::dat.boldHideOffline == (BYTE)-1) - cfg::dat.boldHideOffline = g_plugin.getByte("HideOffline", 0); + cfg::dat.boldHideOffline = Clist::HideOffline; g_clistApi.pfnSetHideOffline(false); if (name == nullptr) { diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index c082aca4b7..f53fbfe44a 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -200,10 +200,7 @@ static void SetAllContactChecks(HWND hwndList, MCONTACT hReceiver) // doubtful n if (szProto == nullptr) return; - if (db_get_b(0, "CList", "HideEmptyGroups", SETTING_USEGROUPS_DEFAULT)) - SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, TRUE, 0); - else - SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, FALSE, 0); + SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, Clist::HideEmptyGroups, 0); MCONTACT hItem, hContact = FindFirstClistContact(hwndList, &hItem); while (hContact) { diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index d9f654c03e..21b26e0de2 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -806,7 +806,7 @@ public: void onResetClist(CCtrlClc *) { - m_list.SetUseGroups(db_get_b(0, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT)); + m_list.SetUseGroups(Clist::UseGroups); m_list.SetHideEmptyGroups(true); } }; diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp index 12d8cf5234..1c21c710f9 100644 --- a/plugins/ShellExt/src/shlcom.cpp +++ b/plugins/ShellExt/src/shlcom.cpp @@ -235,7 +235,7 @@ void ipcGetSkinIcons(THeaderIPC * ipch) bool ipcGetSortedContacts(THeaderIPC * ipch, int* pSlot, bool bGroupMode) { // hide offliners? - bool bHideOffline = db_get_b(0, "CList", "HideOffline", 0) == 1; + bool bHideOffline = Clist::HideOffline; // do they wanna hide the offline people anyway? if (g_plugin.getByte(SHLExt_ShowNoOffline, 0) == 1) // hide offline people @@ -412,7 +412,7 @@ void __stdcall ipcService(ULONG_PTR) // if the group mode is on, check if they want the CList setting bool bGroupMode = (BST_CHECKED == g_plugin.getByte(SHLExt_UseGroups, BST_UNCHECKED)); if (bGroupMode && BST_CHECKED == g_plugin.getByte(SHLExt_UseCListSetting, BST_UNCHECKED)) - bGroupMode = db_get_b(0, "CList", "UseGroups", true) != 0; + bGroupMode = Clist::UseGroups; TSlotIPC * pct = nullptr; int iSlot = 0; diff --git a/plugins/ShellExt/src/stdafx.h b/plugins/ShellExt/src/stdafx.h index 16c08b3fc1..a40ae5dee1 100644 --- a/plugins/ShellExt/src/stdafx.h +++ b/plugins/ShellExt/src/stdafx.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/plugins/StopSpamMod/src/stdafx.h b/plugins/StopSpamMod/src/stdafx.h index 011161651a..3a7e043ae4 100755 --- a/plugins/StopSpamMod/src/stdafx.h +++ b/plugins/StopSpamMod/src/stdafx.h @@ -19,7 +19,7 @@ using namespace std; #include #include #include -#include +#include #include #include #include diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp index 6e1ee82c2d..43d6c6a6a0 100755 --- a/plugins/StopSpamMod/src/utilities.cpp +++ b/plugins/StopSpamMod/src/utilities.cpp @@ -67,7 +67,7 @@ bool ProtoInList(const char *szProto) void DeleteCListGroupsByName(wchar_t* szGroupName) { - BYTE ConfirmDelete = db_get_b(0, "CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT); + BYTE ConfirmDelete = Clist::ConfirmDelete; if (ConfirmDelete) db_set_b(0, "CList", "ConfirmDelete", 0); diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp index 8aa5200f25..c1e142f080 100644 --- a/plugins/StopSpamPlus/src/services.cpp +++ b/plugins/StopSpamPlus/src/services.cpp @@ -51,7 +51,7 @@ INT_PTR RemoveTempContacts(WPARAM, LPARAM lParam) do { group_name = Clist_GroupGetName(hGroup, nullptr); if (group_name != nullptr && wcsstr(group_name, TranslateT("Not In List"))) { - BYTE ConfirmDelete = db_get_b(0, "CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT); + BYTE ConfirmDelete = Clist::ConfirmDelete; if (ConfirmDelete) db_set_b(0, "CList", "ConfirmDelete", 0); diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 794f214921..499a0883fb 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -712,8 +712,8 @@ HWND CMsgDialog::DM_CreateClist() if (hItem) SendMessage(hwndClist, CLM_SETCHECKMARK, (WPARAM)hItem, 1); - SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, db_get_b(0, "CList", "HideEmptyGroups", SETTING_USEGROUPS_DEFAULT), 0); - SendMessage(hwndClist, CLM_SETUSEGROUPS, db_get_b(0, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT), 0); + SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, Clist::HideEmptyGroups, 0); + SendMessage(hwndClist, CLM_SETUSEGROUPS, Clist::UseGroups, 0); SendMessage(hwndClist, CLM_FIRST + 106, 0, 1); SendMessage(hwndClist, CLM_AUTOREBUILD, 0, 0); if (hwndClist) diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index ae4f5ca3a7..86fd0918b4 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -746,10 +746,7 @@ class COptTypingDlg : public CDlgBase void ResetCList() { - if (!db_get_b(0, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT)) - SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_SETUSEGROUPS, FALSE, 0); - else - SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_SETUSEGROUPS, TRUE, 0); + SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_SETUSEGROUPS, Clist::UseGroups, 0); SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0); } diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index d075a8c88d..b35980d456 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -1877,7 +1877,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam, TranslateDialogDefault(hwndDlg); SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0); - SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, db_get_b(0, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT), 0); + SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, Clist::UseGroups, 0); SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0); SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0); diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index 6a3855746e..1e9177063f 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -692,7 +692,7 @@ BOOL CTooltipNotify::ProtosDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM) void CTooltipNotify::ResetCList(HWND hwndDlg) { - SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, db_get_b(0, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT), 0); + SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, Clist::UseGroups, 0); SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0); } diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp index 012b96bcc1..71b571f8df 100644 --- a/plugins/TopToolBar/src/InternalButtons.cpp +++ b/plugins/TopToolBar/src/InternalButtons.cpp @@ -158,11 +158,8 @@ void InitInternalButtons() ttb.hIconHandleUp = Skin_GetIconHandle(SKINICON_OTHER_EXIT); hExit = g_plugin.addTTB(&ttb); - CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hShowHideOffline, - db_get_b(0, "CList", "HideOffline", 0) ? 0 : TTBST_PUSHED); - - CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hGroups, - db_get_b(0, "CList", "UseGroups", 1) ? TTBST_PUSHED : 0); + CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hShowHideOffline, Clist::HideOffline ? 0 : TTBST_PUSHED); + CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hGroups, Clist::UseGroups ? TTBST_PUSHED : 0); CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hSounds, db_get_b(0, "Skin", "UseSound", 1) ? TTBST_PUSHED : 0); diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp index 4999207416..4eece0aa35 100644 --- a/plugins/Variables/src/help.cpp +++ b/plugins/Variables/src/help.cpp @@ -91,7 +91,7 @@ static INT_PTR CALLBACK extratextDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPA // dialog box for the %subject% selection void ResetCList(HWND hwndDlg) { - SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, db_get_b(0, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT), 0); + SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, Clist::UseGroups, 0); SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0); } diff --git a/plugins/Variables/src/stdafx.h b/plugins/Variables/src/stdafx.h index eafbd6c219..c124a6df5b 100644 --- a/plugins/Variables/src/stdafx.h +++ b/plugins/Variables/src/stdafx.h @@ -37,7 +37,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include -#include +#include #include #include #include -- cgit v1.2.3