diff options
author | George Hazan <george.hazan@gmail.com> | 2024-02-19 11:08:51 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-02-19 11:08:51 +0300 |
commit | 987245b24d2e1c51ad84a77274527ebb69e16642 (patch) | |
tree | 5003520e0e16fba824904872ac4a2896f8917c3e | |
parent | 15ea94d0eec70601916e1c93e8dac05df9f0a917 (diff) |
fixes #4213 completely
-rw-r--r-- | src/core/stdpopup/src/message_pump.cpp | 2 | ||||
-rw-r--r-- | src/core/stdpopup/src/options.cpp | 10 | ||||
-rw-r--r-- | src/core/stdpopup/src/options.h | 2 | ||||
-rw-r--r-- | src/core/stdpopup/src/stdafx.h | 2 |
4 files changed, 7 insertions, 9 deletions
diff --git a/src/core/stdpopup/src/message_pump.cpp b/src/core/stdpopup/src/message_pump.cpp index 96952f1f41..9afca31246 100644 --- a/src/core/stdpopup/src/message_pump.cpp +++ b/src/core/stdpopup/src/message_pump.cpp @@ -22,7 +22,7 @@ unsigned __stdcall MessagePumpThread(void *) int status = CallService(MS_CLIST_GETSTATUSMODE, 0, 0); if (status >= ID_STATUS_OFFLINE && status <= ID_STATUS_MAX && options.disable_status[status - ID_STATUS_OFFLINE]) enabled = false; - if (options.disable_always || (options.disable_full_screen && IsFullScreen()) || IsWorkstationLocked()) + if ((options.disable_full_screen && IsFullScreen()) || IsWorkstationLocked()) enabled = false; PopupData *pd = (PopupData *)hwndMsg.lParam; diff --git a/src/core/stdpopup/src/options.cpp b/src/core/stdpopup/src/options.cpp index 2bdbade5c2..73d7ea1baf 100644 --- a/src/core/stdpopup/src/options.cpp +++ b/src/core/stdpopup/src/options.cpp @@ -42,7 +42,6 @@ void LoadOptions() options.disable_status[i] = (g_plugin.getByte(buff, 0) == 1); } - options.disable_always = g_plugin.getByte("DisableAlways", false); options.disable_full_screen = g_plugin.getBool("DisableFullScreen", true); options.drop_shadow = g_plugin.getByte("DropShadow", 0) == 1; @@ -77,8 +76,9 @@ void SaveOptions() mir_snprintf(buff, "DisableStatus%d", i - 1); g_plugin.setByte(buff, options.disable_status[i] ? 1 : 0); } - g_plugin.setByte("DisableAlways", options.disable_always); + g_plugin.setByte("DisableFullScreen", options.disable_full_screen); + g_plugin.setByte("DropShadow", (options.drop_shadow ? 1 : 0)); g_plugin.setDword("SidebarWidth", options.sb_width); g_plugin.setDword("Padding", options.padding); @@ -332,7 +332,7 @@ public: bool OnInitDialog() override { - chkAlways.SetState(options.disable_always); + chkAlways.SetState(!Popup_Enabled()); chkFullScreen.SetState(options.disable_full_screen); // initialise and fill listbox @@ -370,7 +370,7 @@ public: bool OnApply() override { - options.disable_always = chkAlways.IsChecked(); + Popup_Enable(!chkAlways.IsChecked()); options.disable_full_screen = chkFullScreen.IsChecked(); for (int i = 0; i < _countof(options.disable_status); i++) @@ -380,7 +380,7 @@ public: void onChange_Always(CCtrlCheck *) { - bool bEnable = chkAlways.IsChecked(); + bool bEnable = !chkAlways.IsChecked(); m_statuses.Enable(bEnable); chkFullScreen.Enable(bEnable); } diff --git a/src/core/stdpopup/src/options.h b/src/core/stdpopup/src/options.h index 0cc9744c51..f80f179e14 100644 --- a/src/core/stdpopup/src/options.h +++ b/src/core/stdpopup/src/options.h @@ -22,7 +22,7 @@ struct Options int text_indent; bool global_hover; PopupTimeLayout time_layout; - bool disable_full_screen, disable_always; + bool disable_full_screen; bool drop_shadow; int sb_width; int padding, av_padding; diff --git a/src/core/stdpopup/src/stdafx.h b/src/core/stdpopup/src/stdafx.h index ca2efd051b..63ca528a0c 100644 --- a/src/core/stdpopup/src/stdafx.h +++ b/src/core/stdpopup/src/stdafx.h @@ -42,8 +42,6 @@ struct CMPlugin : public PLUGIN<CMPlugin> { CMPlugin(); - void InitIcons(); - int Load() override; int Unload() override; }; |