summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Clist_nicer/src/clcopts.cpp4
-rw-r--r--plugins/Clist_nicer/src/clistopts.cpp52
-rw-r--r--plugins/CrashDumper/src/ui.cpp7
-rw-r--r--src/mir_app/src/options.cpp3
4 files changed, 35 insertions, 31 deletions
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp
index 49fd784b53..0e77ca2282 100644
--- a/plugins/Clist_nicer/src/clcopts.cpp
+++ b/plugins/Clist_nicer/src/clcopts.cpp
@@ -322,7 +322,7 @@ public:
cfg::dat.bNoOfflineAvatars = IsDlgButtonChecked(m_hwnd, IDC_NOAVATARSOFFLINE) ? TRUE : FALSE;
g_plugin.setByte("NoOfflineAV", (BYTE)cfg::dat.bNoOfflineAvatars);
- cfg::dat.bShowLocalTime = IsDlgButtonChecked(m_hwnd, IDC_SHOWLOCALTIME) ? 1 : 0;
+ cfg::dat.bShowLocalTime = chkLocalTime.GetState();
db_set_b(0, "CLC", "ShowLocalTime", (BYTE)cfg::dat.bShowLocalTime);
cfg::dat.bShowLocalTimeSelective = IsDlgButtonChecked(m_hwnd, IDC_SHOWLOCALTIMEONLYWHENDIFFERENT) ? 1 : 0;
@@ -341,7 +341,7 @@ public:
void onChange_LocalTime(CCtrlCheck *)
{
- Utils::enableDlgControl(m_hwnd, IDC_SHOWLOCALTIMEONLYWHENDIFFERENT, IsDlgButtonChecked(m_hwnd, IDC_SHOWLOCALTIME));
+ Utils::enableDlgControl(m_hwnd, IDC_SHOWLOCALTIMEONLYWHENDIFFERENT, chkLocalTime.GetState());
}
void onChange_AvatarsRounded(CCtrlCheck *)
diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp
index f89078344c..4e0820cd8f 100644
--- a/plugins/Clist_nicer/src/clistopts.cpp
+++ b/plugins/Clist_nicer/src/clistopts.cpp
@@ -437,24 +437,21 @@ public:
SetWindowText(g_clistApi.hwndContactList, title);
cfg::dat.dwFlags = IsDlgButtonChecked(m_hwnd, IDC_ROUNDEDBORDER) ? cfg::dat.dwFlags | CLUI_FRAME_ROUNDEDFRAME : cfg::dat.dwFlags & ~CLUI_FRAME_ROUNDEDFRAME;
- db_set_b(0, "CLUI", "AutoSize", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZE));
- if ((cfg::dat.autosize = IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZE) ? 1 : 0)) {
+ if (cfg::dat.autosize = chkAutoSize.GetState()) {
SendMessage(g_clistApi.hwndContactList, WM_SIZE, 0, 0);
SendMessage(g_clistApi.hwndContactTree, WM_SIZE, 0, 0);
}
+ db_set_b(0, "CLUI", "AutoSize", cfg::dat.autosize);
db_set_b(0, "CLUI", "MaxSizeHeight", (BYTE)GetDlgItemInt(m_hwnd, IDC_MAXSIZEHEIGHT, nullptr, FALSE));
db_set_b(0, "CLUI", "AutoSizeUpward", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZEUPWARD));
- g_plugin.setByte("AutoHide", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_AUTOHIDE));
+ g_plugin.setByte("AutoHide", chkAutoHide.GetState());
g_plugin.setWord("HideTime", (WORD)SendDlgItemMessage(m_hwnd, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
- g_plugin.setByte("Transparent", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_TRANSPARENT));
- cfg::dat.isTransparent = IsDlgButtonChecked(m_hwnd, IDC_TRANSPARENT) ? 1 : 0;
- g_plugin.setByte("Alpha", (BYTE)SendDlgItemMessage(m_hwnd, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
- cfg::dat.alpha = (BYTE)SendDlgItemMessage(m_hwnd, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0);
- g_plugin.setByte("AutoAlpha", (BYTE)SendDlgItemMessage(m_hwnd, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0));
- cfg::dat.autoalpha = (BYTE)SendDlgItemMessage(m_hwnd, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0);
+ g_plugin.setByte("Transparent", cfg::dat.isTransparent = chkTransparent.GetState());
+ g_plugin.setByte("Alpha", cfg::dat.alpha = (BYTE)SendDlgItemMessage(m_hwnd, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
+ g_plugin.setByte("AutoAlpha", cfg::dat.autoalpha = (BYTE)SendDlgItemMessage(m_hwnd, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0));
g_plugin.setByte("WindowShadow", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_DROPSHADOW));
g_plugin.setByte("OnDesktop", (BYTE)IsDlgButtonChecked(m_hwnd, IDC_ONDESKTOP));
db_set_dw(0, "CLUI", "Frameflags", cfg::dat.dwFlags);
@@ -498,30 +495,33 @@ public:
return true;
}
- void onChange_AutoHide(CCtrlCheck *)
+ void onChange_AutoHide(CCtrlCheck *pCheck)
{
- Utils::enableDlgControl(m_hwnd, IDC_HIDETIME, IsDlgButtonChecked(m_hwnd, IDC_AUTOHIDE));
- Utils::enableDlgControl(m_hwnd, IDC_HIDETIMESPIN, IsDlgButtonChecked(m_hwnd, IDC_AUTOHIDE));
- Utils::enableDlgControl(m_hwnd, IDC_STATIC01, IsDlgButtonChecked(m_hwnd, IDC_AUTOHIDE));
+ bool bEnable = pCheck->GetState();
+ Utils::enableDlgControl(m_hwnd, IDC_HIDETIME, bEnable);
+ Utils::enableDlgControl(m_hwnd, IDC_STATIC01, bEnable);
+ Utils::enableDlgControl(m_hwnd, IDC_HIDETIMESPIN, bEnable);
}
- void onChange_AutoSize(CCtrlCheck *)
+ void onChange_AutoSize(CCtrlCheck *pCheck)
{
- Utils::enableDlgControl(m_hwnd, IDC_STATIC21, IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZE));
- Utils::enableDlgControl(m_hwnd, IDC_STATIC22, IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZE));
- Utils::enableDlgControl(m_hwnd, IDC_MAXSIZEHEIGHT, IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZE));
- Utils::enableDlgControl(m_hwnd, IDC_MAXSIZESPIN, IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZE));
- Utils::enableDlgControl(m_hwnd, IDC_AUTOSIZEUPWARD, IsDlgButtonChecked(m_hwnd, IDC_AUTOSIZE));
+ bool bEnable = pCheck->GetState();
+ Utils::enableDlgControl(m_hwnd, IDC_STATIC21, bEnable);
+ Utils::enableDlgControl(m_hwnd, IDC_STATIC22, bEnable);
+ Utils::enableDlgControl(m_hwnd, IDC_MAXSIZEHEIGHT, bEnable);
+ Utils::enableDlgControl(m_hwnd, IDC_MAXSIZESPIN, bEnable);
+ Utils::enableDlgControl(m_hwnd, IDC_AUTOSIZEUPWARD, bEnable);
}
- void onChange_Transparent(CCtrlCheck *)
+ void onChange_Transparent(CCtrlCheck *pCheck)
{
- Utils::enableDlgControl(m_hwnd, IDC_STATIC11, IsDlgButtonChecked(m_hwnd, IDC_TRANSPARENT));
- Utils::enableDlgControl(m_hwnd, IDC_STATIC12, IsDlgButtonChecked(m_hwnd, IDC_TRANSPARENT));
- Utils::enableDlgControl(m_hwnd, IDC_TRANSACTIVE, IsDlgButtonChecked(m_hwnd, IDC_TRANSPARENT));
- Utils::enableDlgControl(m_hwnd, IDC_TRANSINACTIVE, IsDlgButtonChecked(m_hwnd, IDC_TRANSPARENT));
- Utils::enableDlgControl(m_hwnd, IDC_ACTIVEPERC, IsDlgButtonChecked(m_hwnd, IDC_TRANSPARENT));
- Utils::enableDlgControl(m_hwnd, IDC_INACTIVEPERC, IsDlgButtonChecked(m_hwnd, IDC_TRANSPARENT));
+ bool bEnable = pCheck->GetState();
+ Utils::enableDlgControl(m_hwnd, IDC_STATIC11, bEnable);
+ Utils::enableDlgControl(m_hwnd, IDC_STATIC12, bEnable);
+ Utils::enableDlgControl(m_hwnd, IDC_TRANSACTIVE, bEnable);
+ Utils::enableDlgControl(m_hwnd, IDC_TRANSINACTIVE, bEnable);
+ Utils::enableDlgControl(m_hwnd, IDC_ACTIVEPERC, bEnable);
+ Utils::enableDlgControl(m_hwnd, IDC_INACTIVEPERC, bEnable);
}
void UpdateCounters()
diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp
index 9dd4dc0cd5..80483b4fe3 100644
--- a/plugins/CrashDumper/src/ui.cpp
+++ b/plugins/CrashDumper/src/ui.cpp
@@ -169,8 +169,11 @@ class COptDialog : public CDlgBase
void COptDialog::OnCatchCrashesChange(CCtrlCheck*)
{
m_chkRepSubfolder.Enable(m_chkCatchCrashes.GetState());
- m_lblRestart.Show();
- g_plugin.bNeedRestart = true;
+
+ if (m_bInitialized) {
+ m_lblRestart.Show();
+ g_plugin.bNeedRestart = true;
+ }
}
public:
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp
index a7dcfc5e22..962bc36b73 100644
--- a/src/mir_app/src/options.cpp
+++ b/src/mir_app/src/options.cpp
@@ -930,7 +930,8 @@ public:
void OnFilterChanged(void*)
{
- m_timerFilter.Start(400);
+ if (m_bInitialized)
+ m_timerFilter.Start(400);
}
void OnTreeChanged(CCtrlTreeView::TEventInfo *evt)