summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_clist.h4
-rw-r--r--include/m_clistint.h11
-rw-r--r--libs/win32/mir_app.libbin202754 -> 204038 bytes
-rw-r--r--libs/win64/mir_app.libbin198380 -> 199664 bytes
-rw-r--r--plugins/Clist_blind/res/resource.rc43
-rw-r--r--plugins/Clist_blind/src/clistopts.cpp23
-rw-r--r--plugins/Clist_blind/src/resource.h10
-rw-r--r--plugins/Clist_modern/res/resource.rc36
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp49
-rw-r--r--plugins/Clist_modern/src/modern_clistopts.cpp1
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp11
-rw-r--r--plugins/Clist_modern/src/modern_contact.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_defsettings.h4
-rw-r--r--plugins/Clist_modern/src/modern_static_clui.h1
-rw-r--r--plugins/Clist_modern/src/modern_toolbar.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp4
-rw-r--r--plugins/Clist_modern/src/resource.h8
-rw-r--r--plugins/Clist_nicer/clist_nicer.vcxproj34
-rw-r--r--plugins/Clist_nicer/clist_nicer.vcxproj.filters371
-rw-r--r--plugins/Clist_nicer/res/resource.rc62
-rw-r--r--plugins/Clist_nicer/src/CLCButton.cpp6
-rw-r--r--plugins/Clist_nicer/src/clc.cpp4
-rw-r--r--plugins/Clist_nicer/src/clistopts.cpp22
-rw-r--r--plugins/Clist_nicer/src/clui.cpp12
-rw-r--r--plugins/Clist_nicer/src/resource.h4
-rw-r--r--plugins/Clist_nicer/src/viewmodes.cpp2
-rw-r--r--plugins/ContactsPlus/src/send.cpp5
-rw-r--r--plugins/Scriver/src/msgoptions.cpp2
-rw-r--r--plugins/ShellExt/src/shlcom.cpp4
-rw-r--r--plugins/ShellExt/src/stdafx.h1
-rwxr-xr-xplugins/StopSpamMod/src/stdafx.h2
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp2
-rw-r--r--plugins/StopSpamPlus/src/services.cpp2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp4
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp5
-rw-r--r--plugins/TipperYM/src/options.cpp2
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp2
-rw-r--r--plugins/TopToolBar/src/InternalButtons.cpp7
-rw-r--r--plugins/Variables/src/help.cpp2
-rw-r--r--plugins/Variables/src/stdafx.h2
-rw-r--r--src/core/stdclist/res/resource.rc27
-rw-r--r--src/core/stdclist/src/clistopts.cpp29
-rw-r--r--src/core/stdclist/src/resource.h8
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp2
-rw-r--r--src/mir_app/res/resource.rc22
-rw-r--r--src/mir_app/src/clc.h55
-rw-r--r--src/mir_app/src/clistgroups.cpp2
-rw-r--r--src/mir_app/src/clistmod.cpp97
-rw-r--r--src/mir_app/src/clistopts.cpp74
-rw-r--r--src/mir_app/src/clui.cpp10
-rw-r--r--src/mir_app/src/cluiservices.cpp12
-rw-r--r--src/mir_app/src/contact.cpp6
-rw-r--r--src/mir_app/src/menu_groups.cpp4
-rw-r--r--src/mir_app/src/mir_app.def4
-rw-r--r--src/mir_app/src/mir_app64.def4
-rw-r--r--src/mir_app/src/resource.h14
58 files changed, 786 insertions, 360 deletions
diff --git a/include/m_clist.h b/include/m_clist.h
index 639b9487a5..11f1449b7a 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -539,15 +539,11 @@ EXTERN_C MIR_APP_DLL(int) Clist_TrayNotifyW(const char *szProto, const wchar_t *
#define SETTING_ONTOP_DEFAULT 1
#define SETTING_MIN2TRAY_DEFAULT 1
#define SETTING_TRAY1CLICK_DEFAULT (IsWinVer7Plus()?1:0)
-#define SETTING_HIDEOFFLINE_DEFAULT 0
-#define SETTING_HIDEEMPTYGROUPS_DEFAULT 0
-#define SETTING_USEGROUPS_DEFAULT 1
#define SETTING_SORTBYSTATUS_DEFAULT 0
#define SETTING_SORTBYPROTO_DEFAULT 0
#define SETTING_TRANSPARENT_DEFAULT 0
#define SETTING_ALPHA_DEFAULT 200
#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/include/m_clistint.h b/include/m_clistint.h
index a547640439..7135d8eebe 100644
--- a/include/m_clistint.h
+++ b/include/m_clistint.h
@@ -34,6 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_system.h>
#include <m_protocols.h>
#include <m_clc.h>
+#include <m_gui.h>
#define HCONTACT_ISGROUP 0x80000000
#define HCONTACT_ISINFO 0xFFFF0000
@@ -442,4 +443,14 @@ EXTERN_C MIR_APP_DLL(CLIST_INTERFACE*) Clist_GetInterface(void);
extern MIR_APP_EXPORT CLIST_INTERFACE g_clistApi;
+namespace Clist
+{
+ extern MIR_APP_EXPORT CMOption<bool>
+ HideOffline,
+ UseGroups,
+ HideEmptyGroups,
+ ConfirmDelete,
+ RemoveTempContacts;
+};
+
#endif // M_CLISTINT_H__
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index c49d5d9c83..925d0d406b 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index ecf7ebebad..f38bdbfa33 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
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 @@
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
+ <ItemGroup>
+ <Image Include="..\..\src\mir_app\res\_blank.ico" />
+ <Image Include="res\accounts.ico" />
+ <Image Include="res\arrow-down.ico" />
+ <Image Include="res\clist.ico" />
+ <Image Include="res\connecting.ico" />
+ <Image Include="res\delete.ico" />
+ <Image Include="res\find.ico" />
+ <Image Include="res\groups.ico" />
+ <Image Include="res\menu.ico" />
+ <Image Include="res\minimize.ico" />
+ <Image Include="res\online.ico" />
+ <Image Include="res\options.ico" />
+ <Image Include="res\options_clvm.ico" />
+ <Image Include="res\overlay\away.ico" />
+ <Image Include="res\overlay\dnd.ico" />
+ <Image Include="res\overlay\invisible.ico" />
+ <Image Include="res\overlay\na.ico" />
+ <Image Include="res\overlay\occupied.ico" />
+ <Image Include="res\overlay\offline.ico" />
+ <Image Include="res\overlay\online.ico" />
+ <Image Include="res\slist.ico" />
+ <Image Include="res\sounds_off.ico" />
+ <Image Include="res\sounds_on.ico" />
+ <Image Include="res\tabsrmm_menu.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\src\mir_app\res\cursor_drag_copy.cur" />
+ <None Include="..\..\src\mir_app\res\cursor_drop_user.cur" />
+ <None Include="..\..\src\mir_app\res\cursor_hyperlink.cur" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\include\resource.h" />
+ </ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>Clist_nicer</ProjectName>
<ProjectGuid>{3C42510C-A29E-4A53-899C-203BFA874E0B}</ProjectGuid>
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 @@
<ClInclude Include="src\*.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClCompile Include="src\*.cpp;src\*.cxx">
+ <ClCompile Include="src\clc.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="src\CLCButton.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\clcitems.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\clcmsgs.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\clcopts.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\clcpaint.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\clcutils.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\clistevents.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\clistmenus.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\clistmod.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\clistopts.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\clistsettings.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\clisttray.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\clnplus.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\clui.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\cluiframes.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\cluiopts.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\cluiservices.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\config.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\contact.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\coolsblib.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\coolscroll.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Docking.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\extBackg.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\groupmenu.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\init.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\rowheight_funcs.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\statusbar.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\viewmodes.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\wallpaper.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\stdafx.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ResourceCompile Include="res\*.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <None Include="res\arrow-down.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\clist.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\connecting.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\delete.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\find.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\groups.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\menu.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\minimize.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\online.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\options.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\options_clvm.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\rename.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\slist.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\sounds_off.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\sounds_on.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\tabsrmm_menu.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <ClInclude Include="src\*.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\*.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\*.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\*.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\*.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\*.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\*.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\*.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\*.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\*.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\*.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\*.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\*.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\include\resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\stdafx.cxx">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\*.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
<ResourceCompile Include="res\*.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
- <None Include="res\*.ico;res\*.bmp;res\*.cur">
+ </ItemGroup>
+ <ItemGroup>
+ <Image Include="res\clist.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\delete.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\options_clvm.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\arrow-down.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="..\..\src\mir_app\res\_blank.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\overlay\offline.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\overlay\online.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\overlay\away.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\overlay\dnd.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\overlay\na.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\overlay\occupied.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\overlay\invisible.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\online.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\groups.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\sounds_on.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\find.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\options.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\minimize.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\sounds_off.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\slist.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\tabsrmm_menu.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\connecting.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\menu.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ <Image Include="res\accounts.ico">
+ <Filter>Resource Files</Filter>
+ </Image>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\src\mir_app\res\cursor_hyperlink.cur">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\..\src\mir_app\res\cursor_drag_copy.cur">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="..\..\src\mir_app\res\cursor_drop_user.cur">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
-</Project>
+</Project> \ 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 <stddef.h>
#include <newpluginapi.h>
+#include <m_clistint.h>
#include <m_contacts.h>
#include <m_protocols.h>
#include <m_protosvc.h>
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 <m_protosvc.h>
#include <m_options.h>
#include <m_langpack.h>
-#include <m_clist.h>
+#include <m_clistint.h>
#include <m_skin.h>
#include <m_contacts.h>
#include <m_system.h>
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 <m_langpack.h>
#include <m_database.h>
#include <m_protosvc.h>
-#include <m_clist.h>
+#include <m_clistint.h>
#include <m_contacts.h>
#include <m_options.h>
#include <m_icolib.h>
diff --git a/src/core/stdclist/res/resource.rc b/src/core/stdclist/res/resource.rc
index 0b367c5e78..c20cb6bfb6 100644
--- a/src/core/stdclist/res/resource.rc
+++ b/src/core/stdclist/res/resource.rc
@@ -15,13 +15,11 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
-#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
@@ -48,10 +46,6 @@ 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
@@ -74,7 +68,7 @@ BEGIN
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
CONTROL "Spin5",IDC_BLINKSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,173,97,11,21
- CONTROL "Disable icon blinking",IDC_ICONBLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,84,97,10
+ CONTROL "Disable icon blinking",IDC_ICONBLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,15,97,10
END
IDD_OPT_CLUI DIALOGEX 0, 0, 313, 245
@@ -222,7 +216,7 @@ END
//
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
+GUIDELINES DESIGNINFO
BEGIN
IDD_DELETECONTACT, DIALOG
BEGIN
@@ -344,10 +338,23 @@ END
//
IDC_HYPERLINKHAND CURSOR "hyperlin.cur"
+
IDC_DROP CURSOR "dragcopy.cur"
+
IDC_DROPUSER CURSOR "dropuser.cur"
-#endif // English (U.S.) resources
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// AFX_DIALOG_LAYOUT
+//
+
+IDD_OPT_CLIST AFX_DIALOG_LAYOUT
+BEGIN
+ 0
+END
+
+#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp
index 8f5ac3150f..12b21edb8a 100644
--- a/src/core/stdclist/src/clistopts.cpp
+++ b/src/core/stdclist/src/clistopts.cpp
@@ -27,39 +27,15 @@ 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 = 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);
@@ -146,16 +122,11 @@ 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_bSortByStatus = IsDlgButtonChecked(hwndDlg, IDC_SORTBYSTATUS);
g_bSortByProto = IsDlgButtonChecked(hwndDlg, IDC_SORTBYPROTO);
g_plugin.setByte("SortByStatus", (BYTE)g_bSortByStatus);
g_plugin.setByte("SortByProto", (BYTE)g_bSortByProto);
- 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/src/core/stdclist/src/resource.h b/src/core/stdclist/src/resource.h
index 7315124d9c..92d8716ed6 100644
--- a/src/core/stdclist/src/resource.h
+++ b/src/core/stdclist/src/resource.h
@@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by resource.rc
+// Used by w:\miranda-ng\src\core\stdclist\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
@@ -134,7 +130,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/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index 131862920b..561ef27cf0 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -435,7 +435,7 @@ public:
void ResetCList(CCtrlClc::TEventInfo* = nullptr)
{
- clist.SetUseGroups(db_get_b(0, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT));
+ clist.SetUseGroups(Clist::UseGroups);
clist.SetHideEmptyGroups(1);
}
diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc
index ae65720b51..c3890aec81 100644
--- a/src/mir_app/res/resource.rc
+++ b/src/mir_app/res/resource.rc
@@ -774,6 +774,19 @@ BEGIN
EDITTEXT IDC_CREDITSFILE,4,32,202,67,ES_CENTER | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL
END
+IDD_OPT_CLIST DIALOGEX 0, 0, 302, 202
+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,13,17,124,10
+ CONTROL "Hide empty groups",IDC_HIDEEMPTYGROUPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,29,124,10
+ CONTROL "Enable groups",IDC_USEGROUPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,41,124,10
+ CONTROL "Ask before deleting contacts",IDC_CONFIRMDELETE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,53,124,10
+ GROUPBOX "Contact list",IDC_STATIC,6,5,289,77
+ CONTROL "Remove temporary contacts on exit",IDC_REMOVETEMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,65,276,10
+END
+
IDD_EMPTY DIALOGEX 0, 0, 212, 131
STYLE DS_FIXEDSYS | WS_POPUP
CAPTION "Hidden window"
@@ -1072,6 +1085,10 @@ BEGIN
TOPMARGIN, 7
BOTTOMMARGIN, 126
END
+
+ IDD_OPT_CLIST, DIALOG
+ BEGIN
+ END
END
#endif // APSTUDIO_INVOKED
@@ -1353,6 +1370,11 @@ BEGIN
0
END
+IDD_OPT_CLIST AFX_DIALOG_LAYOUT
+BEGIN
+ 0
+END
+
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h
index a9f97f0044..fc7805ab4a 100644
--- a/src/mir_app/src/clc.h
+++ b/src/mir_app/src/clc.h
@@ -91,7 +91,7 @@ int fnRowHitTest(ClcData *dat, int y);
int GetDropTargetInformation(HWND hwnd, ClcData *dat, POINT pt);
/* clcopts.c */
-int ClcOptInit(WPARAM wParam, LPARAM lParam);
+int ClcOptInit(WPARAM, LPARAM);
/* clistmenus.c */
void RebuildMenuOrder(void);
@@ -107,45 +107,58 @@ void fnCheckCacheItem(ClcCacheEntry *p);
void fnFreeCacheItem(ClcCacheEntry *p);
/* clcfiledrop.c */
-void RegisterFileDropping(HWND hwnd);
-void UnregisterFileDropping(HWND hwnd);
+void RegisterFileDropping(HWND hwnd);
+void UnregisterFileDropping(HWND hwnd);
/* clistevents.c */
struct CListEvent* fnAddEvent(CLISTEVENT *cle);
CLISTEVENT* fnGetEvent(MCONTACT hContact, int idx);
-int fnGetImlIconIndex(HICON hIcon);
-int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent);
+int fnGetImlIconIndex(HICON hIcon);
+int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent);
-int EventsProcessContactDoubleClick(MCONTACT hContact);
+int EventsProcessContactDoubleClick(MCONTACT hContact);
+
+int InitCListEvents(void);
+void UninitCListEvents(void);
+
+/* clistgroups.c */
+int InitGroupServices(void);
+void UninitGroupServices(void);
/* clistmod.c */
-int fnIconFromStatusMode(const char *szProto, int status, MCONTACT hContact);
-int fnShowHide(void);
-HICON fnGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int status);
-int fnGetWindowVisibleState(HWND hWnd, int iStepX, int iStepY);
+int fnIconFromStatusMode(const char *szProto, int status, MCONTACT hContact);
+int fnShowHide(void);
+HICON fnGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int status);
+int fnGetWindowVisibleState(HWND hWnd, int iStepX, int iStepY);
+
+/* clistsettings.cpp */
+int ContactAdded(WPARAM, LPARAM);
+int ContactDeleted(WPARAM, LPARAM);
/* clisttray.c */
extern mir_cs trayLockCS;
-int fnTrayIconInit(HWND hwnd);
-int fnTrayIconPauseAutoHide(WPARAM wParam, LPARAM lParam);
-INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam);
-int fnTrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCount);
+int fnTrayIconInit(HWND hwnd);
+int fnTrayIconPauseAutoHide(WPARAM, LPARAM);
+INT_PTR fnTrayIconProcessMessage(WPARAM, LPARAM);
+int fnTrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoCount);
-void InitTray(void);
-void TrayIconSetToBase(char *szPreferredProto);
-void TrayIconTaskbarCreated(HWND hwnd);
-int TrayIconUpdate(HICON hNewIcon, const wchar_t *szNewTip, const char *szPreferredProto, int isBase);
-void TrayIconUpdateWithImageList(int iImage, const wchar_t *szNewTip, const char *szPreferredProto);
+void InitTray(void);
+void TrayIconSetToBase(char *szPreferredProto);
+void TrayIconTaskbarCreated(HWND hwnd);
+int TrayIconUpdate(HICON hNewIcon, const wchar_t *szNewTip, const char *szPreferredProto, int isBase);
+void TrayIconUpdateWithImageList(int iImage, const wchar_t *szNewTip, const char *szPreferredProto);
/* clui.c */
-LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+LRESULT CALLBACK fnContactListWndProc(HWND, UINT, WPARAM, LPARAM);
void fnLoadCluiGlobalOpts(void);
void fnCluiProtocolStatusChanged(int, const char*);
+int LoadCLUIModule(void);
+
/* contact.c */
-int fnSetHideOffline(int iValue);
+int fnSetHideOffline(int iValue);
/* docking.c */
int fnDocking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam);
diff --git a/src/mir_app/src/clistgroups.cpp b/src/mir_app/src/clistgroups.cpp
index 51b6ecd4c0..4a308edb28 100644
--- a/src/mir_app/src/clistgroups.cpp
+++ b/src/mir_app/src/clistgroups.cpp
@@ -197,7 +197,7 @@ MIR_APP_DLL(int) Clist_GroupDelete(MGROUP hGroup)
if (pGroup == nullptr)
return 1;
- if (db_get_b(0, "CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT)) {
+ if (Clist::ConfirmDelete) {
wchar_t szQuestion[256 + 100];
mir_snwprintf(szQuestion, TranslateT("Are you sure you want to delete group '%s'? This operation cannot be undone."), pGroup->groupName+1);
if (MessageBox(g_clistApi.hwndContactList, szQuestion, TranslateT("Delete group"), MB_YESNO | MB_ICONQUESTION) == IDNO)
diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp
index b91799c0ed..fdf0b99dc9 100644
--- a/src/mir_app/src/clistmod.cpp
+++ b/src/mir_app/src/clistmod.cpp
@@ -27,22 +27,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "clc.h"
#include "genmenu.h"
-int InitCListEvents(void);
-void UninitCListEvents(void);
-void UninitGroupServices(void);
int ContactSettingChanged(WPARAM wParam, LPARAM lParam);
-int ContactAdded(WPARAM hContact, LPARAM);
-int ContactDeleted(WPARAM hContact, LPARAM);
-int InitGroupServices(void);
-INT_PTR Docking_IsDocked(WPARAM wParam, LPARAM lParam);
-int LoadCLUIModule(void);
int InitClistHotKeys(void);
void ScheduleMenuUpdate(void);
HANDLE hContactDoubleClicked, hContactIconChangedEvent;
HIMAGELIST hCListImages;
-extern BYTE nameOrder[];
+/////////////////////////////////////////////////////////////////////////////////////////
MIR_APP_DLL(wchar_t*) Clist_GetStatusModeDescription(int mode, int flags)
{
@@ -95,6 +87,41 @@ MIR_APP_DLL(wchar_t*) Clist_GetStatusModeDescription(int mode, int flags)
return (flags & GSMDF_UNTRANSLATED) ? descr : TranslateW(descr);
}
+MIR_APP_DLL(void) Clist_ContactDoubleClicked(MCONTACT hContact)
+{
+ // Try to process event myself
+ if (EventsProcessContactDoubleClick(hContact) == 0)
+ return;
+
+ // Allow third-party plugins to process a dblclick
+ if (NotifyEventHooks(hContactDoubleClicked, hContact, 0))
+ return;
+
+ // Otherwise try to execute the default action
+ TIntMenuObject *pmo = GetMenuObjbyId(hContactMenuObject);
+ if (pmo != nullptr) {
+ NotifyEventHooks(hPreBuildContactMenuEvent, hContact, 0);
+
+ TMO_IntMenuItem *pimi = Menu_GetDefaultItem(pmo->m_items.first);
+ if (pimi != nullptr)
+ Menu_ProcessCommand(pimi, hContact);
+ }
+}
+
+MIR_APP_DLL(HIMAGELIST) Clist_GetImageList(void)
+{
+ return hCListImages;
+}
+
+MIR_APP_DLL(int) Clist_GetContactIcon(MCONTACT hContact)
+{
+ char *szProto = Proto_GetBaseAccountName(hContact);
+ return g_clistApi.pfnIconFromStatusMode(szProto,
+ szProto == nullptr ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
HICON fnGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int status)
{
return ImageList_GetIcon(hCListImages, g_clistApi.pfnIconFromStatusMode(szProto, status, hContact), ILD_NORMAL);
@@ -119,12 +146,7 @@ int fnIconFromStatusMode(const char *szProto, int status, MCONTACT)
return 1;
}
-MIR_APP_DLL(int) Clist_GetContactIcon(MCONTACT hContact)
-{
- char *szProto = Proto_GetBaseAccountName(hContact);
- return g_clistApi.pfnIconFromStatusMode(szProto,
- szProto == nullptr ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact);
-}
+/////////////////////////////////////////////////////////////////////////////////////////
static void AddProtoIconIndex(PROTOACCOUNT *pa)
{
@@ -135,11 +157,6 @@ static void AddProtoIconIndex(PROTOACCOUNT *pa)
}
}
-static void RemoveProtoIconIndex(PROTOACCOUNT *pa)
-{
- pa->iIconBase = -1;
-}
-
static int ContactListModulesLoaded(WPARAM, LPARAM)
{
ScheduleMenuUpdate();
@@ -181,32 +198,6 @@ static int ContactListAccountsChanged(WPARAM eventCode, LPARAM lParam)
return 0;
}
-MIR_APP_DLL(void) Clist_ContactDoubleClicked(MCONTACT hContact)
-{
- // Try to process event myself
- if (EventsProcessContactDoubleClick(hContact) == 0)
- return;
-
- // Allow third-party plugins to process a dblclick
- if (NotifyEventHooks(hContactDoubleClicked, hContact, 0))
- return;
-
- // Otherwise try to execute the default action
- TIntMenuObject *pmo = GetMenuObjbyId(hContactMenuObject);
- if (pmo != nullptr) {
- NotifyEventHooks(hPreBuildContactMenuEvent, hContact, 0);
-
- TMO_IntMenuItem *pimi = Menu_GetDefaultItem(pmo->m_items.first);
- if (pimi != nullptr)
- Menu_ProcessCommand(pimi, hContact);
- }
-}
-
-MIR_APP_DLL(HIMAGELIST) Clist_GetImageList(void)
-{
- return hCListImages;
-}
-
static int CListIconsChanged(WPARAM, LPARAM)
{
for (int i = 0; i < _countof(g_statuses); i++)
@@ -385,6 +376,7 @@ int LoadContactListModule2(void)
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ContactSettingChanged);
HookEvent(ME_DB_CONTACT_ADDED, ContactAdded);
HookEvent(ME_DB_CONTACT_DELETED, ContactDeleted);
+ HookEvent(ME_OPT_INITIALISE, ClcOptInit);
hContactDoubleClicked = CreateHookableEvent(ME_CLIST_DOUBLECLICKED);
hContactIconChangedEvent = CreateHookableEvent(ME_CLIST_CONTACTICONCHANGED);
@@ -403,12 +395,15 @@ void UnloadContactListModule()
return;
// remove transitory contacts
- for (MCONTACT hContact = db_find_first(); hContact != 0; ) {
- MCONTACT hNext = db_find_next(hContact);
- if (!Contact_OnList(hContact))
- db_delete_contact(hContact);
- hContact = hNext;
+ if (Clist::RemoveTempContacts) {
+ for (MCONTACT hContact = db_find_first(); hContact != 0; ) {
+ MCONTACT hNext = db_find_next(hContact);
+ if (!Contact_OnList(hContact))
+ db_delete_contact(hContact);
+ hContact = hNext;
+ }
}
+
ImageList_Destroy(hCListImages);
UninitCListEvents();
UninitGroupServices();
diff --git a/src/mir_app/src/clistopts.cpp b/src/mir_app/src/clistopts.cpp
new file mode 100644
index 0000000000..ed7bf9baad
--- /dev/null
+++ b/src/mir_app/src/clistopts.cpp
@@ -0,0 +1,74 @@
+/*
+
+Miranda NG: the free IM client for Microsoft* Windows*
+
+Copyright (C) 2012-20 Miranda NG team (https://miranda-ng.org),
+Copyright (c) 2000-12 Miranda IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "stdafx.h"
+#include "clc.h"
+
+#define MODULENAME "CList"
+
+CMOption<bool> Clist::UseGroups(MODULENAME, "UseGroups", true);
+CMOption<bool> Clist::HideOffline(MODULENAME, "HideOffline", false);
+CMOption<bool> Clist::ConfirmDelete(MODULENAME, "ConfirmDelete", true);
+CMOption<bool> Clist::HideEmptyGroups(MODULENAME, "HideEmptyGroups", false);
+CMOption<bool> Clist::RemoveTempContacts(MODULENAME, "RemoveTempContacts", true);
+
+class ClistCommonOptsDlg : public CDlgBase
+{
+ CCtrlCheck chkUseGroups, chkHideOffline, chkConfirmDelete, chkHideEmptyGroups, chkRemoveTempContacts;
+
+public:
+ ClistCommonOptsDlg() :
+ CDlgBase(g_plugin, IDD_OPT_CLIST),
+ chkUseGroups(this, IDC_USEGROUPS),
+ chkHideOffline(this, IDC_HIDEOFFLINE),
+ chkConfirmDelete(this, IDC_CONFIRMDELETE),
+ chkHideEmptyGroups(this, IDC_HIDEEMPTYGROUPS),
+ chkRemoveTempContacts(this, IDC_REMOVETEMP)
+ {
+ CreateLink(chkUseGroups, Clist::UseGroups);
+ CreateLink(chkHideOffline, Clist::HideOffline);
+ CreateLink(chkConfirmDelete, Clist::ConfirmDelete);
+ CreateLink(chkHideEmptyGroups, Clist::HideEmptyGroups);
+ CreateLink(chkRemoveTempContacts, Clist::RemoveTempContacts);
+ }
+
+ bool OnApply() override
+ {
+ Clist_LoadContactTree();
+ Clist_InitAutoRebuild(g_clistApi.hwndContactTree);
+ return true;
+ }
+};
+
+int ClcOptInit(WPARAM wParam, LPARAM)
+{
+ OPTIONSDIALOGPAGE odp = {};
+ odp.position = -200000000;
+ odp.szGroup.a = LPGEN("Contact list");
+ odp.szTitle.a = LPGEN("Common");
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.pDialog = new ClistCommonOptsDlg();
+ g_plugin.addOptions(wParam, &odp);
+ return 0;
+}
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index f4a2f21511..cde9dc267f 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -195,7 +195,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam)
//see notes about deleting contacts on PF1_SERVERCLIST servers in m_protosvc.h
UINT_PTR action;
- if (db_get_b(0, "CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT) && !(GetKeyState(VK_SHIFT) & 0x8000))
+ if (Clist::ConfirmDelete && !(GetKeyState(VK_SHIFT) & 0x8000))
// Ask user for confirmation, and if the contact should be archived (hidden, not deleted)
action = DialogBoxParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_DELETECONTACT), (HWND)lParam, AskForConfirmationDlgProc, wParam);
else
@@ -476,12 +476,8 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case M_CREATECLC:
g_clistApi.hwndContactTree = CreateWindow(CLISTCONTROL_CLASSW, L"",
- WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN
- | CLS_CONTACTLIST
- | (db_get_b(0, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) ? CLS_USEGROUPS : 0)
- | (db_get_b(0, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? CLS_HIDEOFFLINE : 0)
- | (db_get_b(0, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) ? CLS_HIDEEMPTYGROUPS : 0),
- 0, 0, 0, 0, hwnd, nullptr, g_clistApi.hInst, nullptr);
+ WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | CLS_CONTACTLIST | (Clist::UseGroups ? CLS_USEGROUPS : 0) | (Clist::HideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::HideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0),
+ 0, 0, 0, 0, hwnd, nullptr, g_clistApi.hInst, nullptr);
SendMessage(hwnd, WM_SIZE, 0, 0);
break;
diff --git a/src/mir_app/src/cluiservices.cpp b/src/mir_app/src/cluiservices.cpp
index 3382706ea8..9fd57d5c1b 100644
--- a/src/mir_app/src/cluiservices.cpp
+++ b/src/mir_app/src/cluiservices.cpp
@@ -48,24 +48,24 @@ EXTERN_C MIR_APP_DLL(void) Clist_EndRebuild(void)
LONG_PTR dwStyle = GetWindowLongPtr(g_clistApi.hwndContactTree, GWL_STYLE);
// CLC does this automatically, but we need to force it if hideoffline or hideempty has changed
- if ((db_get_b(0, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) == 0) != ((dwStyle & CLS_HIDEOFFLINE) == 0)) {
- if (db_get_b(0, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT))
+ if ((Clist::HideOffline == 0) != ((dwStyle & CLS_HIDEOFFLINE) == 0)) {
+ if (Clist::HideOffline)
dwStyle |= CLS_HIDEOFFLINE;
else
dwStyle &= ~CLS_HIDEOFFLINE;
bRebuild = true;
}
- if ((db_get_b(0, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) == 0) != ((dwStyle & CLS_HIDEEMPTYGROUPS) == 0)) {
- if (db_get_b(0, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT))
+ if ((Clist::HideEmptyGroups == 0) != ((dwStyle & CLS_HIDEEMPTYGROUPS) == 0)) {
+ if (Clist::HideEmptyGroups)
dwStyle |= CLS_HIDEEMPTYGROUPS;
else
dwStyle &= ~CLS_HIDEEMPTYGROUPS;
bRebuild = true;
}
- if ((db_get_b(0, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) == 0) != ((dwStyle & CLS_USEGROUPS) == 0)) {
- if (db_get_b(0, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT))
+ if ((Clist::UseGroups == 0) != ((dwStyle & CLS_USEGROUPS) == 0)) {
+ if (Clist::UseGroups)
dwStyle |= CLS_USEGROUPS;
else
dwStyle &= ~CLS_USEGROUPS;
diff --git a/src/mir_app/src/contact.cpp b/src/mir_app/src/contact.cpp
index 9631710cdb..f8e32961b0 100644
--- a/src/mir_app/src/contact.cpp
+++ b/src/mir_app/src/contact.cpp
@@ -29,7 +29,7 @@ extern HANDLE hGroupChangeEvent;
MIR_APP_DLL(void) Clist_LoadContactTree(void)
{
- int hideOffline = db_get_b(0, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT);
+ bool hideOffline = Clist::HideOffline;
for (auto &hContact : Contacts()) {
int status = Contact_GetStatus(hContact);
if ((!hideOffline || status != ID_STATUS_OFFLINE) && !Contact_IsHidden(hContact))
@@ -56,12 +56,12 @@ MIR_APP_DLL(int) Clist_ContactChangeGroup(MCONTACT hContact, MGROUP hGroup)
int fnSetHideOffline(int iValue)
{
if (iValue == -1) // invert the current value
- iValue = !db_get_b(0, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT);
+ iValue = !Clist::HideOffline;
switch (iValue) {
case 0:
case 1:
- db_set_b(0, "CList", "HideOffline", iValue);
+ Clist::HideOffline = iValue;
break;
default:
diff --git a/src/mir_app/src/menu_groups.cpp b/src/mir_app/src/menu_groups.cpp
index 60af0b07b6..b63144d1be 100644
--- a/src/mir_app/src/menu_groups.cpp
+++ b/src/mir_app/src/menu_groups.cpp
@@ -114,7 +114,7 @@ static INT_PTR HideGroupsHelper(WPARAM, LPARAM)
static INT_PTR UseGroupsHelper(WPARAM, LPARAM)
{
int newVal = !(GetWindowLongPtr(g_clistApi.hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
- db_set_b(0, "CList", "UseGroups", (BYTE)newVal);
+ Clist::UseGroups = newVal;
SendMessage(g_clistApi.hwndContactTree, CLM_SETUSEGROUPS, newVal,0);
return newVal;
}
@@ -141,7 +141,7 @@ static INT_PTR CreateGroupHelper(WPARAM, LPARAM)
static int OnBuildGroupMenu(WPARAM, LPARAM)
{
- bool bChecked = db_get_b(0, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) != 0;
+ bool bChecked = Clist::HideOffline;
Menu_SetChecked(hHideOfflineUsersMenuItem, bChecked);
bChecked = SendMessage(g_clistApi.hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0) != 0;
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 2bf18c7b40..8c084e9810 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -725,3 +725,7 @@ Netlib_Dump @812 NONAME
?ProtoBroadcastAsync@PROTO_INTERFACE@@QAEXIHHPAXJ@Z @813 NONAME
ProtoBroadcastAsync @814 NONAME
?ProcessFileDrop@@YG_NPAUHDROP__@@I@Z @815 NONAME
+?ConfirmDelete@Clist@@3V?$CMOption@_N@@A @816 NONAME
+?HideEmptyGroups@Clist@@3V?$CMOption@_N@@A @817 NONAME
+?HideOffline@Clist@@3V?$CMOption@_N@@A @818 NONAME
+?UseGroups@Clist@@3V?$CMOption@_N@@A @819 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index f87708dd0e..f05d983ed1 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -725,3 +725,7 @@ Netlib_Dump @812 NONAME
?ProtoBroadcastAsync@PROTO_INTERFACE@@QEAAXIHHPEAX_J@Z @813 NONAME
ProtoBroadcastAsync @814 NONAME
?ProcessFileDrop@@YA_NPEAUHDROP__@@I@Z @815 NONAME
+?ConfirmDelete@Clist@@3V?$CMOption@_N@@A @816 NONAME
+?HideEmptyGroups@Clist@@3V?$CMOption@_N@@A @817 NONAME
+?HideOffline@Clist@@3V?$CMOption@_N@@A @818 NONAME
+?UseGroups@Clist@@3V?$CMOption@_N@@A @819 NONAME
diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h
index fc2881993f..781b5bb44a 100644
--- a/src/mir_app/src/resource.h
+++ b/src/mir_app/src/resource.h
@@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by resource.rc
+// Used by w:\miranda-ng\src\mir_app\res\resource.rc
//
#define IDC_AUTHICON 1
#define IDC_NOTOALL 3
@@ -18,13 +18,14 @@
#define IDD_OPT_PROTOCOLORDER 109
#define IDD_OPT_ICOLIB 110
#define IDD_ICOLIB_IMPORT 111
-#define IDD_OPT_SRMMLOG 112
+#define IDD_OPT_SRMMLOG 112
#define IDI_LOADED_GRAY 113
#define IDI_NOTLOADED_GRAY 114
#define IDD_ADDED 115
#define IDD_ENTER_STRING 116
#define IDI_ADDGROUP 117
#define IDD_EMPTY 118
+#define IDD_OPT_CLIST 119
#define IDD_AUTHREQ 121
#define IDD_DETAILS 125
#define IDD_HISTORY 127
@@ -208,6 +209,7 @@
#define IDC_CHK_FORCEDEFAULT 1027
#define IDC_ED_NAME 1028
#define IDC_ED_DEFAULT 1029
+#define IDC_REMOVETEMP 1030
#define IDC_SHOWNAMES 1031
#define IDC_ABOUT 1032
#define IDC_MYNOTES 1033
@@ -255,6 +257,10 @@
#define IDC_TIMEZONESELECT 1071
#define IDC_MOREOPTIONS 1071
#define IDC_USERMENU 1071
+#define IDC_HIDEOFFLINE 1072
+#define IDC_HIDEEMPTYGROUPS 1073
+#define IDC_USEGROUPS 1074
+#define IDC_CONFIRMDELETE 1075
#define IDC_SLOT_L 1075
#define IDC_SLOT 1076
#define IDC_MAX_ICONS_L 1077
@@ -596,9 +602,9 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 330
+#define _APS_NEXT_RESOURCE_VALUE 331
#define _APS_NEXT_COMMAND_VALUE 40018
-#define _APS_NEXT_CONTROL_VALUE 1748
+#define _APS_NEXT_CONTROL_VALUE 1749
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif