summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_clist.h29
-rw-r--r--include/m_clistint.h47
-rw-r--r--libs/win32/mir_app.libbin305118 -> 309846 bytes
-rw-r--r--libs/win64/mir_app.libbin305280 -> 310008 bytes
-rw-r--r--plugins/Clist_blind/src/clistopts.cpp26
-rw-r--r--plugins/Clist_blind/src/cluiopts.cpp48
-rw-r--r--plugins/Clist_blind/src/init.cpp8
-rw-r--r--plugins/Clist_blind/src/stdafx.h2
-rw-r--r--plugins/Clist_modern/src/cluiframes.cpp13
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp148
-rw-r--r--plugins/Clist_modern/src/modern_clistmod.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_clisttray.cpp24
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp46
-rw-r--r--plugins/Clist_modern/src/modern_contact.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_toolbar.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp6
-rw-r--r--plugins/Clist_nicer/src/CLCButton.cpp4
-rw-r--r--plugins/Clist_nicer/src/clc.cpp2
-rw-r--r--plugins/Clist_nicer/src/clistmod.cpp4
-rw-r--r--plugins/Clist_nicer/src/clistopts.cpp54
-rw-r--r--plugins/Clist_nicer/src/clui.cpp14
-rw-r--r--plugins/Clist_nicer/src/cluiframes.cpp2
-rw-r--r--plugins/Clist_nicer/src/cluiopts.cpp2
-rw-r--r--plugins/Clist_nicer/src/init.cpp6
-rw-r--r--plugins/Clist_nicer/src/viewmodes.cpp2
-rw-r--r--plugins/Scriver/src/msgoptions.cpp2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp4
-rw-r--r--plugins/TipperYM/src/options.cpp2
-rw-r--r--plugins/TopToolBar/src/InternalButtons.cpp4
-rw-r--r--plugins/TopToolBar/src/toolbarwnd.cpp2
-rw-r--r--plugins/Variables/src/help.cpp2
-rw-r--r--src/core/stdclist/src/clistopts.cpp27
-rw-r--r--src/core/stdclist/src/cluiopts.cpp85
-rw-r--r--src/core/stdclist/src/init.cpp11
-rw-r--r--src/core/stdclist/src/stdafx.h2
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp2
-rw-r--r--src/mir_app/mir_app.vcxproj3
-rw-r--r--src/mir_app/mir_app.vcxproj.filters9
-rw-r--r--src/mir_app/src/clc.h2
-rw-r--r--src/mir_app/src/clccontact.cpp6
-rw-r--r--src/mir_app/src/clcutils.cpp2
-rw-r--r--src/mir_app/src/clistevents.cpp8
-rw-r--r--src/mir_app/src/clistgroups.cpp2
-rw-r--r--src/mir_app/src/clistmod.cpp9
-rw-r--r--src/mir_app/src/clistopts.cpp64
-rw-r--r--src/mir_app/src/clisttray.cpp40
-rw-r--r--src/mir_app/src/clui.cpp28
-rw-r--r--src/mir_app/src/cluiservices.cpp12
-rw-r--r--src/mir_app/src/menu_groups.cpp4
-rw-r--r--src/mir_app/src/mir_app.def29
-rw-r--r--src/mir_app/src/mir_app64.def29
53 files changed, 476 insertions, 421 deletions
diff --git a/include/m_clist.h b/include/m_clist.h
index d2aac83840..9a2f489787 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -512,33 +512,4 @@ EXTERN_C MIR_APP_DLL(wchar_t*) Clist_GetContactDisplayName(MCONTACT hContact, in
EXTERN_C MIR_APP_DLL(int) Clist_TrayNotifyA(const char *szProto, const char *szInfoTitle, const char *szInfo, uint32_t dwInfoFlags, UINT uTimeout);
EXTERN_C MIR_APP_DLL(int) Clist_TrayNotifyW(const char *szProto, const wchar_t *wszInfoTitle, const wchar_t *wszInfo, uint32_t dwInfoFlags, UINT uTimeout);
-/////////////////////////////////////////////////////////////////////////////////////////
-
-#define SETTING_TOOLWINDOW_DEFAULT 1
-#define SETTING_SHOWMAINMENU_DEFAULT 1
-#define SETTING_SHOWCAPTION_DEFAULT 1
-#define SETTING_CLIENTDRAG_DEFAULT 1
-#define SETTING_ONTOP_DEFAULT 1
-#define SETTING_MIN2TRAY_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_AUTOHIDE_DEFAULT 0
-#define SETTING_HIDETIME_DEFAULT 30
-#define SETTING_CYCLETIME_DEFAULT 4
-#define SETTING_TRAYICON_DEFAULT SETTING_TRAYICON_SINGLE
-#define SETTING_ALWAYSMULTI_DEFAULT 0
-
-#define SETTING_TRAYICON_SINGLE 0
-#define SETTING_TRAYICON_CYCLE 1
-#define SETTING_TRAYICON_MULTI 2
-
-#define SETTING_STATE_HIDDEN 0
-#define SETTING_STATE_MINIMIZED 1
-#define SETTING_STATE_NORMAL 2
-
-#define SETTING_BRINGTOFRONT_DEFAULT 0
-
#endif // M_CLIST_H__
diff --git a/include/m_clistint.h b/include/m_clistint.h
index 886ca00211..be90203efa 100644
--- a/include/m_clistint.h
+++ b/include/m_clistint.h
@@ -34,6 +34,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_clc.h>
#include <m_gui.h>
+#define SETTING_TRAYICON_SINGLE 0
+#define SETTING_TRAYICON_CYCLE 1
+#define SETTING_TRAYICON_MULTI 2
+
+#define SETTING_STATE_HIDDEN 0
+#define SETTING_STATE_MINIMIZED 1
+#define SETTING_STATE_NORMAL 2
+
#define HCONTACT_ISGROUP 0x80000000
#define HCONTACT_ISINFO 0xFFFF0000
#define IsHContactGroup(h) (((UINT_PTR)(h)^HCONTACT_ISGROUP)<(HCONTACT_ISGROUP^HCONTACT_ISINFO))
@@ -71,8 +79,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TIMERID_TRAYHOVER 16
#define TIMERID_TRAYHOVER_2 17
-#define GROUP_ALLOCATE_STEP 8
-
struct ClcContact;
struct ClcData;
struct ClcCacheEntry;
@@ -447,14 +453,37 @@ extern MIR_APP_EXPORT CLIST_INTERFACE g_clistApi;
namespace Clist
{
+ // CLUI
+ extern MIR_APP_EXPORT CMOption<bool>
+ bShowCaption,
+ bShowMainMenu,
+ bClientAreaDrag;
+
+ // CList
extern MIR_APP_EXPORT CMOption<bool>
- HideOffline,
- UseGroups,
- FilterSearch,
- HideEmptyGroups,
- ConfirmDelete,
- Tray1Click,
- TrayAlwaysStatus;
+ bOnTop,
+ bAutoHide,
+ bToolWindow,
+ bHideOffline,
+ bBringToFront,
+ bUseGroups,
+ bFilterSearch,
+ bHideEmptyGroups,
+ bMinimizeToTray,
+ bAlwaysMulti,
+ bConfirmDelete,
+ bTransparent,
+ bTray1Click,
+ bTrayAlwaysStatus;
+
+ extern MIR_APP_EXPORT CMOption<uint8_t>
+ iTrayIcon,
+ iAlpha,
+ iAutoAlpha;
+
+ extern MIR_APP_EXPORT CMOption<uint16_t>
+ iHideTime,
+ iCycleTime;
extern MIR_APP_EXPORT CMOption<uint32_t>
IconFlashTime,
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index 2a2f5ed41c..5b3934c1ea 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 287dc169d4..12b3e11ae3 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/plugins/Clist_blind/src/clistopts.cpp b/plugins/Clist_blind/src/clistopts.cpp
index f57f0edff3..b45521f4e5 100644
--- a/plugins/Clist_blind/src/clistopts.cpp
+++ b/plugins/Clist_blind/src/clistopts.cpp
@@ -21,6 +21,7 @@ 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"
class CGenOptsDlg : public CDlgBase
@@ -39,18 +40,17 @@ public:
bool OnInitDialog() override
{
- CheckDlgButton(m_hwnd, IDC_SORTBYNAME, !g_plugin.getByte("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT) && !g_plugin.getByte("SortByProto", SETTING_SORTBYPROTO_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SORTBYSTATUS, g_plugin.getByte("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SORTBYPROTO, g_plugin.getByte("SortByProto", SETTING_SORTBYPROTO_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(m_hwnd, IDC_SORTBYNAME, !g_plugin.bSortByStatus && !g_plugin.bSortByProto ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(m_hwnd, IDC_SORTBYSTATUS, g_plugin.bSortByStatus ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(m_hwnd, IDC_SORTBYPROTO, g_plugin.bSortByProto ? BST_CHECKED : BST_UNCHECKED);
- int iTrayIcon = g_plugin.getByte("TrayIcon", SETTING_TRAYICON_DEFAULT);
- chkCycle.SetState(iTrayIcon == SETTING_TRAYICON_CYCLE);
- chkDontCycle.SetState(iTrayIcon == SETTING_TRAYICON_SINGLE);
+ chkCycle.SetState(Clist::iTrayIcon == SETTING_TRAYICON_CYCLE);
+ chkDontCycle.SetState(Clist::iTrayIcon == SETTING_TRAYICON_SINGLE);
- CheckDlgButton(m_hwnd, IDC_ALWAYSMULTI, !g_plugin.getByte("AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(m_hwnd, IDC_ALWAYSMULTI, !Clist::bAlwaysMulti ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_SETRANGE, 0, MAKELONG(120, 1));
- SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("CycleTime", SETTING_CYCLETIME_DEFAULT), 0));
+ SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(Clist::iCycleTime, 0));
ptrA szPrimaryStatus(g_plugin.getStringA("PrimaryStatus"));
@@ -76,11 +76,11 @@ public:
{
int iTrayIcon = chkDontCycle.IsChecked() ? SETTING_TRAYICON_SINGLE : (chkCycle.IsChecked() ? SETTING_TRAYICON_CYCLE : SETTING_TRAYICON_MULTI);
- g_plugin.setByte("SortByStatus", (uint8_t)(g_bSortByStatus = IsDlgButtonChecked(m_hwnd, IDC_SORTBYSTATUS)));
- g_plugin.setByte("SortByProto", (uint8_t)(g_bSortByProto = IsDlgButtonChecked(m_hwnd, IDC_SORTBYPROTO)));
- g_plugin.setByte("AlwaysMulti", (uint8_t)!IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI));
- g_plugin.setByte("TrayIcon", iTrayIcon);
- g_plugin.setWord("CycleTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
+ g_plugin.bSortByStatus = g_bSortByStatus = IsDlgButtonChecked(m_hwnd, IDC_SORTBYSTATUS);
+ g_plugin.bSortByProto = g_bSortByProto = IsDlgButtonChecked(m_hwnd, IDC_SORTBYPROTO);
+ Clist::bAlwaysMulti = !IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI);
+ Clist::iTrayIcon = iTrayIcon;
+ Clist::iCycleTime = SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0);
int cur = SendDlgItemMessage(m_hwnd, IDC_PRIMARYSTATUS, CB_GETCURSEL, 0, 0);
PROTOACCOUNT *pa = (PROTOACCOUNT *)SendDlgItemMessage(m_hwnd, IDC_PRIMARYSTATUS, CB_GETITEMDATA, cur, 0);
diff --git a/plugins/Clist_blind/src/cluiopts.cpp b/plugins/Clist_blind/src/cluiopts.cpp
index 4cd006a4f6..3be421c2e7 100644
--- a/plugins/Clist_blind/src/cluiopts.cpp
+++ b/plugins/Clist_blind/src/cluiopts.cpp
@@ -31,6 +31,7 @@ class CCluiOptsDlg : public CDlgBase
{
CCtrlSpin spinMaxSize, spinHideTime;
CCtrlCheck chkAutoHide, chkAutoSize, chkCaption, chkToolWnd, chkTransparent;
+ CCtrlCheck chkShowMainMenu, chkClientDrag, chkOnTop, chkMin2tray, chkBringToFront;
CCtrlSlider m_active, m_inactive;
public:
@@ -38,14 +39,29 @@ public:
CDlgBase(g_plugin, IDD_OPT_CLUI),
m_active(this, IDC_TRANSACTIVE, 255, 1),
m_inactive(this, IDC_TRANSINACTIVE, 255, 1),
+ chkOnTop(this, IDC_ONTOP),
chkCaption(this, IDC_SHOWCAPTION),
chkToolWnd(this, IDC_TOOLWND),
chkAutoHide(this, IDC_AUTOHIDE),
chkAutoSize(this, IDC_AUTOSIZE),
+ chkMin2tray(this, IDC_MIN2TRAY),
+ chkClientDrag(this, IDC_CLIENTDRAG),
chkTransparent(this, IDC_TRANSPARENT),
+ chkBringToFront(this, IDC_BRINGTOFRONT),
+ chkShowMainMenu(this, IDC_SHOWMAINMENU),
spinMaxSize(this, IDC_MAXSIZESPIN, 100),
spinHideTime(this, IDC_HIDETIMESPIN, 900, 1)
{
+ CreateLink(chkOnTop, Clist::bOnTop);
+ CreateLink(chkCaption, Clist::bShowCaption);
+ CreateLink(chkToolWnd, Clist::bToolWindow);
+ CreateLink(chkAutoHide, Clist::bAutoHide);
+ CreateLink(chkMin2tray, Clist::bMinimizeToTray);
+ CreateLink(chkClientDrag, Clist::bClientAreaDrag);
+ CreateLink(chkTransparent, Clist::bTransparent);
+ CreateLink(chkBringToFront, Clist::bBringToFront);
+ CreateLink(chkShowMainMenu, Clist::bShowMainMenu);
+
m_active.OnChange = m_inactive.OnChange = Callback(this, &CCluiOptsDlg::onChange_Slider);
chkCaption.OnChange = Callback(this, &CCluiOptsDlg::onChange_Caption);
@@ -57,24 +73,15 @@ public:
bool OnInitDialog() override
{
- CheckDlgButton(m_hwnd, IDC_BRINGTOFRONT, g_plugin.getByte("BringToFront", SETTING_BRINGTOFRONT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_ONTOP, g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_TOOLWND, g_plugin.getByte("ToolWindow", SETTING_TOOLWINDOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_MIN2TRAY, g_plugin.getByte("Min2Tray", SETTING_MIN2TRAY_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SHOWMAINMENU, db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_CLIENTDRAG, db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_FADEINOUT, db_get_b(0, "CLUI", "FadeInOut", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_DROPSHADOW, g_plugin.getByte("WindowShadow", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_ONDESKTOP, g_plugin.getByte("OnDesktop", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_AUTOSIZEUPWARD, db_get_b(0, "CLUI", "AutoSizeUpward", 0) ? BST_CHECKED : BST_UNCHECKED);
spinMaxSize.SetPosition(db_get_b(0, "CLUI", "MaxSizeHeight", 75));
- spinHideTime.SetPosition(g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT));
+ spinHideTime.SetPosition(Clist::iHideTime);
- chkCaption.SetState(db_get_b(0, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT));
chkAutoSize.SetState(db_get_b(0, "CLUI", "AutoSize", 0));
- chkAutoHide.SetState(g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT));
- chkTransparent.SetState(g_plugin.getByte("Transparent", SETTING_TRANSPARENT_DEFAULT));
ptrW wszTitle(g_plugin.getWStringA("TitleText"));
if (wszTitle)
@@ -82,34 +89,25 @@ public:
else
SetDlgItemTextA(m_hwnd, IDC_TITLETEXT, MIRANDANAME);
- m_active.SetPosition(g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT));
- m_inactive.SetPosition(g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT));
+ m_active.SetPosition(Clist::iAlpha);
+ m_inactive.SetPosition(Clist::iAutoAlpha);
return true;
}
bool OnApply() override
{
- g_plugin.setByte("OnTop", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_ONTOP));
- g_plugin.setByte("ToolWindow", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_TOOLWND));
- g_plugin.setByte("BringToFront", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_BRINGTOFRONT));
db_set_b(0, "CLUI", "FadeInOut", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_FADEINOUT));
db_set_b(0, "CLUI", "AutoSizeUpward", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZEUPWARD));
g_plugin.setByte("WindowShadow", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_DROPSHADOW));
g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_ONDESKTOP));
- db_set_b(0, "CLUI", "ShowCaption", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_SHOWCAPTION));
- db_set_b(0, "CLUI", "ShowMainMenu", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_SHOWMAINMENU));
- db_set_b(0, "CLUI", "ClientAreaDrag", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_CLIENTDRAG));
- g_plugin.setByte("Min2Tray", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_MIN2TRAY));
- g_plugin.setWord("HideTime", spinHideTime.GetPosition());
+ Clist::iHideTime = spinHideTime.GetPosition();
db_set_b(0, "CLUI", "MaxSizeHeight", spinMaxSize.GetPosition());
db_set_b(0, "CLUI", "AutoSize", chkAutoSize.GetState());
- g_plugin.setByte("AutoHide", chkAutoHide.GetState());
- g_plugin.setByte("Transparent", chkTransparent.GetState());
- g_plugin.setByte("Alpha", m_active.GetPosition());
- g_plugin.setByte("AutoAlpha", m_inactive.GetPosition());
+ Clist::iAlpha = m_active.GetPosition();
+ Clist::iAutoAlpha = m_inactive.GetPosition();
wchar_t title[256];
GetDlgItemText(m_hwnd, IDC_TITLETEXT, title, _countof(title));
@@ -157,7 +155,7 @@ public:
ShowWindow(g_clistApi.hwndContactList, IsDlgButtonChecked(m_hwnd, IDC_MIN2TRAY) ? SW_HIDE : SW_SHOW);
if (IsDlgButtonChecked(m_hwnd, IDC_TRANSPARENT)) {
SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
- SetLayeredWindowAttributes(g_clistApi.hwndContactList, RGB(0, 0, 0), (uint8_t)g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT), LWA_ALPHA);
+ SetLayeredWindowAttributes(g_clistApi.hwndContactList, RGB(0, 0, 0), Clist::iAutoAlpha, LWA_ALPHA);
}
else SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp
index a07fed2365..59a30677e0 100644
--- a/plugins/Clist_blind/src/init.cpp
+++ b/plugins/Clist_blind/src/init.cpp
@@ -56,7 +56,9 @@ PLUGININFOEX pluginInfoEx = {
};
CMPlugin::CMPlugin() :
- PLUGIN<CMPlugin>("CList", pluginInfoEx)
+ PLUGIN<CMPlugin>("CList", pluginInfoEx),
+ bSortByProto(m_szModuleName, "SortByProto", false),
+ bSortByStatus(m_szModuleName, "SortByStatus", false)
{
}
@@ -107,8 +109,8 @@ static INT_PTR GetStatusMode(WPARAM, LPARAM)
int CMPlugin::Load()
{
- g_bSortByStatus = g_plugin.getByte("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT);
- g_bSortByProto = g_plugin.getByte("SortByProto", SETTING_SORTBYPROTO_DEFAULT);
+ g_bSortByStatus = bSortByStatus;
+ g_bSortByProto = bSortByProto;
InitClc();
CreateServiceFunction(MS_CLIST_GETSTATUSMODE, GetStatusMode);
diff --git a/plugins/Clist_blind/src/stdafx.h b/plugins/Clist_blind/src/stdafx.h
index 30076ec544..5bd713b3db 100644
--- a/plugins/Clist_blind/src/stdafx.h
+++ b/plugins/Clist_blind/src/stdafx.h
@@ -43,6 +43,8 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+ CMOption<bool> bSortByStatus, bSortByProto;
+
int Load() override;
};
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp
index 0e5929fe75..746247f164 100644
--- a/plugins/Clist_modern/src/cluiframes.cpp
+++ b/plugins/Clist_modern/src/cluiframes.cpp
@@ -2620,8 +2620,8 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam
//ScreenToClient(Frames[framepos].ContainerWnd,&Frames[framepos].TitleBar.oldpos);
- if ((!(wParam&MK_CONTROL)) && g_pfwFrames[framepos].Locked && (!(g_pfwFrames[framepos].floating))) {
- if (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) {
+ if ((!(wParam & MK_CONTROL)) && g_pfwFrames[framepos].Locked && (!(g_pfwFrames[framepos].floating))) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
int res;
//pt = nm->pt;
@@ -2939,12 +2939,11 @@ static LRESULT CALLBACK CLUIFrameSubContainerProc(HWND hwnd, UINT msg, WPARAM wP
switch (msg) {
case WM_ACTIVATE:
if (g_bTransparentFlag) {
- uint8_t alpha;
if ((wParam != WA_INACTIVE || ((HWND)lParam == hwnd) || GetParent((HWND)lParam) == hwnd)) {
HWND hw = lParam ? GetParent((HWND)lParam) : nullptr;
- alpha = g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT);
- if (hw) SetWindowPos(hw, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
- CLUI_SmoothAlphaTransition(hwnd, alpha, 1);
+ if (hw)
+ SetWindowPos(hw, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
+ CLUI_SmoothAlphaTransition(hwnd, Clist::iAlpha, 1);
}
}
@@ -3121,7 +3120,7 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP
return 0;
case WM_LBUTTONDOWN:
- if (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
GetCursorPos(&pt);
return SendMessage(hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index bb5f40c834..ea9d96c37f 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -1645,11 +1645,11 @@ HRESULT ClcLoadModule()
int ClcUnloadModule()
{
if (g_CluiData.bOldUseGroups != -1)
- Clist::UseGroups = g_CluiData.bOldUseGroups;
+ Clist::bUseGroups = g_CluiData.bOldUseGroups;
if (g_CluiData.bOldHideOffline != -1)
- Clist::HideOffline = g_CluiData.bOldHideOffline;
+ Clist::bHideOffline = g_CluiData.bOldHideOffline;
if (g_CluiData.bOldHideEmptyGroups != -1)
- Clist::HideEmptyGroups = g_CluiData.bOldHideEmptyGroups;
+ Clist::bHideEmptyGroups = g_CluiData.bOldHideEmptyGroups;
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index 199e6306f9..88804d7f8d 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 = Clist::HideOffline;
+ int bHideOffline = Clist::bHideOffline;
for (int j = 0; j < subcount; j++) {
MCONTACT hsub = db_mc_getSub(cont->hContact, j);
if (!hsub)
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp
index 184f11da2c..528efe806b 100644
--- a/plugins/Clist_modern/src/modern_clcopts.cpp
+++ b/plugins/Clist_modern/src/modern_clcopts.cpp
@@ -303,13 +303,13 @@ static INT_PTR CALLBACK DlgProcClistAdditionalOpts(HWND hwndDlg, UINT msg, WPARA
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_META, db_get_b(0, "CLC", "Meta", SETTING_USEMETAICON_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METADBLCLK, db_get_b(0, "CLC", "MetaDoubleClick", SETTING_METAAVOIDDBLCLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METASUBEXTRA, db_get_b(0, "CLC", "MetaHideExtra", SETTING_METAHIDEEXTRA_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METASUBEXTRA_IGN, db_get_b(0, "CLC", "MetaIgnoreEmptyExtra", SETTING_METAAVOIDDBLCLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_METAEXPAND, db_get_b(0, "CLC", "MetaExpanding", SETTING_METAEXPANDING_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_DISCOVER_AWAYMSG, db_get_b(0, "ModernData", "InternalAwayMsgDiscovery", SETTING_INTERNALAWAYMSGREQUEST_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
- CheckDlgButton(hwndDlg, IDC_REMOVE_OFFLINE_AWAYMSG, db_get_b(0, "ModernData", "RemoveAwayMessageForOffline", SETTING_REMOVEAWAYMSGFOROFFLINE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_META, db_get_b(0, "CLC", "Meta", SETTING_USEMETAICON_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METADBLCLK, db_get_b(0, "CLC", "MetaDoubleClick", SETTING_METAAVOIDDBLCLICK_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METASUBEXTRA, db_get_b(0, "CLC", "MetaHideExtra", SETTING_METAHIDEEXTRA_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METASUBEXTRA_IGN, db_get_b(0, "CLC", "MetaIgnoreEmptyExtra", SETTING_METAAVOIDDBLCLICK_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_METAEXPAND, db_get_b(0, "CLC", "MetaExpanding", SETTING_METAEXPANDING_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_DISCOVER_AWAYMSG, db_get_b(0, "ModernData", "InternalAwayMsgDiscovery", SETTING_INTERNALAWAYMSGREQUEST_DEFAULT)); /// by FYR
+ CheckDlgButton(hwndDlg, IDC_REMOVE_OFFLINE_AWAYMSG, db_get_b(0, "ModernData", "RemoveAwayMessageForOffline", SETTING_REMOVEAWAYMSGFOROFFLINE_DEFAULT)); /// by FYR
SendDlgItemMessage(hwndDlg, IDC_SUBINDENTSPIN, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_SUBINDENT), 0);
SendDlgItemMessage(hwndDlg, IDC_SUBINDENTSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
@@ -362,23 +362,23 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar
{
uint32_t exStyle = db_get_dw(0, "CLC", "ExStyle", GetDefaultExStyle());
for (auto &it : checkBoxToStyleEx)
- CheckDlgButton(hwndDlg, it.id, (exStyle & it.flag) ^ (it.flag * it.neg) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, it.id, (exStyle & it.flag) ^ (it.flag * it.neg));
UDACCEL accel[2] = { { 0, 10 }, { 2, 50 } };
SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETRANGE, 0, MAKELONG(999, 0));
SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETACCEL, _countof(accel), (LPARAM)&accel);
SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_SETPOS, 0, MAKELONG(db_get_w(0, "CLC", "ScrollTime", CLCDEFAULT_SCROLLTIME), 0));
}
- CheckDlgButton(hwndDlg, IDC_IDLE, db_get_b(0, "CLC", "ShowIdle", CLCDEFAULT_SHOWIDLE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_IDLE, db_get_b(0, "CLC", "ShowIdle", CLCDEFAULT_SHOWIDLE));
SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_SETPOS, 0, MAKELONG(db_get_b(0, "CLC", "GroupIndent", CLCDEFAULT_GROUPINDENT), 0));
- CheckDlgButton(hwndDlg, IDC_GREYOUT, db_get_dw(0, "CLC", "GreyoutFlags", CLCDEFAULT_GREYOUTFLAGS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_GREYOUT, db_get_dw(0, "CLC", "GreyoutFlags", CLCDEFAULT_GREYOUTFLAGS));
EnableWindow(GetDlgItem(hwndDlg, IDC_SMOOTHTIME), IsDlgButtonChecked(hwndDlg, IDC_NOTNOSMOOTHSCROLLING));
EnableWindow(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), IsDlgButtonChecked(hwndDlg, IDC_GREYOUT));
FillCheckBoxTree(GetDlgItem(hwndDlg, IDC_GREYOUTOPTS), greyoutValues, _countof(greyoutValues), db_get_dw(0, "CLC", "FullGreyoutFlags", CLCDEFAULT_FULLGREYOUTFLAGS));
- CheckDlgButton(hwndDlg, IDC_NOSCROLLBAR, db_get_b(0, "CLC", "NoVScrollBar", CLCDEFAULT_NOVSCROLL) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_NOSCROLLBAR, db_get_b(0, "CLC", "NoVScrollBar", CLCDEFAULT_NOVSCROLL));
return TRUE;
case WM_VSCROLL:
@@ -478,11 +478,11 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- 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);
- CheckDlgButton(hwndDlg, IDC_HILIGHTMODE2, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 2 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_HILIGHTMODE3, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 3 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_GAMMACORRECT, db_get_b(0, "CLC", "GammaCorrect", CLCDEFAULT_GAMMACORRECT));
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE4, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 0);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE1, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 1);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE2, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 2);
+ CheckDlgButton(hwndDlg, IDC_HILIGHTMODE3, db_get_b(0, "CLC", "HiLightMode", SETTING_HILIGHTMODE_DEFAULT) == 3);
{
for (auto &it : sortby) {
int item = SendDlgItemMessage(hwndDlg, IDC_CLSORT1, CB_ADDSTRING, 0, (LPARAM)TranslateW(it));
@@ -506,8 +506,8 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_CLSORT3, CB_SETCURSEL, i, 0);
}
- CheckDlgButton(hwndDlg, IDC_OFFLINEMOVE, g_plugin.getByte("OfflineBottom", SETTING_OFFLINEBOTTOM_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_OFFLINEMOVE, g_plugin.getByte("OfflineBottom", SETTING_OFFLINEBOTTOM_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT));
}
return TRUE;
@@ -562,12 +562,12 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_OFFLINETOROOT, g_plugin.getByte("PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT));
{
uint8_t trayOption = db_get_b(0, "CLUI", "XStatusTray", SETTING_TRAYOPTION_DEFAULT);
- CheckDlgButton(hwndDlg, IDC_SHOWXSTATUS, (trayOption & 3) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWNORMAL, (trayOption & 2) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TRANSPARENTOVERLAY, (trayOption & 4) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWXSTATUS, (trayOption & 3));
+ CheckDlgButton(hwndDlg, IDC_SHOWNORMAL, (trayOption & 2));
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENTOVERLAY, (trayOption & 4));
EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWNORMAL), IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS));
EnableWindow(GetDlgItem(hwndDlg, IDC_TRANSPARENTOVERLAY), IsDlgButtonChecked(hwndDlg, IDC_SHOWXSTATUS) && IsDlgButtonChecked(hwndDlg, IDC_SHOWNORMAL));
@@ -602,7 +602,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
// setting icon cycling period
SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETRANGE, 0, MAKELONG(120, 1));
- SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("CycleTime", SETTING_CYCLETIME_DEFAULT), 0));
+ SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(Clist::iCycleTime, 0));
// setting icon mode
switch (g_plugin.getByte("tiModeS", TRAY_ICON_MODE_GLOBAL)) {
@@ -691,7 +691,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
}
// icon cycling timeout.
- g_plugin.setWord("CycleTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
+ Clist::iCycleTime = SendDlgItemMessage(hwndDlg, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0);
// icon modes
g_plugin.setByte("tiModeS",
@@ -734,27 +734,27 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DRAGTOSCROLL, (db_get_b(0, "CLUI", "DragToScroll", SETTING_DRAGTOSCROLL_DEFAULT) && !db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTOSIZE, g_CluiData.fAutoSize ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOCKSIZING, db_get_b(0, "CLUI", "LockSize", SETTING_LOCKSIZE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BRINGTOFRONT, g_plugin.getByte("BringToFront", SETTING_BRINGTOFRONT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, Clist::bClientAreaDrag);
+ CheckDlgButton(hwndDlg, IDC_DRAGTOSCROLL, (db_get_b(0, "CLUI", "DragToScroll", SETTING_DRAGTOSCROLL_DEFAULT) && !Clist::bClientAreaDrag));
+ CheckDlgButton(hwndDlg, IDC_AUTOSIZE, g_CluiData.fAutoSize);
+ CheckDlgButton(hwndDlg, IDC_LOCKSIZING, db_get_b(0, "CLUI", "LockSize", SETTING_LOCKSIZE_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_BRINGTOFRONT, Clist::bBringToFront);
SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "MaxSizeHeight", SETTING_MAXSIZEHEIGHT_DEFAULT));
SendDlgItemMessage(hwndDlg, IDC_MINSIZESPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
SendDlgItemMessage(hwndDlg, IDC_MINSIZESPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "MinSizeHeight", SETTING_MINSIZEHEIGHT_DEFAULT));
- CheckDlgButton(hwndDlg, IDC_AUTOSIZEUPWARD, db_get_b(0, "CLUI", "AutoSizeUpward", SETTING_AUTOSIZEUPWARD_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SNAPTOEDGES, db_get_b(0, "CLUI", "SnapToEdges", SETTING_SNAPTOEDGES_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DOCKTOSIDES, db_get_b(0, "CLUI", "DockToSides", SETTING_DOCKTOSIDES_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AUTOSIZEUPWARD, db_get_b(0, "CLUI", "AutoSizeUpward", SETTING_AUTOSIZEUPWARD_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_SNAPTOEDGES, db_get_b(0, "CLUI", "SnapToEdges", SETTING_SNAPTOEDGES_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_DOCKTOSIDES, db_get_b(0, "CLUI", "DockToSides", SETTING_DOCKTOSIDES_DEFAULT));
- CheckDlgButton(hwndDlg, IDC_EVENTAREA_NONE, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_EVENTAREA, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_EVENTAREA_ALWAYS, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 2 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_EVENTAREA_NONE, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 0);
+ CheckDlgButton(hwndDlg, IDC_EVENTAREA, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 1);
+ CheckDlgButton(hwndDlg, IDC_EVENTAREA_ALWAYS, db_get_b(0, "CLUI", "EventArea", SETTING_EVENTAREAMODE_DEFAULT) == 2);
- CheckDlgButton(hwndDlg, IDC_AUTOHIDE, g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AUTOHIDE, Clist::bAutoHide);
SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETRANGE, 0, MAKELONG(900, 1));
- SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT), 0));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(Clist::iHideTime, 0));
EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIME), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC01), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
@@ -855,9 +855,9 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM
db_set_w(0, "ModernData", "HideBehindBorderSize", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN4, UDM_GETPOS, 0, 0));
db_set_b(0, "CLUI", "DragToScroll", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DRAGTOSCROLL));
- g_plugin.setByte("BringToFront", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_BRINGTOFRONT));
+ Clist::bBringToFront = IsDlgButtonChecked(hwndDlg, IDC_BRINGTOFRONT);
g_bChangingMode = true;
- db_set_b(0, "CLUI", "ClientAreaDrag", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_CLIENTDRAG));
+ Clist::bClientAreaDrag = IsDlgButtonChecked(hwndDlg, IDC_CLIENTDRAG);
db_set_b(0, "CLUI", "AutoSize", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
db_set_b(0, "CLUI", "LockSize", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_LOCKSIZING));
db_set_b(0, "CLUI", "MaxSizeHeight", (uint8_t)GetDlgItemInt(hwndDlg, IDC_MAXSIZEHEIGHT, nullptr, FALSE));
@@ -870,8 +870,8 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM
db_set_b(0, "CLUI", "EventArea",
(uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_EVENTAREA_ALWAYS) ? 2 : (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_EVENTAREA) ? 1 : 0));
- g_plugin.setByte("AutoHide", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- g_plugin.setWord("HideTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
+ Clist::bAutoHide = IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE);
+ Clist::iHideTime = SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0);
CLUI_ChangeWindowMode();
SendMessage(g_clistApi.hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
CLUI_ReloadCLUIOptions();
@@ -894,7 +894,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
g_hCLUIOptionsWnd = hwndDlg;
- CheckDlgButton(hwndDlg, IDC_ONTOP, g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_ONTOP, Clist::bOnTop);
{
//====== Activate/Deactivate Non-Layered items =======
fEnabled = !g_CluiData.fLayered || g_CluiData.fDisableSkinEngine;
@@ -912,14 +912,14 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
}
{
//====== Non-Layered Mode =====
- CheckDlgButton(hwndDlg, IDC_TOOLWND, g_plugin.getByte("ToolWindow", SETTING_TOOLWINDOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MIN2TRAY, g_plugin.getByte("Min2Tray", SETTING_MIN2TRAY_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BORDER, g_plugin.getByte("ThinBorder", SETTING_THINBORDER_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_NOBORDERWND, g_plugin.getByte("NoBorder", SETTING_NOBORDER_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TOOLWND, Clist::bToolWindow);
+ CheckDlgButton(hwndDlg, IDC_MIN2TRAY, Clist::bMinimizeToTray);
+ CheckDlgButton(hwndDlg, IDC_BORDER, g_plugin.getByte("ThinBorder", SETTING_THINBORDER_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_NOBORDERWND, g_plugin.getByte("NoBorder", SETTING_NOBORDER_DEFAULT));
if (IsDlgButtonChecked(hwndDlg, IDC_TOOLWND))
EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), FALSE);
- CheckDlgButton(hwndDlg, IDC_SHOWCAPTION, db_get_b(0, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWMAINMENU, db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWCAPTION, Clist::bShowCaption);
+ CheckDlgButton(hwndDlg, IDC_SHOWMAINMENU, Clist::bShowMainMenu);
if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_TOOLWND), FALSE);
@@ -931,12 +931,12 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
EnableWindow(GetDlgItem(hwndDlg, IDC_TITLETEXT), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWCAPTION), FALSE);
}
- CheckDlgButton(hwndDlg, IDC_DROPSHADOW, g_plugin.getByte("WindowShadow", SETTING_WINDOWSHADOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ROUNDCORNERS, db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DROPSHADOW, g_plugin.getByte("WindowShadow", SETTING_WINDOWSHADOW_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_ROUNDCORNERS, db_get_b(0, "CLC", "RoundCorners", SETTING_ROUNDCORNERS_DEFAULT));
} //====== End of Non-Layered Mode =====
- CheckDlgButton(hwndDlg, IDC_FADEINOUT, db_get_b(0, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ONDESKTOP, g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_FADEINOUT, db_get_b(0, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_ONDESKTOP, g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT));
SendDlgItemMessage(hwndDlg, IDC_FRAMESSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
SendDlgItemMessage(hwndDlg, IDC_CAPTIONSSPIN, UDM_SETRANGE, 0, MAKELONG(50, 0));
SendDlgItemMessage(hwndDlg, IDC_FRAMESSPIN, UDM_SETPOS, 0, db_get_dw(0, "CLUIFrames", "GapBetweenFrames", SETTING_GAPFRAMES_DEFAULT));
@@ -950,8 +950,8 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
SendDlgItemMessage(hwndDlg, IDC_TOPMARGINSPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "TopClientMargin", SETTING_TOPCLIENTMARIGN_DEFAULT));
SendDlgItemMessage(hwndDlg, IDC_BOTTOMMARGINSPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "BottomClientMargin", SETTING_BOTTOMCLIENTMARIGN_DEFAULT));
- CheckDlgButton(hwndDlg, IDC_DISABLEENGINE, db_get_b(0, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AEROGLASS, db_get_b(0, "ModernData", "AeroGlass", SETTING_AEROGLASS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DISABLEENGINE, db_get_b(0, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT));
+ CheckDlgButton(hwndDlg, IDC_AEROGLASS, db_get_b(0, "ModernData", "AeroGlass", SETTING_AEROGLASS_DEFAULT));
EnableWindow(GetDlgItem(hwndDlg, IDC_LAYERENGINE), !db_get_b(0, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT) ? TRUE : FALSE);
CheckDlgButton(hwndDlg, IDC_LAYERENGINE, (db_get_b(0, "ModernData", "EnableLayering", SETTING_ENABLELAYERING_DEFAULT) && !db_get_b(0, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT)) ? BST_UNCHECKED : BST_CHECKED);
@@ -968,7 +968,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
SendDlgItemMessage(hwndDlg, IDC_TITLETEXT, CB_ADDSTRING, 0, (LPARAM)MIRANDANAME);
}
- CheckDlgButton(hwndDlg, IDC_TRANSPARENT, g_plugin.getByte("Transparent", SETTING_TRANSPARENT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENT, Clist::bTransparent);
if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC11), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC12), FALSE);
@@ -979,8 +979,8 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
}
SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
- SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETPOS, TRUE, g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT));
- SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETPOS, TRUE, g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT));
+ SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETPOS, TRUE, Clist::iAlpha);
+ SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETPOS, TRUE, Clist::iAutoAlpha);
SendMessage(hwndDlg, WM_HSCROLL, 0x12345678, 0);
return TRUE;
@@ -1073,14 +1073,14 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
}
g_CluiData.dwKeyColor = db_get_dw(0, "ModernSettings", "KeyColor", (uint32_t)SETTING_KEYCOLOR_DEFAULT);
g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP));
- g_plugin.setByte("OnTop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONTOP));
+ Clist::bOnTop = IsDlgButtonChecked(hwndDlg, IDC_ONTOP);
SetWindowPos(g_clistApi.hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
db_set_b(0, "CLUI", "DragToScroll", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DRAGTOSCROLL));
//====== Non-Layered Mode ======
- g_plugin.setByte("ToolWindow", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_TOOLWND));
- db_set_b(0, "CLUI", "ShowCaption", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION));
- db_set_b(0, "CLUI", "ShowMainMenu", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SHOWMAINMENU));
+ Clist::bToolWindow = IsDlgButtonChecked(hwndDlg, IDC_TOOLWND);
+ Clist::bShowCaption = IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION);
+ Clist::bShowMainMenu = IsDlgButtonChecked(hwndDlg, IDC_SHOWMAINMENU);
g_plugin.setByte("ThinBorder", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_BORDER));
g_plugin.setByte("NoBorder", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_NOBORDERWND));
{
@@ -1088,7 +1088,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
GetDlgItemText(hwndDlg, IDC_TITLETEXT, title, _countof(title));
g_plugin.setWString("TitleText", title);
}
- g_plugin.setByte("Min2Tray", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY));
+ Clist::bMinimizeToTray = IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY);
g_plugin.setByte("WindowShadow", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DROPSHADOW));
db_set_b(0, "CLC", "RoundCorners", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ROUNDCORNERS));
//====== End of Non-Layered Mode ======
@@ -1121,9 +1121,9 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
db_set_dw(0, "CLUIFrames", "GapBetweenTitleBar", (uint32_t)i2);
Sync(CLUIFramesOnClistResize, (WPARAM)g_clistApi.hwndContactList, 0);
}
- g_plugin.setByte("Transparent", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
- g_plugin.setByte("Alpha", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
- g_plugin.setByte("AutoAlpha", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0));
+ Clist::bTransparent = IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT);
+ Clist::iAlpha = SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0);
+ Clist::iAutoAlpha = SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0);
g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP));
ske_LoadSkinFromDB();
@@ -1276,8 +1276,8 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
int flags = dat->item[indx].flags;
indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETITEMDATA, indx, 0);
- CheckDlgButton(hwndDlg, IDC_BITMAP, dat->item[indx].useBitmap ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_USEWINCOL, dat->item[indx].useWinColours ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_BITMAP, dat->item[indx].useBitmap);
+ CheckDlgButton(hwndDlg, IDC_USEWINCOL, dat->item[indx].useWinColours);
EnableWindow(GetDlgItem(hwndDlg, IDC_BKGCOLOUR), !dat->item[indx].useWinColours);
EnableWindow(GetDlgItem(hwndDlg, IDC_SELCOLOUR), !dat->item[indx].useWinColours);
@@ -1288,13 +1288,13 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg, IDC_SELCOLOUR, CPM_SETCOLOUR, 0, dat->item[indx].selColor);
SetDlgItemTextA(hwndDlg, IDC_FILENAME, dat->item[indx].filename);
- CheckDlgButton(hwndDlg, IDC_STRETCHH, flags&CLB_STRETCHH ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_STRETCHV, flags&CLB_STRETCHV ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TILEH, flags&CLBF_TILEH ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TILEV, flags&CLBF_TILEV ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SCROLL, flags&CLBF_SCROLL ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_PROPORTIONAL, flags&CLBF_PROPORTIONAL ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TILEVROWH, flags&CLBF_TILEVTOROWHEIGHT ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_STRETCHH, flags&CLB_STRETCHH);
+ CheckDlgButton(hwndDlg, IDC_STRETCHV, flags&CLB_STRETCHV);
+ CheckDlgButton(hwndDlg, IDC_TILEH, flags&CLBF_TILEH);
+ CheckDlgButton(hwndDlg, IDC_TILEV, flags&CLBF_TILEV);
+ CheckDlgButton(hwndDlg, IDC_SCROLL, flags&CLBF_SCROLL);
+ CheckDlgButton(hwndDlg, IDC_PROPORTIONAL, flags&CLBF_PROPORTIONAL);
+ CheckDlgButton(hwndDlg, IDC_TILEVROWH, flags&CLBF_TILEVTOROWHEIGHT);
SendMessage(hwndDlg, M_BKGR_UPDATE, 0, 0);
}
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp
index 7f9536a22b..2a3e5da2ba 100644
--- a/plugins/Clist_modern/src/modern_clistmod.cpp
+++ b/plugins/Clist_modern/src/modern_clistmod.cpp
@@ -180,7 +180,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY)
if (IsIconic(hWnd) || !IsWindowVisible(hWnd))
return GWVS_HIDDEN;
- if (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT) || !g_plugin.getByte("BringToFront", SETTING_BRINGTOFRONT_DEFAULT))
+ if (g_plugin.getByte("OnDesktop", SETTING_ONDESKTOP_DEFAULT) || !Clist::bBringToFront)
return GWVS_VISIBLE;
HWND hwndFocused = GetFocus();
@@ -340,7 +340,7 @@ int cliShowHide(bool bAlwaysShow)
Sync(CLUIFrames_OnShowHide, 1); //TO BE PROXIED
SetWindowPos(g_clistApi.hwndContactList, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
g_bCalledFromShowHide = 1;
- if (!g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT))
+ if (!Clist::bOnTop)
SetWindowPos(g_clistApi.hwndContactList, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
g_bCalledFromShowHide = 0;
}
@@ -362,7 +362,7 @@ int cliShowHide(bool bAlwaysShow)
CListMod_HideWindow();
g_plugin.setByte("State", SETTING_STATE_HIDDEN);
}
- else if (g_plugin.getByte("Min2Tray", SETTING_MIN2TRAY_DEFAULT)) {
+ else if (Clist::bMinimizeToTray) {
CLUI_ShowWindowMod(g_clistApi.hwndContactList, SW_HIDE);
g_plugin.setByte("State", SETTING_STATE_HIDDEN);
}
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp
index f8c5f7ad44..40bd10acfc 100644
--- a/plugins/Clist_modern/src/modern_clisttray.cpp
+++ b/plugins/Clist_modern/src/modern_clisttray.cpp
@@ -77,12 +77,11 @@ static VOID CALLBACK TrayIconAutoHideTimer(HWND hwnd, UINT, UINT_PTR idEvent, DW
int cliTrayIconPauseAutoHide(WPARAM, LPARAM)
{
- if (g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT)) {
+ if (Clist::bAutoHide)
if (GetActiveWindow() != g_clistApi.hwndContactList && GetWindow(GetParent(GetActiveWindow()), GW_OWNER) != g_clistApi.hwndContactList) {
KillTimer(nullptr, autoHideTimerId);
- autoHideTimerId = CLUI_SafeSetTimer(nullptr, 0, 1000 * g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT), TrayIconAutoHideTimer);
+ autoHideTimerId = CLUI_SafeSetTimer(nullptr, 0, 1000 * Clist::iHideTime, TrayIconAutoHideTimer);
}
- }
return 0;
}
@@ -100,7 +99,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
break;
case TIM_CALLBACK:
- if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && msg->lParam == WM_LBUTTONDOWN && !Clist::Tray1Click) {
+ if ((GetAsyncKeyState(VK_CONTROL) & 0x8000) && msg->lParam == WM_LBUTTONDOWN && !Clist::bTray1Click) {
POINT pt;
HMENU hMenu = Menu_GetStatusMenu();
g_bOnTrayRightClick= true;
@@ -126,9 +125,9 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
{
HWND h1 = (HWND)msg->lParam;
HWND h2 = h1 ? GetParent(h1) : nullptr;
- if (g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT)) {
+ if (Clist::bAutoHide) {
if (LOWORD(msg->wParam) == WA_INACTIVE && h2 != g_clistApi.hwndContactList)
- autoHideTimerId = CLUI_SafeSetTimer(nullptr, 0, 1000 * g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT), TrayIconAutoHideTimer);
+ autoHideTimerId = CLUI_SafeSetTimer(nullptr, 0, 1000 * Clist::iHideTime, TrayIconAutoHideTimer);
else {
KillTimer(nullptr, autoHideTimerId);
autoHideTimerId = 0;
@@ -173,9 +172,8 @@ VOID CALLBACK cliTrayCycleTimerProc(HWND, UINT, UINT_PTR, DWORD)
void SettingsMigrate(void)
{
- uint8_t TrayIcon = g_plugin.getByte("TrayIcon");
uint8_t AlwaysPrimary = g_plugin.getByte("AlwaysPrimary");
- uint8_t AlwaysMulti = g_plugin.getByte("AlwaysMulti");
+ uint8_t AlwaysMulti = Clist::bAlwaysMulti;
ptrA PrimaryStatus(g_plugin.getStringA("PrimaryStatus"));
// these strings must always be set
@@ -188,8 +186,8 @@ void SettingsMigrate(void)
g_plugin.setString("tiAccV", "");
}
- switch (TrayIcon) {
- case 0: // global or single acc
+ switch (Clist::iTrayIcon) {
+ case SETTING_TRAYICON_SINGLE:
if (AlwaysPrimary) {
if (!PrimaryStatus) { // global always
g_plugin.setByte("tiModeS", TRAY_ICON_MODE_GLOBAL);
@@ -206,12 +204,12 @@ void SettingsMigrate(void)
}
break;
- case 1: // cycle
+ case SETTING_TRAYICON_CYCLE:
g_plugin.setByte("tiModeS", TRAY_ICON_MODE_CYCLE);
g_plugin.setByte("tiModeV", TRAY_ICON_MODE_CYCLE);
break;
- case 2: // multiple
+ case SETTING_TRAYICON_MULTI:
g_plugin.setByte("tiModeS", (AlwaysMulti) ? TRAY_ICON_MODE_ALL : TRAY_ICON_MODE_GLOBAL);
g_plugin.setByte("tiModeV", TRAY_ICON_MODE_ALL);
break;
@@ -313,7 +311,7 @@ int cliTrayIconInit(HWND hwnd)
cliTrayCycleTimerProc(nullptr, 0, 0, 0); // force icon update
// Не сохраняем ID таймера в pcli, чтобы fnTrayIconUpdateBase не убивала его.
- TimerID = CLUI_SafeSetTimer(nullptr, 0, g_plugin.getWord("CycleTime", SETTING_CYCLETIME_DEFAULT) * 1000, cliTrayCycleTimerProc);
+ TimerID = CLUI_SafeSetTimer(nullptr, 0, Clist::iCycleTime * 1000, cliTrayCycleTimerProc);
break;
case TRAY_ICON_MODE_ALL:
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 6db215c800..500f7ca2d6 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -303,13 +303,13 @@ CLUI::CLUI() :
LoadCLUIFramesModule();
g_CluiData.bOldHideEmptyGroups = -1;
- bOldHideEmptyGroups = Clist::HideEmptyGroups;
+ bOldHideEmptyGroups = Clist::bHideEmptyGroups;
g_CluiData.bOldHideOffline = -1;
- bOldHideOffline = Clist::HideOffline;
+ bOldHideOffline = Clist::bHideOffline;
g_CluiData.bOldUseGroups = -1;
- bOldUseGroups = Clist::UseGroups;
+ bOldUseGroups = Clist::bUseGroups;
g_CluiData.bOldFoldGroups = -1;
}
@@ -375,7 +375,7 @@ HRESULT CLUI::RegisterAvatarMenu()
HRESULT CLUI::CreateCLCWindow(const HWND hwndClui)
{
g_clistApi.hwndContactTree = CreateWindow(CLISTCONTROL_CLASSW, L"",
- WS_CHILD | WS_CLIPCHILDREN | CLS_CONTACTLIST | (Clist::UseGroups ? CLS_USEGROUPS : 0) | (Clist::HideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::HideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0 | CLS_MULTICOLUMN),
+ WS_CHILD | WS_CLIPCHILDREN | CLS_CONTACTLIST | (Clist::bUseGroups ? CLS_USEGROUPS : 0) | (Clist::bHideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::bHideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0 | CLS_MULTICOLUMN),
0, 0, 0, 0, hwndClui, nullptr, g_plugin.getInst(), nullptr);
return S_OK;
@@ -635,7 +635,7 @@ void CLUI_ChangeWindowMode()
if (!g_clistApi.hwndContactList) return;
g_bChangingMode = true;
- g_bTransparentFlag = g_plugin.getByte("Transparent", SETTING_TRANSPARENT_DEFAULT);
+ g_bTransparentFlag = Clist::bTransparent;
g_CluiData.fSmoothAnimation = db_get_b(0, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT) != 0;
if (g_bTransparentFlag == 0 && g_CluiData.bCurrentAlpha != 0)
g_CluiData.bCurrentAlpha = 255;
@@ -649,12 +649,12 @@ void CLUI_ChangeWindowMode()
styleEx = WS_EX_TOOLWINDOW;
styleMaskEx |= WS_EX_APPWINDOW;
}
- else if (db_get_b(0, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT) && g_plugin.getByte("ToolWindow", SETTING_TOOLWINDOW_DEFAULT)) {
+ else if (Clist::bShowCaption && Clist::bToolWindow) {
styleEx = WS_EX_TOOLWINDOW/*|WS_EX_WINDOWEDGE*/;
style = WS_CAPTION | WS_POPUPWINDOW | WS_CLIPCHILDREN | WS_THICKFRAME;
styleMaskEx |= WS_EX_APPWINDOW;
}
- else if (db_get_b(0, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT))
+ else if (Clist::bShowCaption)
style = WS_CAPTION | WS_SYSMENU | WS_POPUPWINDOW | WS_CLIPCHILDREN | WS_THICKFRAME | WS_MINIMIZEBOX;
else {
style = WS_POPUPWINDOW | WS_CLIPCHILDREN | WS_THICKFRAME;
@@ -711,7 +711,7 @@ void CLUI_ChangeWindowMode()
CLUI_UpdateAeroGlass();
- if (g_CluiData.fLayered || !db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT))
+ if (g_CluiData.fLayered || !Clist::bShowMainMenu)
SetMenu(g_clistApi.hwndContactList, nullptr);
else
SetMenu(g_clistApi.hwndContactList, g_clistApi.hMenuMain);
@@ -1270,7 +1270,7 @@ int CLUI_TestCursorOnBorders()
if (CLUI_CheckOwnedByClui(hAux)) {
if (g_bTransparentFlag) {
if (!bTransparentFocus && gf != hwnd) {
- CLUI_SmoothAlphaTransition(hwnd, g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT), 1);
+ CLUI_SmoothAlphaTransition(hwnd, Clist::iAlpha, 1);
bTransparentFocus = 1;
CLUI_SafeSetTimer(hwnd, TM_AUTOALPHA, 250, nullptr);
}
@@ -1757,7 +1757,7 @@ LRESULT CLUI::OnSizingMoving(UINT msg, WPARAM wParam, LPARAM lParam)
}
}
else {
- if (g_plugin.getByte("Min2Tray", SETTING_MIN2TRAY_DEFAULT)) {
+ if (Clist::bMinimizeToTray) {
CLUI_ShowWindowMod(m_hWnd, SW_HIDE);
g_plugin.setByte("State", SETTING_STATE_HIDDEN);
}
@@ -1801,7 +1801,7 @@ LRESULT CLUI::OnInitMenu(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/)
LRESULT CLUI::OnNcPaint(UINT msg, WPARAM wParam, LPARAM lParam)
{
int lRes = DefWindowProc(m_hWnd, msg, wParam, lParam);
- if (!g_CluiData.fLayered && db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT)) {
+ if (!g_CluiData.fLayered && Clist::bShowMainMenu) {
HDC hdc = nullptr;
if (msg == WM_PRINT) hdc = (HDC)wParam;
if (!hdc) hdc = GetWindowDC(m_hWnd);
@@ -2008,9 +2008,9 @@ LRESULT CLUI::OnAutoAlphaTimer(UINT, WPARAM, LPARAM)
// change
bTransparentFocus = inwnd;
if (bTransparentFocus)
- CLUI_SmoothAlphaTransition(m_hWnd, (uint8_t)g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT), 1);
+ CLUI_SmoothAlphaTransition(m_hWnd, Clist::iAlpha, 1);
else
- CLUI_SmoothAlphaTransition(m_hWnd, (uint8_t)(g_bTransparentFlag ? g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT) : 255), 1);
+ CLUI_SmoothAlphaTransition(m_hWnd, (uint8_t)(g_bTransparentFlag ? Clist::iAutoAlpha : 255), 1);
}
if (!bTransparentFocus)
KillTimer(m_hWnd, TM_AUTOALPHA);
@@ -2119,11 +2119,11 @@ LRESULT CLUI::OnActivate(UINT msg, WPARAM wParam, LPARAM lParam)
CLUI_SafeSetTimer(m_hWnd, TM_AUTOALPHA, 250, nullptr);
}
else {
- if (!g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT))
+ if (!Clist::bOnTop)
Sync(CLUIFrames_ActivateSubContainers, TRUE);
if (g_bTransparentFlag) {
KillTimer(m_hWnd, TM_AUTOALPHA);
- CLUI_SmoothAlphaTransition(m_hWnd, g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT), 1);
+ CLUI_SmoothAlphaTransition(m_hWnd, Clist::iAlpha, 1);
bTransparentFocus = 1;
}
}
@@ -2131,9 +2131,9 @@ LRESULT CLUI::OnActivate(UINT msg, WPARAM wParam, LPARAM lParam)
if (g_bTransparentFlag) {
uint8_t alpha;
if (wParam != WA_INACTIVE || CLUI_CheckOwnedByClui((HWND)lParam) || ((HWND)lParam == m_hWnd) || GetParent((HWND)lParam) == m_hWnd)
- alpha = g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT);
+ alpha = Clist::iAlpha;
else
- alpha = g_bTransparentFlag ? g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT) : 255;
+ alpha = g_bTransparentFlag ? Clist::iAutoAlpha : 255;
CLUI_SmoothAlphaTransition(m_hWnd, alpha, 1);
return 1;
}
@@ -2146,7 +2146,7 @@ LRESULT CLUI::OnSetCursor(UINT, WPARAM, LPARAM)
if (g_CluiData.nBehindEdgeState >= 0) CLUI_UpdateTimer();
if (g_bTransparentFlag) {
if (!bTransparentFocus && gf != m_hWnd) {
- CLUI_SmoothAlphaTransition(m_hWnd, g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT), 1);
+ CLUI_SmoothAlphaTransition(m_hWnd, Clist::iAlpha, 1);
bTransparentFocus = 1;
CLUI_SafeSetTimer(m_hWnd, TM_AUTOALPHA, 250, nullptr);
}
@@ -2198,14 +2198,14 @@ LRESULT CLUI::OnNcHitTest(UINT, WPARAM wParam, LPARAM lParam)
if (result == HTMENU) {
POINT pt = UNPACK_POINT(lParam);
int t = MenuItemFromPoint(m_hWnd, g_clistApi.hMenuMain, pt);
- if (t == -1 && (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)))
+ if (t == -1 && Clist::bClientAreaDrag)
return HTCAPTION;
}
if (result == HTCLIENT) {
POINT pt = UNPACK_POINT(lParam);
int k = CLUI_SizingOnBorder(pt, 0);
- if (!k && (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)))
+ if (!k && Clist::bClientAreaDrag)
return HTCAPTION;
else return k + 9;
}
@@ -2217,7 +2217,7 @@ LRESULT CLUI::OnShowWindow(UINT, WPARAM wParam, LPARAM lParam)
if (lParam) return 0;
if (mutex_bShowHideCalledFromAnimation) return 1;
- uint8_t gAlpha = (!wParam) ? 0 : (g_plugin.getByte("Transparent", SETTING_TRANSPARENT_DEFAULT) ? g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT) : 255);
+ uint8_t gAlpha = (!wParam) ? 0 : Clist::bTransparent ? Clist::iAlpha : 255;
if (wParam) {
g_CluiData.bCurrentAlpha = 0;
Sync(CLUIFrames_OnShowHide, 1);
@@ -2364,7 +2364,7 @@ LRESULT CLUI::OnClickNotify(NMCLISTCONTROL *pnmc)
if ((hitFlags & (CLCHT_NOWHERE | CLCHT_INLEFTMARGIN | CLCHT_BELOWITEMS)) == 0)
return DefCluiWndProc(WM_NOTIFY, 0, (LPARAM)pnmc);
- if (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
int res;
pt = pnmc->pt;
@@ -2373,7 +2373,7 @@ LRESULT CLUI::OnClickNotify(NMCLISTCONTROL *pnmc)
return res;
}
- if (db_get_b(0, "CLUI", "DragToScroll", SETTING_DRAGTOSCROLL_DEFAULT) && !db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT))
+ if (db_get_b(0, "CLUI", "DragToScroll", SETTING_DRAGTOSCROLL_DEFAULT) && !Clist::bClientAreaDrag)
return ClcEnterDragToScroll(g_clistApi.hwndContactTree, pnmc->pt.y);
return 0;
diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp
index 9fcbb96c19..0f40996ef8 100644
--- a/plugins/Clist_modern/src/modern_contact.cpp
+++ b/plugins/Clist_modern/src/modern_contact.cpp
@@ -169,7 +169,7 @@ INT_PTR SetUseGroups(WPARAM wParam, LPARAM)
if (!newVal == (int)wParam) return 0;
newVal = wParam;
}
- Clist::UseGroups = newVal;
+ Clist::bUseGroups = newVal;
SendMessage(g_clistApi.hwndContactTree, CLM_SETUSEGROUPS, newVal, 0);
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp
index ddfc4d6845..d891cbaa90 100644
--- a/plugins/Clist_modern/src/modern_toolbar.cpp
+++ b/plugins/Clist_modern/src/modern_toolbar.cpp
@@ -85,8 +85,8 @@ void Modern_InitButtons()
it.hButton = g_plugin.addTTB(&tbb);
}
- SetButtonPressed(3, Clist::HideOffline);
- SetButtonPressed(6, Clist::UseGroups);
+ SetButtonPressed(3, Clist::bHideOffline);
+ SetButtonPressed(6, Clist::bUseGroups);
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 4f69d62fde..78b428ac52 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -1340,7 +1340,7 @@ void ApplyViewMode(const char *szName)
if (g_CluiData.bFilterEffective & CLVM_FILTER_STATUS) {
if (g_CluiData.bOldHideOffline == -1)
- g_CluiData.bOldHideOffline = Clist::HideOffline;
+ g_CluiData.bOldHideOffline = Clist::bHideOffline;
g_clistApi.pfnSetHideOffline(false);
}
@@ -1352,7 +1352,7 @@ void ApplyViewMode(const char *szName)
int iValue = (g_CluiData.filterFlags & CLVM_USEGROUPS) ? 1 : ((g_CluiData.filterFlags & CLVM_DONOTUSEGROUPS) ? 0 : -1);
if (iValue != -1) {
if (g_CluiData.bOldUseGroups == -1)
- g_CluiData.bOldUseGroups = Clist::UseGroups;
+ g_CluiData.bOldUseGroups = Clist::bUseGroups;
CallService(MS_CLIST_SETUSEGROUPS, iValue, 0);
}
@@ -1364,7 +1364,7 @@ void ApplyViewMode(const char *szName)
iValue = (g_CluiData.filterFlags & CLVM_HIDEEMPTYGROUPS) ? 1 : ((g_CluiData.filterFlags & CLVM_SHOWEMPTYGROUPS) ? 0 : -1);
if (iValue != -1) {
if (g_CluiData.bOldHideEmptyGroups == -1)
- g_CluiData.bOldHideEmptyGroups = Clist::HideEmptyGroups;
+ g_CluiData.bOldHideEmptyGroups = Clist::bHideEmptyGroups;
SendMessage(g_clistApi.hwndContactTree, CLM_SETHIDEEMPTYGROUPS, iValue, 0);
}
diff --git a/plugins/Clist_nicer/src/CLCButton.cpp b/plugins/Clist_nicer/src/CLCButton.cpp
index c5888edc88..fdde53ffce 100644
--- a/plugins/Clist_nicer/src/CLCButton.cpp
+++ b/plugins/Clist_nicer/src/CLCButton.cpp
@@ -65,8 +65,8 @@ static void InitDefaultButtons()
}
g_pButton = nullptr;
- ClcSetButtonState(IDC_TBHIDEOFFLINE, Clist::HideOffline);
- ClcSetButtonState(IDC_TBHIDEGROUPS, Clist::UseGroups);
+ ClcSetButtonState(IDC_TBHIDEOFFLINE, Clist::bHideOffline);
+ ClcSetButtonState(IDC_TBHIDEGROUPS, Clist::bUseGroups);
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 afa208600c..59e9809b7b 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 (Clist::HideOffline)
+ if (Clist::bHideOffline)
return 0;
SendMessage(g_clistApi.hwndContactTree, INTM_STATUSCHANGED, hContact, lParam);
diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp
index c46019c179..1379980b14 100644
--- a/plugins/Clist_nicer/src/clistmod.cpp
+++ b/plugins/Clist_nicer/src/clistmod.cpp
@@ -168,7 +168,7 @@ int ShowHide()
switch (iVisibleState) {
case GWVS_PARTIALLY_COVERED:
//If we don't want to bring it to top, we can use a simple break. This goes against readability ;-) but the comment explains it.
- if (!g_plugin.getByte("BringToFront", SETTING_BRINGTOFRONT_DEFAULT))
+ if (!Clist::bBringToFront)
break;
case GWVS_COVERED: //Fall through (and we're already falling)
case GWVS_HIDDEN:
@@ -186,7 +186,7 @@ int ShowHide()
RECT rcWindow;
SetWindowPos(g_clistApi.hwndContactList, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOREDRAW | SWP_NOSENDCHANGING | SWP_NOCOPYBITS);
- if (!g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT))
+ if (!Clist::bOnTop)
SetWindowPos(g_clistApi.hwndContactList, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOREDRAW | SWP_NOSENDCHANGING | SWP_NOCOPYBITS);
SetForegroundWindow(g_clistApi.hwndContactList);
//SetActiveWindow(g_clistApi.hwndContactList);
diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp
index f065ebbbe2..1b8dca6242 100644
--- a/plugins/Clist_nicer/src/clistopts.cpp
+++ b/plugins/Clist_nicer/src/clistopts.cpp
@@ -53,14 +53,14 @@ public:
CheckDlgButton(m_hwnd, IDC_CLISTSUNKEN, cfg::dat.dwFlags & CLUI_FRAME_CLISTSUNKEN ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_EVENTAREAAUTOHIDE, cfg::dat.dwFlags & CLUI_FRAME_AUTOHIDENOTIFY ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_EVENTAREASUNKEN, (cfg::dat.dwFlags & CLUI_FRAME_EVENTAREASUNKEN) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_ALWAYSMULTI, !g_plugin.getByte("AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(m_hwnd, IDC_ALWAYSMULTI, !Clist::bAlwaysMulti ? BST_CHECKED : BST_UNCHECKED);
- chkCycle.SetState(g_plugin.getByte("TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_CYCLE);
- chkMulti.SetState(g_plugin.getByte("TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI);
- chkDontCycle.SetState(g_plugin.getByte("TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_SINGLE);
+ chkCycle.SetState(Clist::iTrayIcon == SETTING_TRAYICON_CYCLE);
+ chkMulti.SetState(Clist::iTrayIcon == SETTING_TRAYICON_MULTI);
+ chkDontCycle.SetState(Clist::iTrayIcon == SETTING_TRAYICON_SINGLE);
SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_SETRANGE, 0, MAKELONG(120, 1));
- SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("CycleTime", SETTING_CYCLETIME_DEFAULT), 0));
+ SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_SETPOS, 0, MAKELONG(Clist::iCycleTime, 0));
{
ptrA szPrimaryStatus(g_plugin.getStringA("PrimaryStatus"));
@@ -87,9 +87,9 @@ public:
bool OnApply() override
{
- g_plugin.setByte("AlwaysMulti", (uint8_t)BST_UNCHECKED == IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI));
- g_plugin.setByte("TrayIcon", (uint8_t)(chkDontCycle.GetState() ? SETTING_TRAYICON_SINGLE : (chkCycle.GetState() ? SETTING_TRAYICON_CYCLE : SETTING_TRAYICON_MULTI)));
- g_plugin.setWord("CycleTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0));
+ Clist::bAlwaysMulti = !IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI);
+ Clist::iTrayIcon = chkDontCycle.GetState() ? SETTING_TRAYICON_SINGLE : (chkCycle.GetState() ? SETTING_TRAYICON_CYCLE : SETTING_TRAYICON_MULTI);
+ Clist::iCycleTime = SendDlgItemMessage(m_hwnd, IDC_CYCLETIMESPIN, UDM_GETPOS, 0, 0);
g_plugin.setByte("AutoApplyLastViewMode", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_APPLYLASTVIEWMODE));
cfgSetFlag(m_hwnd, CLUI_FRAME_EVENTAREASUNKEN, IDC_EVENTAREASUNKEN);
@@ -276,15 +276,25 @@ public:
class COptWindowDlg : public CRowItemsBaseDlg
{
- CCtrlCheck chkAutoHide, chkAutoSize, chkTransparent;
+ CCtrlCheck chkAutoHide, chkAutoSize, chkTransparent, chkAreaDrag, chkShowMainMenu, chkOnTop, chkBringToFront;
public:
COptWindowDlg() :
CRowItemsBaseDlg(IDD_OPT_CLUI),
+ chkOnTop(this, IDC_ONTOP),
chkAutoHide(this, IDC_AUTOHIDE),
chkAutoSize(this, IDC_AUTOSIZE),
- chkTransparent(this, IDC_TRANSPARENT)
+ chkAreaDrag(this, IDC_CLIENTDRAG),
+ chkTransparent(this, IDC_TRANSPARENT),
+ chkBringToFront(this, IDC_BRINGTOFRONT),
+ chkShowMainMenu(this, IDC_SHOWMAINMENU)
{
+ CreateLink(chkOnTop, Clist::bOnTop);
+ CreateLink(chkAreaDrag, Clist::bClientAreaDrag);
+ CreateLink(chkAutoHide, Clist::bAutoHide);
+ CreateLink(chkBringToFront, Clist::bBringToFront);
+ CreateLink(chkShowMainMenu, Clist::bShowMainMenu);
+
chkAutoHide.OnChange = Callback(this, &COptWindowDlg::onChange_AutoHide);
chkAutoSize.OnChange = Callback(this, &COptWindowDlg::onChange_AutoSize);
chkTransparent.OnChange = Callback(this, &COptWindowDlg::onChange_Transparent);
@@ -292,11 +302,7 @@ public:
bool OnInitDialog() override
{
- CheckDlgButton(m_hwnd, IDC_BRINGTOFRONT, g_plugin.getByte("BringToFront", SETTING_BRINGTOFRONT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_ALWAYSHIDEONTASKBAR, g_plugin.getByte("AlwaysHideOnTB", 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_ONTOP, g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_SHOWMAINMENU, db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(m_hwnd, IDC_CLIENTDRAG, db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_FADEINOUT, cfg::dat.fadeinout ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_DROPSHADOW, g_plugin.getByte("WindowShadow", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(m_hwnd, IDC_ONDESKTOP, g_plugin.getByte("OnDesktop", 0) ? BST_CHECKED : BST_UNCHECKED);
@@ -328,9 +334,7 @@ public:
CheckDlgButton(m_hwnd, IDC_AUTOSIZEUPWARD, db_get_b(0, "CLUI", "AutoSizeUpward", 0) ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_SETRANGE, 0, MAKELONG(900, 1));
- SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT), 0));
-
- chkAutoHide.SetState(g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT));
+ SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(Clist::iHideTime, 0));
ptrW tszTitle(g_plugin.getWStringA("TitleText"));
if (tszTitle != NULL)
@@ -368,8 +372,7 @@ public:
cfg::dat.gapBetweenFrames = GetDlgItemInt(m_hwnd, IDC_FRAMEGAP, &translated, FALSE);
db_set_dw(0, "CLUIFrames", "GapBetweenFrames", cfg::dat.gapBetweenFrames);
- g_plugin.setByte("OnTop", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_ONTOP));
- SetWindowPos(g_clistApi.hwndContactList, IsDlgButtonChecked(m_hwnd, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
+ SetWindowPos(g_clistApi.hwndContactList, Clist::bOnTop ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
cfg::dat.bCLeft = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_CLEFTSPIN, UDM_GETPOS, 0, 0);
cfg::dat.bCRight = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_CRIGHTSPIN, UDM_GETPOS, 0, 0);
@@ -379,7 +382,6 @@ public:
db_set_dw(0, "CLUI", "clmargins", MAKELONG(MAKEWORD(cfg::dat.bCLeft, cfg::dat.bCRight), MAKEWORD(cfg::dat.bCTop, cfg::dat.bCBottom)));
SendMessage(g_clistApi.hwndContactList, WM_SIZE, 0, 0);
- g_plugin.setByte("BringToFront", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_BRINGTOFRONT));
g_plugin.setByte("AlwaysHideOnTB", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_ALWAYSHIDEONTASKBAR));
if (windowStyle != SETTING_WINDOWSTYLE_DEFAULT) {
@@ -416,9 +418,6 @@ public:
db_set_dw(0, "CLUI", "Frameflags", cfg::dat.dwFlags);
db_set_b(0, "CLUI", "clipborder", cfg::dat.bClipBorder);
- db_set_b(0, "CLUI", "ShowMainMenu", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_SHOWMAINMENU));
- db_set_b(0, "CLUI", "ClientAreaDrag", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_CLIENTDRAG));
-
ApplyCLUIBorderStyle();
if (BST_UNCHECKED == IsDlgButtonChecked(m_hwnd, IDC_SHOWMAINMENU))
@@ -441,12 +440,11 @@ public:
db_set_b(0, "CLUI", "MaxSizeHeight", (uint8_t)GetDlgItemInt(m_hwnd, IDC_MAXSIZEHEIGHT, nullptr, FALSE));
db_set_b(0, "CLUI", "AutoSizeUpward", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZEUPWARD));
- g_plugin.setByte("AutoHide", chkAutoHide.GetState());
- g_plugin.setWord("HideTime", (uint16_t)SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
+ Clist::iHideTime = SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0);
- g_plugin.setByte("Transparent", cfg::dat.isTransparent = chkTransparent.GetState());
- g_plugin.setByte("Alpha", cfg::dat.alpha = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
- g_plugin.setByte("AutoAlpha", cfg::dat.autoalpha = (uint8_t)SendDlgItemMessage(m_hwnd, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0));
+ Clist::bTransparent = cfg::dat.isTransparent = chkTransparent.GetState();
+ Clist::iAlpha = cfg::dat.alpha = SendDlgItemMessage(m_hwnd, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0);
+ Clist::iAutoAlpha = cfg::dat.autoalpha = SendDlgItemMessage(m_hwnd, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0);
g_plugin.setByte("WindowShadow", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_DROPSHADOW));
g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(m_hwnd, IDC_ONDESKTOP));
db_set_dw(0, "CLUI", "Frameflags", cfg::dat.dwFlags);
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index 29682c4f65..0cff6042ec 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -160,7 +160,7 @@ static int FS_FontsChanged(WPARAM, LPARAM)
static HWND PreCreateCLC(HWND parent)
{
g_clistApi.hwndContactTree = CreateWindow(CLISTCONTROL_CLASSW, L"",
- WS_CHILD | CLS_CONTACTLIST | (Clist::UseGroups ? CLS_USEGROUPS : 0) | (Clist::HideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::HideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0) | CLS_MULTICOLUMN,
+ WS_CHILD | CLS_CONTACTLIST | (Clist::bUseGroups ? CLS_USEGROUPS : 0) | (Clist::bHideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::bHideEmptyGroups ? 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);
@@ -446,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, Clist::HideOffline, 0);
+ SendMessage(buttonItem->hWnd, BM_SETCHECK, Clist::bHideOffline, 0);
break;
case IDC_STBHIDEGROUPS:
- SendMessage(buttonItem->hWnd, BM_SETCHECK, Clist::UseGroups, 0);
+ SendMessage(buttonItem->hWnd, BM_SETCHECK, Clist::bUseGroups, 0);
break;
}
}
@@ -726,7 +726,7 @@ static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, MCO
static void ShowCLUI(HWND hwnd)
{
int state = old_cliststate;
- int onTop = g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT);
+ int onTop = Clist::bOnTop;
SendMessage(hwnd, WM_SETREDRAW, FALSE, FALSE);
@@ -1148,7 +1148,7 @@ skipbg:
SetLayeredWindowAttributes(hwnd, cfg::dat.bFullTransparent ? cfg::dat.colorkey : RGB(0, 0, 0), cfg::dat.alpha, LWA_ALPHA | (cfg::dat.bFullTransparent ? LWA_COLORKEY : 0));
transparentFocus = 1;
}
- SetWindowPos(g_clistApi.hwndContactList, g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOREDRAW | SWP_NOSENDCHANGING);
+ SetWindowPos(g_clistApi.hwndContactList, Clist::bOnTop ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOREDRAW | SWP_NOSENDCHANGING);
}
PostMessage(hwnd, CLUIINTM_REMOVEFROMTASKBAR, 0, 0);
return DefWindowProc(hwnd, msg, wParam, lParam);
@@ -1558,7 +1558,7 @@ buttons_done:
if ((hitFlags & (CLCHT_NOWHERE | CLCHT_INLEFTMARGIN | CLCHT_BELOWITEMS)) == 0)
break;
- if (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
pt = nm->pt;
ClientToScreen(g_clistApi.hwndContactTree, &pt);
@@ -1771,7 +1771,7 @@ void LoadCLUIModule(void)
wndclass.lpszClassName = L"EventAreaClass";
RegisterClass(&wndclass);
- oldhideoffline = Clist::HideOffline;
+ oldhideoffline = Clist::bHideOffline;
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/cluiframes.cpp b/plugins/Clist_nicer/src/cluiframes.cpp
index 0e5fe2c1d5..81d68a682e 100644
--- a/plugins/Clist_nicer/src/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/cluiframes.cpp
@@ -2362,7 +2362,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
}
if ((!(wParam&MK_CONTROL)) && Frames[framepos].Locked && (!(Frames[framepos].floating))) {
- if (db_get_b(0, "CLUI", "ClientAreaDrag", 0)) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
GetCursorPos(&pt);
return SendMessage(GetParent(hwnd), WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
diff --git a/plugins/Clist_nicer/src/cluiopts.cpp b/plugins/Clist_nicer/src/cluiopts.cpp
index c01e3bafe4..90276ffe7b 100644
--- a/plugins/Clist_nicer/src/cluiopts.cpp
+++ b/plugins/Clist_nicer/src/cluiopts.cpp
@@ -66,5 +66,5 @@ void ApplyCLUIBorderStyle()
p.showCmd = SW_HIDE;
SetWindowPlacement(g_clistApi.hwndContactList, &p);
- g_plugin.setByte("Min2Tray", minToTray);
+ Clist::bMinimizeToTray = minToTray;
}
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp
index 7a2e3d3daf..4ec2a18cc0 100644
--- a/plugins/Clist_nicer/src/init.cpp
+++ b/plugins/Clist_nicer/src/init.cpp
@@ -131,9 +131,9 @@ int CMPlugin::Load()
cfg::dat.avatarSize = g_plugin.getWord("AvatarSize", 24);
cfg::dat.dualRowMode = db_get_b(0, "CLC", "DualRowMode", 0);
cfg::dat.avatarPadding = g_plugin.getByte("AvatarPadding", 0);
- cfg::dat.isTransparent = g_plugin.getByte("Transparent", 0);
- cfg::dat.alpha = g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT);
- cfg::dat.autoalpha = g_plugin.getByte("AutoAlpha", SETTING_ALPHA_DEFAULT);
+ cfg::dat.isTransparent = Clist::bTransparent;
+ cfg::dat.alpha = Clist::iAlpha;
+ cfg::dat.autoalpha = Clist::iAutoAlpha;
cfg::dat.fadeinout = db_get_b(0, "CLUI", "FadeInOut", 0);
cfg::dat.autosize = db_get_b(0, "CLUI", "AutoSize", 0);
cfg::dat.bNoOfflineAvatars = g_plugin.getByte("NoOfflineAV", 1);
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp
index 6742f8f5f7..2242019ba8 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 == (uint8_t)-1)
- cfg::dat.boldHideOffline = Clist::HideOffline;
+ cfg::dat.boldHideOffline = Clist::bHideOffline;
g_clistApi.pfnSetHideOffline(false);
if (name == nullptr) {
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index 3be675019a..0f510eb963 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -777,7 +777,7 @@ public:
void onResetClist(CCtrlClc *)
{
- m_list.SetUseGroups(Clist::UseGroups);
+ m_list.SetUseGroups(Clist::bUseGroups);
m_list.SetHideEmptyGroups(true);
}
};
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index cf3e4aa90a..f6a057223d 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -572,8 +572,8 @@ HWND CMsgDialog::DM_CreateClist()
if (hItem)
SendMessage(hwndClist, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
- SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, Clist::HideEmptyGroups, 0);
- SendMessage(hwndClist, CLM_SETUSEGROUPS, Clist::UseGroups, 0);
+ SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, Clist::bHideEmptyGroups, 0);
+ SendMessage(hwndClist, CLM_SETUSEGROUPS, Clist::bUseGroups, 0);
SendMessage(hwndClist, CLM_FIRST + 106, 0, 1);
SendMessage(hwndClist, CLM_AUTOREBUILD, 0, 0);
if (hwndClist)
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp
index 14845f77c9..3c1e0b864e 100644
--- a/plugins/TipperYM/src/options.cpp
+++ b/plugins/TipperYM/src/options.cpp
@@ -2000,7 +2000,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, Clist::UseGroups, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, Clist::bUseGroups, 0);
for (auto &hContact : Contacts()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp
index 305aee611e..c41c52e364 100644
--- a/plugins/TopToolBar/src/InternalButtons.cpp
+++ b/plugins/TopToolBar/src/InternalButtons.cpp
@@ -158,8 +158,8 @@ void InitInternalButtons()
ttb.hIconHandleUp = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
hExit = g_plugin.addTTB(&ttb);
- 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)hShowHideOffline, Clist::bHideOffline ? 0 : TTBST_PUSHED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hGroups, Clist::bUseGroups ? TTBST_PUSHED : 0);
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hSounds,
db_get_b(0, "Skin", "UseSound", 1) ? TTBST_PUSHED : 0);
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp
index 2d11410c4c..63aac5b375 100644
--- a/plugins/TopToolBar/src/toolbarwnd.cpp
+++ b/plugins/TopToolBar/src/toolbarwnd.cpp
@@ -162,7 +162,7 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
return 0;
case WM_LBUTTONDOWN:
- if (db_get_b(0, "CLUI", "ClientAreaDrag", 0)) {
+ if (Clist::bClientAreaDrag) {
POINT pt;
GetCursorPos(&pt);
return SendMessage(GetParent(hwnd), WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp
index 4eece0aa35..a14acc0b8e 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, Clist::UseGroups, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, Clist::bUseGroups, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
}
diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp
index e0bdfb7c34..58f21cfbab 100644
--- a/src/core/stdclist/src/clistopts.cpp
+++ b/src/core/stdclist/src/clistopts.cpp
@@ -49,19 +49,18 @@ public:
bool OnInitDialog() override
{
- sortByName.SetState(!g_plugin.getByte("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT) && !g_plugin.getByte("SortByProto", SETTING_SORTBYPROTO_DEFAULT));
- sortByProto.SetState(g_plugin.getByte("SortByProto", SETTING_SORTBYPROTO_DEFAULT));
- sortByStatus.SetState(g_plugin.getByte("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT));
+ sortByName.SetState(!g_plugin.bSortByStatus && !g_plugin.bSortByProto);
+ sortByProto.SetState(g_plugin.bSortByProto);
+ sortByStatus.SetState(g_plugin.bSortByStatus);
chkOfflineBottom.SetState(g_plugin.getByte("NoOfflineBottom"));
- CheckDlgButton(m_hwnd, IDC_ALWAYSMULTI, !g_plugin.getByte("AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT));
+ CheckDlgButton(m_hwnd, IDC_ALWAYSMULTI, !Clist::bAlwaysMulti);
- int iTrayIcon = g_plugin.getByte("TrayIcon", SETTING_TRAYICON_DEFAULT);
- chkCycle.SetState(iTrayIcon == SETTING_TRAYICON_CYCLE);
- chkMulti.SetState(iTrayIcon == SETTING_TRAYICON_MULTI);
- chkDontCycle.SetState(iTrayIcon == SETTING_TRAYICON_SINGLE);
+ chkCycle.SetState(Clist::iTrayIcon == SETTING_TRAYICON_CYCLE);
+ chkMulti.SetState(Clist::iTrayIcon == SETTING_TRAYICON_MULTI);
+ chkDontCycle.SetState(Clist::iTrayIcon == SETTING_TRAYICON_SINGLE);
- cycleTime.SetPosition(g_plugin.getWord("CycleTime", SETTING_CYCLETIME_DEFAULT));
+ cycleTime.SetPosition(Clist::iCycleTime);
ptrA szPrimaryStatus(g_plugin.getStringA("PrimaryStatus"));
@@ -81,12 +80,12 @@ public:
bool OnApply() override
{
- g_plugin.setByte("SortByStatus", g_bSortByStatus = sortByStatus.IsChecked());
- g_plugin.setByte("SortByProto", g_bSortByProto = sortByProto.IsChecked());
+ g_plugin.bSortByStatus = g_bSortByStatus = sortByStatus.IsChecked();
+ g_plugin.bSortByProto = g_bSortByProto = sortByProto.IsChecked();
g_plugin.setByte("OfflineBottom", g_bOfflineToBottom = chkOfflineBottom.IsChecked());
- g_plugin.setByte("AlwaysMulti", !IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI));
- g_plugin.setByte("TrayIcon", (chkDontCycle.IsChecked() ? SETTING_TRAYICON_SINGLE : (chkCycle.IsChecked() ? SETTING_TRAYICON_CYCLE : SETTING_TRAYICON_MULTI)));
- g_plugin.setWord("CycleTime", cycleTime.GetPosition());
+ Clist::bAlwaysMulti = !IsDlgButtonChecked(m_hwnd, IDC_ALWAYSMULTI);
+ Clist::iTrayIcon = chkDontCycle.IsChecked() ? SETTING_TRAYICON_SINGLE : (chkCycle.IsChecked() ? SETTING_TRAYICON_CYCLE : SETTING_TRAYICON_MULTI);
+ Clist::iCycleTime = cycleTime.GetPosition();
PROTOACCOUNT *pa = (PROTOACCOUNT *)status.GetCurData();
if (pa == nullptr)
diff --git a/src/core/stdclist/src/cluiopts.cpp b/src/core/stdclist/src/cluiopts.cpp
index 892874b573..61d5baca69 100644
--- a/src/core/stdclist/src/cluiopts.cpp
+++ b/src/core/stdclist/src/cluiopts.cpp
@@ -29,35 +29,33 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_BRINGTOFRONT, g_plugin.getByte("BringToFront", SETTING_BRINGTOFRONT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ONTOP, g_plugin.getByte("OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TOOLWND, g_plugin.getByte("ToolWindow", SETTING_TOOLWINDOW_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MIN2TRAY, g_plugin.getByte("Min2Tray", SETTING_MIN2TRAY_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_BRINGTOFRONT, Clist::bBringToFront);
+ CheckDlgButton(hwndDlg, IDC_ONTOP, Clist::bOnTop);
+ CheckDlgButton(hwndDlg, IDC_TOOLWND, Clist::bToolWindow);
+ CheckDlgButton(hwndDlg, IDC_MIN2TRAY, Clist::bMinimizeToTray);
if (IsDlgButtonChecked(hwndDlg, IDC_TOOLWND))
EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), FALSE);
- CheckDlgButton(hwndDlg, IDC_SHOWCAPTION, db_get_b(0, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWMAINMENU, db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWCAPTION, Clist::bShowCaption);
+ CheckDlgButton(hwndDlg, IDC_SHOWMAINMENU, Clist::bShowMainMenu);
+ CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, Clist::bClientAreaDrag);
if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_MIN2TRAY), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_TOOLWND), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_TITLETEXT), FALSE);
}
- CheckDlgButton(hwndDlg, IDC_FADEINOUT, db_get_b(0, "CLUI", "FadeInOut", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTOSIZE, db_get_b(0, "CLUI", "AutoSize", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DROPSHADOW, g_plugin.getByte("WindowShadow", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ONDESKTOP, g_plugin.getByte("OnDesktop", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DISABLEDOCKING, db_get_b(0, "CLUI", "DockToSides", 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_FADEINOUT, db_get_b(0, "CLUI", "FadeInOut", 0));
+ CheckDlgButton(hwndDlg, IDC_AUTOSIZE, db_get_b(0, "CLUI", "AutoSize", 0));
+ CheckDlgButton(hwndDlg, IDC_DROPSHADOW, g_plugin.getByte("WindowShadow", 0));
+ CheckDlgButton(hwndDlg, IDC_ONDESKTOP, g_plugin.getByte("OnDesktop", 0));
+ CheckDlgButton(hwndDlg, IDC_DISABLEDOCKING, db_get_b(0, "CLUI", "DockToSides", 1));
SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETPOS, 0, db_get_b(0, "CLUI", "MaxSizeHeight", 75));
- CheckDlgButton(hwndDlg, IDC_AUTOSIZEUPWARD, db_get_b(0, "CLUI", "AutoSizeUpward", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTOHIDE,
- g_plugin.getByte("AutoHide", SETTING_AUTOHIDE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AUTOSIZEUPWARD, db_get_b(0, "CLUI", "AutoSizeUpward", 0));
+ CheckDlgButton(hwndDlg, IDC_AUTOHIDE, Clist::bAutoHide);
SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETRANGE, 0, MAKELONG(900, 1));
- SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETPOS, 0,
- MAKELONG(g_plugin.getWord("HideTime", SETTING_HIDETIME_DEFAULT), 0));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(Clist::iHideTime, 0));
EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIME), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC01), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
@@ -75,7 +73,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
else
SetDlgItemTextA(hwndDlg, IDC_TITLETEXT, MIRANDANAME);
}
- CheckDlgButton(hwndDlg, IDC_TRANSPARENT, g_plugin.getByte("Transparent", SETTING_TRANSPARENT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENT, Clist::bTransparent);
if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_STATIC11), FALSE);
@@ -88,8 +86,8 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
- SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETPOS, TRUE, g_plugin.getByte("Alpha", SETTING_ALPHA_DEFAULT));
- SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETPOS, TRUE, g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT));
+ SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETPOS, TRUE, Clist::iAlpha);
+ SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETPOS, TRUE, Clist::iAutoAlpha);
SendMessage(hwndDlg, WM_HSCROLL, 0x12345678, 0);
return TRUE;
@@ -135,35 +133,36 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
case WM_HSCROLL:
{
char str[10];
- mir_snprintf(str, "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0) / 255);
+ mir_snprintf(str, "%d%%", 100 * (int)SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0) / 255);
SetDlgItemTextA(hwndDlg, IDC_INACTIVEPERC, str);
- mir_snprintf(str, "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0) / 255);
+ mir_snprintf(str, "%d%%", 100 * (int)SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0) / 255);
SetDlgItemTextA(hwndDlg, IDC_ACTIVEPERC, str);
}
if (wParam != 0x12345678)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
+
case WM_NOTIFY:
if (((LPNMHDR)lParam)->code == PSN_APPLY) {
- g_plugin.setByte("OnTop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONTOP));
- g_plugin.setByte("ToolWindow", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_TOOLWND));
- g_plugin.setByte("BringToFront", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_BRINGTOFRONT));
+ Clist::bOnTop = IsDlgButtonChecked(hwndDlg, IDC_ONTOP);
+ Clist::bToolWindow = IsDlgButtonChecked(hwndDlg, IDC_TOOLWND);
+ Clist::bBringToFront = IsDlgButtonChecked(hwndDlg, IDC_BRINGTOFRONT);
db_set_b(0, "CLUI", "FadeInOut", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_FADEINOUT));
db_set_b(0, "CLUI", "AutoSize", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
db_set_b(0, "CLUI", "MaxSizeHeight", (uint8_t)GetDlgItemInt(hwndDlg, IDC_MAXSIZEHEIGHT, nullptr, FALSE));
db_set_b(0, "CLUI", "AutoSizeUpward", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZEUPWARD));
- g_plugin.setByte("AutoHide", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- g_plugin.setWord("HideTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
- g_plugin.setByte("Transparent", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
- g_plugin.setByte("Alpha", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
- g_plugin.setByte("AutoAlpha", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0));
+ Clist::bAutoHide = IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE);
+ Clist::iHideTime = SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0);
+ Clist::bTransparent = IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT);
+ Clist::iAlpha = SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0);
+ Clist::iAutoAlpha = SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0);
g_plugin.setByte("WindowShadow", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DROPSHADOW));
g_plugin.setByte("OnDesktop", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP));
db_set_b(0, "CLUI", "DockToSides", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_DISABLEDOCKING));
- db_set_b(0, "CLUI", "ShowCaption", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION));
- db_set_b(0, "CLUI", "ShowMainMenu", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_SHOWMAINMENU));
- db_set_b(0, "CLUI", "ClientAreaDrag", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_CLIENTDRAG));
- g_plugin.setByte("Min2Tray", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY));
+ Clist::bShowCaption = IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION);
+ Clist::bShowMainMenu = IsDlgButtonChecked(hwndDlg, IDC_SHOWMAINMENU);
+ Clist::bClientAreaDrag = IsDlgButtonChecked(hwndDlg, IDC_CLIENTDRAG);
+ Clist::bMinimizeToTray = IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY);
{
wchar_t title[256];
GetDlgItemText(hwndDlg, IDC_TITLETEXT, title, _countof(title));
@@ -218,7 +217,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
ShowWindow(g_clistApi.hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY) ? SW_HIDE : SW_SHOW);
if (IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT)) {
SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
- SetLayeredWindowAttributes(g_clistApi.hwndContactList, RGB(0, 0, 0), (uint8_t)g_plugin.getByte("AutoAlpha", SETTING_AUTOALPHA_DEFAULT), LWA_ALPHA);
+ SetLayeredWindowAttributes(g_clistApi.hwndContactList, RGB(0, 0, 0), Clist::iAutoAlpha, LWA_ALPHA);
}
else
SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
@@ -237,18 +236,18 @@ static INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_SHOWSBAR, db_get_b(0, "CLUI", "ShowSBar", 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWSBAR, db_get_b(0, "CLUI", "ShowSBar", 1));
{
uint8_t showOpts = db_get_b(0, "CLUI", "SBarShow", 1);
- CheckDlgButton(hwndDlg, IDC_SHOWICON, showOpts & 1 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWPROTO, showOpts & 2 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWSTATUS, showOpts & 4 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWICON, showOpts & 1);
+ CheckDlgButton(hwndDlg, IDC_SHOWPROTO, showOpts & 2);
+ CheckDlgButton(hwndDlg, IDC_SHOWSTATUS, showOpts & 4);
}
CheckDlgButton(hwndDlg, IDC_RIGHTSTATUS, db_get_b(0, "CLUI", "SBarRightClk", 0) ? BST_UNCHECKED : BST_CHECKED);
- CheckDlgButton(hwndDlg, IDC_RIGHTMIRANDA, IsDlgButtonChecked(hwndDlg, IDC_RIGHTSTATUS) == BST_UNCHECKED ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_EQUALSECTIONS, db_get_b(0, "CLUI", "EqualSections", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SBPANELBEVEL, db_get_b(0, "CLUI", "SBarBevel", 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWGRIP, db_get_b(0, "CLUI", "ShowGrip", 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_RIGHTMIRANDA, IsDlgButtonChecked(hwndDlg, IDC_RIGHTSTATUS) == BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_EQUALSECTIONS, db_get_b(0, "CLUI", "EqualSections", 0));
+ CheckDlgButton(hwndDlg, IDC_SBPANELBEVEL, db_get_b(0, "CLUI", "SBarBevel", 1));
+ CheckDlgButton(hwndDlg, IDC_SHOWGRIP, db_get_b(0, "CLUI", "ShowGrip", 1));
if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_SHOWSBAR)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWICON), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWPROTO), FALSE);
diff --git a/src/core/stdclist/src/init.cpp b/src/core/stdclist/src/init.cpp
index a918b62e02..b44dfb3a04 100644
--- a/src/core/stdclist/src/init.cpp
+++ b/src/core/stdclist/src/init.cpp
@@ -56,8 +56,11 @@ PLUGININFOEX pluginInfoEx = {
};
CMPlugin::CMPlugin() :
- PLUGIN<CMPlugin>("CList", pluginInfoEx)
-{}
+ PLUGIN<CMPlugin>("CList", pluginInfoEx),
+ bSortByProto(m_szModuleName, "SortByProto", false),
+ bSortByStatus(m_szModuleName, "SortByStatus", false)
+{
+}
/////////////////////////////////////////////////////////////////////////////////////////
// returns plugin's interfaces information
@@ -112,8 +115,8 @@ int CMPlugin::Load()
g_plugin.delSetting("NoOfflineBottom");
}
- g_bSortByStatus = g_plugin.getBool("SortByStatus", SETTING_SORTBYSTATUS_DEFAULT);
- g_bSortByProto = g_plugin.getBool("SortByProto", SETTING_SORTBYPROTO_DEFAULT);
+ g_bSortByStatus = bSortByStatus;
+ g_bSortByProto = bSortByProto;
g_bOfflineToBottom = g_plugin.getBool("OfflineBottom", true);
Clist_GetInterface();
diff --git a/src/core/stdclist/src/stdafx.h b/src/core/stdclist/src/stdafx.h
index 8fa152e0de..55168cad80 100644
--- a/src/core/stdclist/src/stdafx.h
+++ b/src/core/stdclist/src/stdafx.h
@@ -59,6 +59,8 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+ CMOption<bool> bSortByStatus, bSortByProto;
+
int Load() override;
};
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index 3fd9bf5bad..f0a0266488 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -429,7 +429,7 @@ public:
void ResetCList(CCtrlClc::TEventInfo* = nullptr)
{
- clist.SetUseGroups(Clist::UseGroups);
+ clist.SetUseGroups(Clist::bUseGroups);
clist.SetHideEmptyGroups(1);
}
diff --git a/src/mir_app/mir_app.vcxproj b/src/mir_app/mir_app.vcxproj
index 85bcd1d071..8ba67cd5d1 100644
--- a/src/mir_app/mir_app.vcxproj
+++ b/src/mir_app/mir_app.vcxproj
@@ -175,6 +175,9 @@
<ClCompile Include="src\usedIcons.cpp" />
<ClCompile Include="src\utils.cpp" />
<ClCompile Include="src\userInfo.cpp" />
+ <ClInclude Include="..\..\include\m_clc.h" />
+ <ClInclude Include="..\..\include\m_clist.h" />
+ <ClInclude Include="..\..\include\m_clistint.h" />
<ClInclude Include="src\chat.h" />
<ClInclude Include="src\clc.h" />
<ClInclude Include="src\database.h" />
diff --git a/src/mir_app/mir_app.vcxproj.filters b/src/mir_app/mir_app.vcxproj.filters
index 4fb2f19c70..554aeccc7d 100644
--- a/src/mir_app/mir_app.vcxproj.filters
+++ b/src/mir_app/mir_app.vcxproj.filters
@@ -499,6 +499,15 @@
<ClInclude Include="src\findadd.h">
<Filter>Source Files\FindAdd</Filter>
</ClInclude>
+ <ClInclude Include="..\..\include\m_clc.h">
+ <Filter>Source Files\Contact list</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\m_clist.h">
+ <Filter>Source Files\Contact list</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\m_clistint.h">
+ <Filter>Source Files\Contact list</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\resource.rc">
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h
index 20540c0fdd..bd6ccd49c0 100644
--- a/src/mir_app/src/clc.h
+++ b/src/mir_app/src/clc.h
@@ -98,7 +98,7 @@ int ClcOptInit(WPARAM, LPARAM);
namespace Clist
{
- extern CMOption<bool> RemoveTempContacts, EnableIconBlink, EnableTrayFlash;
+ extern CMOption<bool> bRemoveTempContacts, bEnableIconBlink, bEnableTrayFlash;
};
/* clistmenus.c */
diff --git a/src/mir_app/src/clccontact.cpp b/src/mir_app/src/clccontact.cpp
index 8d9d7c85c1..973316efa4 100644
--- a/src/mir_app/src/clccontact.cpp
+++ b/src/mir_app/src/clccontact.cpp
@@ -29,7 +29,7 @@ extern HANDLE hGroupChangeEvent;
MIR_APP_DLL(void) Clist_LoadContactTree(void)
{
- bool hideOffline = Clist::HideOffline;
+ bool hideOffline = Clist::bHideOffline;
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 = !Clist::HideOffline;
+ iValue = !Clist::bHideOffline;
switch (iValue) {
case 0:
case 1:
- Clist::HideOffline = iValue;
+ Clist::bHideOffline = iValue;
break;
default:
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp
index 57d9997037..3000d7132c 100644
--- a/src/mir_app/src/clcutils.cpp
+++ b/src/mir_app/src/clcutils.cpp
@@ -728,7 +728,7 @@ void fnLoadClcOptions(HWND hwnd, ClcData *dat, BOOL bFirst)
dat->gammaCorrection = db_get_b(0, "CLC", "GammaCorrect", CLCDEFAULT_GAMMACORRECT);
dat->bShowIdle = db_get_b(0, "CLC", "ShowIdle", CLCDEFAULT_SHOWIDLE) != 0;
dat->bNoVScrollbar = db_get_b(0, "CLC", "NoVScrollBar", false) != 0;
- dat->bFilterSearch = Clist::FilterSearch;
+ dat->bFilterSearch = Clist::bFilterSearch;
SendMessage(hwnd, INTM_SCROLLBARCHANGED, 0, 0);
dat->greyoutFlags = db_get_dw(0, "CLC", "GreyoutFlags", CLCDEFAULT_GREYOUTFLAGS);
diff --git a/src/mir_app/src/clistevents.cpp b/src/mir_app/src/clistevents.cpp
index 9dd77b3d3b..7933408654 100644
--- a/src/mir_app/src/clistevents.cpp
+++ b/src/mir_app/src/clistevents.cpp
@@ -404,17 +404,17 @@ static int CListEventSettingsChanged(WPARAM hContact, LPARAM lParam)
int InitCListEvents(void)
{
if (db_get_b(0, MODULENAME, "DisableTrayFlash")) {
- Clist::EnableTrayFlash = false;
+ Clist::bEnableTrayFlash = false;
db_unset(0, MODULENAME, "DisableTrayFlash");
}
if (db_get_b(0, MODULENAME, "DisableIconBlink")) {
- Clist::EnableIconBlink = false;
+ Clist::bEnableIconBlink = false;
db_unset(0, MODULENAME, "DisableIconBlink");
}
- g_bEnableTrayFlash = Clist::EnableTrayFlash;
- g_bEnableIconFlash = Clist::EnableIconBlink;
+ g_bEnableTrayFlash = Clist::bEnableTrayFlash;
+ g_bEnableIconFlash = Clist::bEnableIconBlink;
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, CListEventSettingsChanged);
HookEvent(ME_DB_EVENT_MARKED_READ, CListEventMarkedRead);
diff --git a/src/mir_app/src/clistgroups.cpp b/src/mir_app/src/clistgroups.cpp
index 655dad825c..04ba6e6326 100644
--- a/src/mir_app/src/clistgroups.cpp
+++ b/src/mir_app/src/clistgroups.cpp
@@ -225,7 +225,7 @@ MIR_APP_DLL(int) Clist_GroupDelete(MGROUP hGroup, bool bSilent)
if (pGroup == nullptr)
return 1;
- if (!bSilent && Clist::ConfirmDelete) {
+ if (!bSilent && Clist::bConfirmDelete) {
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);
if (MessageBoxW(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 cb09bec6e8..dede1547b0 100644
--- a/src/mir_app/src/clistmod.cpp
+++ b/src/mir_app/src/clistmod.cpp
@@ -336,7 +336,7 @@ int fnShowHide()
switch (iVisibleState) {
case GWVS_PARTIALLY_COVERED:
//If we don't want to bring it to top, we can use a simple break. This goes against readability ;-) but the comment explains it.
- if (!db_get_b(0, "CList", "BringToFront", SETTING_BRINGTOFRONT_DEFAULT))
+ if (!Clist::bBringToFront)
break;
case GWVS_COVERED: //Fall through (and we're already falling)
case GWVS_HIDDEN:
@@ -351,7 +351,7 @@ int fnShowHide()
if (bShow == TRUE) {
ShowWindow(g_clistApi.hwndContactList, SW_RESTORE);
- if (!db_get_b(0, "CList", "OnTop", SETTING_ONTOP_DEFAULT))
+ if (!Clist::bOnTop)
SetWindowPos(g_clistApi.hwndContactList, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
else
SetWindowPos(g_clistApi.hwndContactList, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
@@ -366,8 +366,7 @@ int fnShowHide()
MoveWindow(g_clistApi.hwndContactList, rcWindow.left, rcWindow.top, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top, TRUE);
}
else { // It needs to be hidden
- if (db_get_b(0, "CList", "ToolWindow", SETTING_TOOLWINDOW_DEFAULT) ||
- db_get_b(0, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT)) {
+ if (Clist::bToolWindow || Clist::bMinimizeToTray) {
ShowWindow(g_clistApi.hwndContactList, SW_HIDE);
db_set_b(0, "CList", "State", SETTING_STATE_HIDDEN);
}
@@ -433,7 +432,7 @@ void UnloadContactListModule()
return;
// remove transitory contacts
- if (Clist::RemoveTempContacts) {
+ if (Clist::bRemoveTempContacts) {
for (MCONTACT hContact = db_find_first(); hContact != 0; ) {
MCONTACT hNext = db_find_next(hContact);
if (!Contact::OnList(hContact))
diff --git a/src/mir_app/src/clistopts.cpp b/src/mir_app/src/clistopts.cpp
index ac0e2018c1..d2c1cfeab5 100644
--- a/src/mir_app/src/clistopts.cpp
+++ b/src/mir_app/src/clistopts.cpp
@@ -25,21 +25,43 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
#include "clc.h"
-CMOption<bool> Clist::UseGroups(MODULENAME, "UseGroups", true);
-CMOption<bool> Clist::HideOffline(MODULENAME, "HideOffline", false);
-CMOption<bool> Clist::ConfirmDelete(MODULENAME, "ConfirmDelete", true);
-CMOption<bool> Clist::EnableIconBlink(MODULENAME, "EnableIconBlink", true);
-CMOption<bool> Clist::EnableTrayFlash(MODULENAME, "EnableTrayFlash", true);
-CMOption<bool> Clist::HideEmptyGroups(MODULENAME, "HideEmptyGroups", false);
-CMOption<bool> Clist::RemoveTempContacts(MODULENAME, "RemoveTempContacts", true);
-
-CMOption<bool> Clist::Tray1Click(MODULENAME, "Tray1Click", IsWinVer7Plus());
-CMOption<bool> Clist::TrayAlwaysStatus(MODULENAME, "AlwaysStatus", false);
+// Clist
+CMOption<bool> Clist::bOnTop(MODULENAME, "OnTop", true);
+CMOption<bool> Clist::bAutoHide(MODULENAME, "AutoHide", false);
+CMOption<bool> Clist::bUseGroups(MODULENAME, "UseGroups", true);
+CMOption<bool> Clist::bToolWindow(MODULENAME, "ToolWindow", true);
+CMOption<bool> Clist::bTransparent(MODULENAME, "Transparent", false);
+CMOption<bool> Clist::bAlwaysMulti(MODULENAME, "AlwaysMulti", false);
+CMOption<bool> Clist::bHideOffline(MODULENAME, "HideOffline", false);
+CMOption<bool> Clist::bBringToFront(MODULENAME, "BringToFront", false);
+CMOption<bool> Clist::bConfirmDelete(MODULENAME, "ConfirmDelete", true);
+CMOption<bool> Clist::bMinimizeToTray(MODULENAME, "Min2Tray", true);
+CMOption<bool> Clist::bEnableIconBlink(MODULENAME, "EnableIconBlink", true);
+CMOption<bool> Clist::bEnableTrayFlash(MODULENAME, "EnableTrayFlash", true);
+CMOption<bool> Clist::bHideEmptyGroups(MODULENAME, "HideEmptyGroups", false);
+CMOption<bool> Clist::bRemoveTempContacts(MODULENAME, "RemoveTempContacts", true);
+
+CMOption<bool> Clist::bTray1Click(MODULENAME, "Tray1Click", IsWinVer7Plus());
+CMOption<bool> Clist::bTrayAlwaysStatus(MODULENAME, "AlwaysStatus", false);
+
+CMOption<uint8_t> Clist::iTrayIcon(MODULENAME, "TrayIcon", SETTING_TRAYICON_SINGLE);
+CMOption<uint8_t> Clist::iAlpha(MODULENAME, "Alpha", 200);
+CMOption<uint8_t> Clist::iAutoAlpha(MODULENAME, "AutoAlpha", 150);
+
+CMOption<uint16_t> Clist::iHideTime(MODULENAME, "HideTime", 30);
+CMOption<uint16_t> Clist::iCycleTime(MODULENAME, "CycleTime", 4);
+
CMOption<uint32_t> Clist::IconFlashTime(MODULENAME, "IconFlashTime", 550);
-CMOption<bool> Clist::FilterSearch("CLC", "FilterSearch", false);
+// CLC
+CMOption<bool> Clist::bFilterSearch("CLC", "FilterSearch", false);
CMOption<uint32_t> Clist::OfflineModes("CLC", "OfflineModes", MODEF_OFFLINE);
+// CLUI
+CMOption<bool> Clist::bShowCaption("CLUI", "ShowCaption", true);
+CMOption<bool> Clist::bShowMainMenu("CLUI", "ShowMainMenu", true);
+CMOption<bool> Clist::bClientAreaDrag("CLUI", "ClientAreaDrag", true);
+
struct
{
uint32_t style;
@@ -85,16 +107,16 @@ public:
chkEnableTrayBlink.OnChange = Callback(this, &ClistCommonOptsDlg::onChange_TrayBlink);
CreateLink(spinBlink, Clist::IconFlashTime);
- CreateLink(chkOneClick, Clist::Tray1Click);
- CreateLink(chkUseGroups, Clist::UseGroups);
- CreateLink(chkHideOffline, Clist::HideOffline);
- CreateLink(chkFilterSearch, Clist::FilterSearch);
- CreateLink(chkAlwaysStatus, Clist::TrayAlwaysStatus);
- CreateLink(chkConfirmDelete, Clist::ConfirmDelete);
- CreateLink(chkHideEmptyGroups, Clist::HideEmptyGroups);
- CreateLink(chkEnableIconBlink, Clist::EnableIconBlink);
- CreateLink(chkEnableTrayBlink, Clist::EnableTrayFlash);
- CreateLink(chkRemoveTempContacts, Clist::RemoveTempContacts);
+ CreateLink(chkOneClick, Clist::bTray1Click);
+ CreateLink(chkUseGroups, Clist::bUseGroups);
+ CreateLink(chkHideOffline, Clist::bHideOffline);
+ CreateLink(chkFilterSearch, Clist::bFilterSearch);
+ CreateLink(chkAlwaysStatus, Clist::bTrayAlwaysStatus);
+ CreateLink(chkConfirmDelete, Clist::bConfirmDelete);
+ CreateLink(chkHideEmptyGroups, Clist::bHideEmptyGroups);
+ CreateLink(chkEnableIconBlink, Clist::bEnableIconBlink);
+ CreateLink(chkEnableTrayBlink, Clist::bEnableTrayFlash);
+ CreateLink(chkRemoveTempContacts, Clist::bRemoveTempContacts);
}
bool OnInitDialog() override
diff --git a/src/mir_app/src/clisttray.cpp b/src/mir_app/src/clisttray.cpp
index 56378d9cf8..60fe2bfae7 100644
--- a/src/mir_app/src/clisttray.cpp
+++ b/src/mir_app/src/clisttray.cpp
@@ -88,7 +88,7 @@ MIR_APP_DLL(wchar_t*) Clist_TrayIconMakeTooltip(const wchar_t *szPrefix, const c
CMStringW tszTip;
if (szPrefix && szPrefix[0]) {
- if (!Clist::TrayAlwaysStatus) {
+ if (!Clist::bTrayAlwaysStatus) {
wcsncpy_s(g_clistApi.szTip, MAX_TIP_SIZE, szPrefix, _TRUNCATE);
return g_clistApi.szTip;
}
@@ -131,7 +131,7 @@ MIR_APP_DLL(wchar_t*) Clist_TrayIconMakeTooltip(const wchar_t *szPrefix, const c
ptrW ProtoXStatus(sttGetXStatus(szProto));
wchar_t *szStatus = Clist_GetStatusModeDescription(pa->iRealStatus, 0);
if (szPrefix && szPrefix[0]) {
- if (Clist::TrayAlwaysStatus) {
+ if (Clist::bTrayAlwaysStatus) {
if (hasTips()) {
if (ProtoXStatus != nullptr)
mir_snwprintf(g_clistApi.szTip, MAX_TIP_SIZE, L"%s%s<b>%-12.12s</b>\t%s%s%-24.24s", szPrefix, szSeparator, pa->tszAccountName, szStatus, szSeparator, ProtoXStatus.get());
@@ -235,8 +235,7 @@ int fnTrayIconInit(HWND hwnd)
if (netProtoCount) {
g_clistApi.trayIcon = (trayIconInfo_t*)mir_calloc(sizeof(trayIconInfo_t) * g_arAccounts.getCount());
- int trayIconSetting = db_get_b(0, MODULENAME, "TrayIcon", SETTING_TRAYICON_DEFAULT);
- if (trayIconSetting == SETTING_TRAYICON_SINGLE) {
+ if (Clist::iTrayIcon == SETTING_TRAYICON_SINGLE) {
DBVARIANT dbv = { DBVT_DELETED };
char *szProto;
if (!db_get_s(0, MODULENAME, "PrimaryStatus", &dbv) && (averageMode < 0 || db_get_b(0, MODULENAME, "AlwaysPrimary", 0)))
@@ -247,7 +246,7 @@ int fnTrayIconInit(HWND hwnd)
Clist_TrayIconAdd(hwnd, nullptr, szProto, szProto ? Proto_GetStatus(szProto) : CallService(MS_CLIST_GETSTATUSMODE, 0, 0));
db_free(&dbv);
}
- else if (trayIconSetting == SETTING_TRAYICON_MULTI && (averageMode < 0 || db_get_b(0, MODULENAME, "AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT))) {
+ else if (Clist::iTrayIcon == SETTING_TRAYICON_MULTI && (averageMode < 0 || Clist::bAlwaysMulti)) {
g_clistApi.trayIconCount = netProtoCount;
for (int i = 0; i < g_arAccounts.getCount(); i++) {
int j = Clist_GetAccountIndex(i);
@@ -261,7 +260,7 @@ int fnTrayIconInit(HWND hwnd)
else {
Clist_TrayIconAdd(hwnd, nullptr, nullptr, averageMode);
- if (trayIconSetting == SETTING_TRAYICON_CYCLE && averageMode < 0)
+ if (Clist::iTrayIcon == SETTING_TRAYICON_CYCLE && averageMode < 0)
Clist_TraySetTimer();
}
}
@@ -368,8 +367,8 @@ int TrayIconUpdate(HICON hNewIcon, const wchar_t *szNewTip, const char *szPrefer
SetTaskBarIcon(nullptr, nullptr);
g_clistApi.trayIcon[i].isBase = isBase;
- if (db_get_b(0, MODULENAME, "TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI) {
- uint32_t time1 = db_get_w(0, MODULENAME, "CycleTime", SETTING_CYCLETIME_DEFAULT) * 200;
+ if (Clist::iTrayIcon == SETTING_TRAYICON_MULTI) {
+ uint32_t time1 = Clist::iCycleTime * 200;
uint32_t time2 = Clist::IconFlashTime + 1000;
uint32_t time = max(max(uint32_t(2000), time1), time2);
if (RefreshTimerId)
@@ -408,8 +407,7 @@ MIR_APP_DLL(int) Clist_TrayIconSetBaseInfo(HICON hIcon, const char *szPreferredP
}
if ((Clist_GetProtocolVisibility(szPreferredProto)) &&
(Proto_GetAverageStatus(nullptr) == -1) &&
- (db_get_b(0, MODULENAME, "TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_MULTI) &&
- !(db_get_b(0, MODULENAME, "AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT)))
+ (Clist::iTrayIcon == SETTING_TRAYICON_MULTI) && !Clist::bAlwaysMulti)
goto LBL_Error;
}
@@ -457,7 +455,7 @@ static VOID CALLBACK TrayCycleTimerProc(HWND, UINT, UINT_PTR, DWORD)
MIR_APP_DLL(void) Clist_TraySetTimer()
{
- CycleTimerId = SetTimer(nullptr, CycleTimerId, db_get_w(0, MODULENAME, "CycleTime", SETTING_CYCLETIME_DEFAULT) * 1000, TrayCycleTimerProc);
+ CycleTimerId = SetTimer(nullptr, CycleTimerId, Clist::iCycleTime * 1000, TrayCycleTimerProc);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -491,13 +489,11 @@ int fnTrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoC
if (netProtoCount == 0)
return Clist_TrayIconSetBaseInfo(ImageList_GetIcon(hCListImages, g_clistApi.pfnIconFromStatusMode(nullptr, averageMode, 0), ILD_NORMAL), nullptr);
- int trayIconSetting = db_get_b(0, MODULENAME, "TrayIcon", SETTING_TRAYICON_DEFAULT);
-
if (averageMode > 0) {
- if (trayIconSetting != SETTING_TRAYICON_MULTI)
+ if (Clist::iTrayIcon != SETTING_TRAYICON_MULTI)
return Clist_TrayIconSetBaseInfo(g_clistApi.pfnGetIconFromStatusMode(0, nullptr, averageMode), nullptr);
- if (db_get_b(0, MODULENAME, "AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT))
+ if (Clist::bAlwaysMulti)
return Clist_TrayIconSetBaseInfo(g_clistApi.pfnGetIconFromStatusMode(0, szChangedProto, Proto_GetStatus(szChangedProto)), (char*)szChangedProto);
if (g_clistApi.trayIcon == nullptr || g_clistApi.trayIcon[0].szProto == nullptr)
@@ -507,7 +503,7 @@ int fnTrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoC
g_clistApi.pfnTrayIconInit(g_clistApi.hwndContactList);
}
else {
- switch (trayIconSetting) {
+ switch (Clist::iTrayIcon) {
case SETTING_TRAYICON_CYCLE:
Clist_TraySetTimer();
return Clist_TrayIconSetBaseInfo(ImageList_GetIcon(hCListImages, g_clistApi.pfnIconFromStatusMode(szChangedProto, Proto_GetStatus(szChangedProto), 0), ILD_NORMAL), nullptr);
@@ -515,7 +511,7 @@ int fnTrayCalcChanged(const char *szChangedProto, int averageMode, int netProtoC
case SETTING_TRAYICON_MULTI:
if (!g_clistApi.trayIcon)
Clist_TrayIconRemove(nullptr, nullptr);
- else if ((g_clistApi.trayIconCount > 1 || netProtoCount == 1) || db_get_b(0, MODULENAME, "AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT))
+ else if ((g_clistApi.trayIconCount > 1 || netProtoCount == 1) || Clist::bAlwaysMulti)
return Clist_TrayIconSetBaseInfo(g_clistApi.pfnGetIconFromStatusMode(0, szChangedProto, Proto_GetStatus(szChangedProto)), (char*)szChangedProto);
else {
Clist_TrayIconDestroy(g_clistApi.hwndContactList);
@@ -585,10 +581,10 @@ int fnTrayIconPauseAutoHide(WPARAM, LPARAM)
initcheck 0;
mir_cslock lck(trayLockCS);
- if (db_get_b(0, MODULENAME, "AutoHide", SETTING_AUTOHIDE_DEFAULT)) {
+ if (Clist::bAutoHide) {
if (GetActiveWindow() != g_clistApi.hwndContactList) {
KillTimer(nullptr, autoHideTimerId);
- autoHideTimerId = SetTimer(nullptr, 0, 1000 * db_get_w(0, MODULENAME, "HideTime", SETTING_HIDETIME_DEFAULT), TrayIconAutoHideTimer);
+ autoHideTimerId = SetTimer(nullptr, 0, 1000 * Clist::iHideTime, TrayIconAutoHideTimer);
}
}
return 0;
@@ -659,9 +655,9 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
break;
case WM_ACTIVATE:
- if (db_get_b(0, MODULENAME, "AutoHide", SETTING_AUTOHIDE_DEFAULT)) {
+ if (Clist::bAutoHide) {
if (LOWORD(msg->wParam) == WA_INACTIVE)
- autoHideTimerId = SetTimer(nullptr, 0, 1000 * db_get_w(0, MODULENAME, "HideTime", SETTING_HIDETIME_DEFAULT), TrayIconAutoHideTimer);
+ autoHideTimerId = SetTimer(nullptr, 0, 1000 * Clist::iHideTime, TrayIconAutoHideTimer);
else
KillTimer(nullptr, autoHideTimerId);
}
@@ -683,7 +679,7 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
if (msg->lParam == WM_MBUTTONUP)
g_clistApi.pfnShowHide();
- else if (msg->lParam == (Clist::Tray1Click ? WM_LBUTTONUP : WM_LBUTTONDBLCLK)) {
+ else if (msg->lParam == (Clist::bTray1Click ? WM_LBUTTONUP : WM_LBUTTONDBLCLK)) {
if ((GetAsyncKeyState(VK_CONTROL) & 0x8000)) {
POINT pt;
HMENU hMenu = Menu_GetStatusMenu();
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index 031b0a9424..ea8280d428 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -53,8 +53,8 @@ void fnLoadCluiGlobalOpts()
{
cluiopt.showsbar = db_get_b(0, "CLUI", "ShowSBar", 1);
cluiopt.showgrip = db_get_b(0, "CLUI", "ShowGrip", 1);
- cluiopt.transparent = db_get_b(0, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT);
- cluiopt.alpha = db_get_b(0, "CList", "Alpha", SETTING_ALPHA_DEFAULT);
+ cluiopt.transparent = Clist::bTransparent;
+ cluiopt.alpha = Clist::iAlpha;
}
// Disconnect all protocols.
@@ -205,7 +205,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM hContact, LPARAM lParam)
return 0;
int action;
- if (Clist::ConfirmDelete && !(GetKeyState(VK_SHIFT) & 0x8000)) {
+ if (Clist::bConfirmDelete && !(GetKeyState(VK_SHIFT) & 0x8000)) {
// Ask user for confirmation, and if the contact should be archived (hidden, not deleted)
dlg.SetParent((HWND)lParam);
action = dlg.DoModal();
@@ -324,12 +324,11 @@ int LoadCLUIModule(void)
Utils_AssertInsideScreen(&pos);
g_clistApi.hwndContactList = CreateWindowEx(
- (db_get_b(0, "CList", "ToolWindow", SETTING_TOOLWINDOW_DEFAULT) ? WS_EX_TOOLWINDOW : WS_EX_APPWINDOW),
+ (Clist::bToolWindow ? WS_EX_TOOLWINDOW : WS_EX_APPWINDOW),
_A2W(MIRANDACLASS),
titleText,
WS_POPUPWINDOW | WS_THICKFRAME | WS_CLIPCHILDREN |
- (db_get_b(0, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT) ? WS_CAPTION | WS_SYSMENU |
- (db_get_b(0, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT) ? 0 : WS_MINIMIZEBOX) : 0),
+ (Clist::bShowCaption ? WS_CAPTION | WS_SYSMENU | (Clist::bMinimizeToTray ? 0 : WS_MINIMIZEBOX) : 0),
pos.left, pos.top, pos.right - pos.left, pos.bottom - pos.top,
nullptr, nullptr, g_clistApi.hInst, nullptr);
@@ -350,7 +349,7 @@ int LoadCLUIModule(void)
int state = db_get_b(0, "CList", "State", SETTING_STATE_NORMAL);
- if (!db_get_b(0, "CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT))
+ if (!Clist::bShowMainMenu)
SetMenu(g_clistApi.hwndContactList, nullptr);
if (state == SETTING_STATE_NORMAL)
@@ -358,9 +357,7 @@ int LoadCLUIModule(void)
else if (state == SETTING_STATE_MINIMIZED)
ShowWindow(g_clistApi.hwndContactList, SW_SHOWMINIMIZED);
- SetWindowPos(g_clistApi.hwndContactList,
- db_get_b(0, "CList", "OnTop", SETTING_ONTOP_DEFAULT) ? HWND_TOPMOST : HWND_NOTOPMOST,
- 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
+ SetWindowPos(g_clistApi.hwndContactList, Clist::bOnTop ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
CMenuItem mi(&g_plugin);
@@ -487,7 +484,7 @@ 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 | (Clist::UseGroups ? CLS_USEGROUPS : 0) | (Clist::HideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::HideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0),
+ WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | CLS_CONTACTLIST | (Clist::bUseGroups ? CLS_USEGROUPS : 0) | (Clist::bHideOffline ? CLS_HIDEOFFLINE : 0) | (Clist::bHideEmptyGroups ? CLS_HIDEEMPTYGROUPS : 0),
0, 0, 0, 0, hwnd, nullptr, g_clistApi.hInst, nullptr);
SendMessage(hwnd, WM_SIZE, 0, 0);
break;
@@ -541,7 +538,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
SetWindowPos(g_clistApi.hwndContactTree, nullptr, 0, 0, rect.right, rect.bottom - (rcStatus.bottom - rcStatus.top), SWP_NOZORDER);
}
if (wParam == SIZE_MINIMIZED) {
- if ((GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) || db_get_b(0, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT)) {
+ if ((GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) || Clist::bMinimizeToTray) {
ShowWindow(hwnd, SW_HIDE);
db_set_b(0, "CList", "State", SETTING_STATE_HIDDEN);
}
@@ -628,7 +625,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if (transparentFocus)
SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (uint8_t)cluiopt.alpha, LWA_ALPHA);
else
- SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (uint8_t)db_get_b(0, "CList", "AutoAlpha", SETTING_AUTOALPHA_DEFAULT), LWA_ALPHA);
+ SetLayeredWindowAttributes(hwnd, RGB(0, 0, 0), Clist::iAutoAlpha, LWA_ALPHA);
}
if (!transparentFocus)
KillTimer(hwnd, TM_AUTOALPHA);
@@ -691,8 +688,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case SC_MINIMIZE:
case SC_CLOSE:
- if ((GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) ||
- db_get_b(0, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT)) {
+ if ((GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) || Clist::bMinimizeToTray) {
ShowWindow(hwnd, SW_HIDE);
db_set_b(0, "CList", "State", SETTING_STATE_HIDDEN);
@@ -840,7 +836,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if ((hitFlags & (CLCHT_NOWHERE | CLCHT_INLEFTMARGIN | CLCHT_BELOWITEMS)) == 0)
break;
- if (db_get_b(0, "CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT)) {
+ if (Clist::bClientAreaDrag) {
POINT pt = nmc->pt;
ClientToScreen(g_clistApi.hwndContactTree, &pt);
return SendMessage(hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
diff --git a/src/mir_app/src/cluiservices.cpp b/src/mir_app/src/cluiservices.cpp
index 9bab528b29..8fc47b516e 100644
--- a/src/mir_app/src/cluiservices.cpp
+++ b/src/mir_app/src/cluiservices.cpp
@@ -34,24 +34,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 ((Clist::HideOffline == 0) != ((dwStyle & CLS_HIDEOFFLINE) == 0)) {
- if (Clist::HideOffline)
+ if ((Clist::bHideOffline == 0) != ((dwStyle & CLS_HIDEOFFLINE) == 0)) {
+ if (Clist::bHideOffline)
dwStyle |= CLS_HIDEOFFLINE;
else
dwStyle &= ~CLS_HIDEOFFLINE;
bRebuild = true;
}
- if ((Clist::HideEmptyGroups == 0) != ((dwStyle & CLS_HIDEEMPTYGROUPS) == 0)) {
- if (Clist::HideEmptyGroups)
+ if ((Clist::bHideEmptyGroups == 0) != ((dwStyle & CLS_HIDEEMPTYGROUPS) == 0)) {
+ if (Clist::bHideEmptyGroups)
dwStyle |= CLS_HIDEEMPTYGROUPS;
else
dwStyle &= ~CLS_HIDEEMPTYGROUPS;
bRebuild = true;
}
- if ((Clist::UseGroups == 0) != ((dwStyle & CLS_USEGROUPS) == 0)) {
- if (Clist::UseGroups)
+ if ((Clist::bUseGroups == 0) != ((dwStyle & CLS_USEGROUPS) == 0)) {
+ if (Clist::bUseGroups)
dwStyle |= CLS_USEGROUPS;
else
dwStyle &= ~CLS_USEGROUPS;
diff --git a/src/mir_app/src/menu_groups.cpp b/src/mir_app/src/menu_groups.cpp
index 1890a11bbf..83dfb3d584 100644
--- a/src/mir_app/src/menu_groups.cpp
+++ b/src/mir_app/src/menu_groups.cpp
@@ -120,7 +120,7 @@ static INT_PTR HideGroupsHelper(WPARAM, LPARAM)
static INT_PTR UseGroupsHelper(WPARAM, LPARAM)
{
int newVal = !(GetWindowLongPtr(g_clistApi.hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
- Clist::UseGroups = newVal;
+ Clist::bUseGroups = newVal;
SendMessage(g_clistApi.hwndContactTree, CLM_SETUSEGROUPS, newVal, 0);
return newVal;
}
@@ -178,7 +178,7 @@ static INT_PTR DeleteGroupHelper(WPARAM wParam, LPARAM)
static int OnBuildGroupMenu(WPARAM wParam, LPARAM)
{
- bool bChecked = Clist::HideOffline;
+ bool bChecked = Clist::bHideOffline;
Menu_SetChecked(hmiHideOfflineUsers, 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 42abcbbee4..fe6aefe6cd 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -683,10 +683,10 @@ Netlib_Dump @812 NONAME
?ProtoBroadcastAsync@PROTO_INTERFACE@@QAEXIHHPAXJ@Z @813 NONAME
ProtoBroadcastAsync @814 NONAME
?ProcessFileDrop@CSrmmBaseDialog@@IAE_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
+?bConfirmDelete@Clist@@3V?$CMOption@_N@@A @816 NONAME
+?bHideEmptyGroups@Clist@@3V?$CMOption@_N@@A @817 NONAME
+?bHideOffline@Clist@@3V?$CMOption@_N@@A @818 NONAME
+?bUseGroups@Clist@@3V?$CMOption@_N@@A @819 NONAME
?OfflineModes@Clist@@3V?$CMOption@I@@A @820 NONAME
?getChat@CSrmmBaseDialog@@QBEPAUSESSION_INFO@@XZ @821 NONAME
?EventCursor@MDatabaseCommon@@UAGPAV0DB@@II@Z @822 NONAME
@@ -708,7 +708,7 @@ _Netlib_GetTlsUnique@12 @831 NONAME
?SafeDeleteDirectory@PU@@YGHPB_W@Z @838 NONAME
?SafeDeleteFile@PU@@YGHPB_W@Z @839 NONAME
?SafeMoveFile@PU@@YGHPB_W0@Z @840 NONAME
-?FilterSearch@Clist@@3V?$CMOption@_N@@A @841 NONAME
+?bFilterSearch@Clist@@3V?$CMOption@_N@@A @841 NONAME
?FillContactSettings@MDatabaseCommon@@IAEXXZ @842 NONAME
?GetContactSettingWorker@MDatabaseCommon@@MAGHIPBD0PAUDBVARIANT@@H@Z @843 NONAME
?WriteContactSetting@MDatabaseCommon@@UAGHIPBD0PAUDBVARIANT@@@Z @844 NONAME
@@ -727,8 +727,8 @@ _Netlib_GetTlsUnique@12 @831 NONAME
?usesPassword@MDatabaseCommon@@QBE_NXZ @857 NONAME
?SetPassword@MDatabaseCommon@@QAEXPB_W@Z @858 NONAME
?EnableEncryption@MDatabaseReadonly@@UAGHH@Z @859 NONAME
-?Tray1Click@Clist@@3V?$CMOption@_N@@A @860 NONAME
-?TrayAlwaysStatus@Clist@@3V?$CMOption@_N@@A @861 NONAME
+?bTray1Click@Clist@@3V?$CMOption@_N@@A @860 NONAME
+?bTrayAlwaysStatus@Clist@@3V?$CMOption@_N@@A @861 NONAME
?Flush@MDatabaseCommon@@UAGHXZ @862 NONAME
?getIcon@CHAT_MANAGER@@QBGPAUHICON__@@H@Z @863 NONAME
?getSoundName@SESSION_INFO@@QBEPBDH@Z @864 NONAME
@@ -1006,3 +1006,18 @@ Proto_CanDeleteHistory @1118 NONAME
??6@YGPAUMHttpRequest@@PAU0@ABUBOOL_PARAM@@@Z @1137 NONAME
?bShowFormatting@Chat@@3V?$CMOption@_N@@A @1138 NONAME
?setDescr@FILE_BLOB@DB@@QAEXPB_W@Z @1139 NONAME
+?bShowMainMenu@Clist@@3V?$CMOption@_N@@A @1140 NONAME
+?bShowCaption@Clist@@3V?$CMOption@_N@@A @1141 NONAME
+?bToolWindow@Clist@@3V?$CMOption@_N@@A @1142 NONAME
+?bClientAreaDrag@Clist@@3V?$CMOption@_N@@A @1143 NONAME
+?bOnTop@Clist@@3V?$CMOption@_N@@A @1144 NONAME
+?bAlwaysMulti@Clist@@3V?$CMOption@_N@@A @1145 NONAME
+?bAutoHide@Clist@@3V?$CMOption@_N@@A @1146 NONAME
+?bMinimizeToTray@Clist@@3V?$CMOption@_N@@A @1147 NONAME
+?bTransparent@Clist@@3V?$CMOption@_N@@A @1148 NONAME
+?iTrayIcon@Clist@@3V?$CMOption@E@@A @1149 NONAME
+?bBringToFront@Clist@@3V?$CMOption@_N@@A @1150 NONAME
+?iCycleTime@Clist@@3V?$CMOption@G@@A @1151 NONAME
+?iHideTime@Clist@@3V?$CMOption@G@@A @1152 NONAME
+?iAlpha@Clist@@3V?$CMOption@E@@A @1153 NONAME
+?iAutoAlpha@Clist@@3V?$CMOption@E@@A @1154 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index a4bc7159cc..987822ddc2 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -683,10 +683,10 @@ Netlib_Dump @812 NONAME
?ProtoBroadcastAsync@PROTO_INTERFACE@@QEAAXIHHPEAX_J@Z @813 NONAME
ProtoBroadcastAsync @814 NONAME
?ProcessFileDrop@CSrmmBaseDialog@@IEAA_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
+?bConfirmDelete@Clist@@3V?$CMOption@_N@@A @816 NONAME
+?bHideEmptyGroups@Clist@@3V?$CMOption@_N@@A @817 NONAME
+?bHideOffline@Clist@@3V?$CMOption@_N@@A @818 NONAME
+?bUseGroups@Clist@@3V?$CMOption@_N@@A @819 NONAME
?OfflineModes@Clist@@3V?$CMOption@I@@A @820 NONAME
?getChat@CSrmmBaseDialog@@QEBAPEAUSESSION_INFO@@XZ @821 NONAME
?EventCursor@MDatabaseCommon@@UEAAPEAV0DB@@II@Z @822 NONAME
@@ -708,7 +708,7 @@ Netlib_GetTlsUnique @831 NONAME
?SafeDeleteDirectory@PU@@YAHPEB_W@Z @838 NONAME
?SafeDeleteFile@PU@@YAHPEB_W@Z @839 NONAME
?SafeMoveFile@PU@@YAHPEB_W0@Z @840 NONAME
-?FilterSearch@Clist@@3V?$CMOption@_N@@A @841 NONAME
+?bFilterSearch@Clist@@3V?$CMOption@_N@@A @841 NONAME
?FillContactSettings@MDatabaseCommon@@IEAAXXZ @842 NONAME
?GetContactSettingWorker@MDatabaseCommon@@MEAAHIPEBD0PEAUDBVARIANT@@H@Z @843 NONAME
?WriteContactSetting@MDatabaseCommon@@UEAAHIPEBD0PEAUDBVARIANT@@@Z @844 NONAME
@@ -727,8 +727,8 @@ Netlib_GetTlsUnique @831 NONAME
?usesPassword@MDatabaseCommon@@QEBA_NXZ @857 NONAME
?SetPassword@MDatabaseCommon@@QEAAXPEB_W@Z @858 NONAME
?EnableEncryption@MDatabaseReadonly@@UEAAHH@Z @859 NONAME
-?Tray1Click@Clist@@3V?$CMOption@_N@@A @860 NONAME
-?TrayAlwaysStatus@Clist@@3V?$CMOption@_N@@A @861 NONAME
+?bTray1Click@Clist@@3V?$CMOption@_N@@A @860 NONAME
+?bTrayAlwaysStatus@Clist@@3V?$CMOption@_N@@A @861 NONAME
?Flush@MDatabaseCommon@@UEAAHXZ @862 NONAME
?getIcon@CHAT_MANAGER@@QEBAPEAUHICON__@@H@Z @863 NONAME
?getSoundName@SESSION_INFO@@QEBAPEBDH@Z @864 NONAME
@@ -1006,3 +1006,18 @@ Proto_CanDeleteHistory @1118 NONAME
??6@YAPEAUMHttpRequest@@PEAU0@AEBUBOOL_PARAM@@@Z @1137 NONAME
?bShowFormatting@Chat@@3V?$CMOption@_N@@A @1138 NONAME
?setDescr@FILE_BLOB@DB@@QEAAXPEB_W@Z @1139 NONAME
+?bShowMainMenu@Clist@@3V?$CMOption@_N@@A @1140 NONAME
+?bShowCaption@Clist@@3V?$CMOption@_N@@A @1141 NONAME
+?bToolWindow@Clist@@3V?$CMOption@_N@@A @1142 NONAME
+?bClientAreaDrag@Clist@@3V?$CMOption@_N@@A @1143 NONAME
+?bOnTop@Clist@@3V?$CMOption@_N@@A @1144 NONAME
+?bAlwaysMulti@Clist@@3V?$CMOption@_N@@A @1145 NONAME
+?bAutoHide@Clist@@3V?$CMOption@_N@@A @1146 NONAME
+?bMinimizeToTray@Clist@@3V?$CMOption@_N@@A @1147 NONAME
+?bTransparent@Clist@@3V?$CMOption@_N@@A @1148 NONAME
+?iTrayIcon@Clist@@3V?$CMOption@E@@A @1149 NONAME
+?bBringToFront@Clist@@3V?$CMOption@_N@@A @1150 NONAME
+?iCycleTime@Clist@@3V?$CMOption@G@@A @1151 NONAME
+?iHideTime@Clist@@3V?$CMOption@G@@A @1152 NONAME
+?iAlpha@Clist@@3V?$CMOption@E@@A @1153 NONAME
+?iAutoAlpha@Clist@@3V?$CMOption@E@@A @1154 NONAME