diff --git a/src/ui/form/home/homewindow.cpp b/src/ui/form/home/homewindow.cpp index a5eeeaf5..b09ca9e9 100644 --- a/src/ui/form/home/homewindow.cpp +++ b/src/ui/form/home/homewindow.cpp @@ -92,7 +92,7 @@ void HomeWindow::selectAboutTab() void HomeWindow::onActivationChanged(bool isActive) { - if (isActive && iniUser()->homeAutoShowMenu()) { + if (isActive && iniUser()->homeWindowAutoShowMenu()) { if (isActiveWindow()) { m_btMenu->showMenu(); } diff --git a/src/ui/form/opt/pages/optionspage.cpp b/src/ui/form/opt/pages/optionspage.cpp index ae2d377d..881afa05 100644 --- a/src/ui/form/opt/pages/optionspage.cpp +++ b/src/ui/form/opt/pages/optionspage.cpp @@ -875,8 +875,8 @@ QLayout *OptionsPage::setupEditShortcutLayout() void OptionsPage::setupHomeBox() { m_cbHomeAutoShowMenu = - ControlUtil::createCheckBox(iniUser()->homeAutoShowMenu(), [&](bool checked) { - iniUser()->setHomeAutoShowMenu(checked); + ControlUtil::createCheckBox(iniUser()->homeWindowAutoShowMenu(), [&](bool checked) { + iniUser()->setHomeWindowAutoShowMenu(checked); ctrl()->setIniUserEdited(); }); diff --git a/src/ui/user/iniuser.h b/src/ui/user/iniuser.h index ce6c0bea..94225d28 100644 --- a/src/ui/user/iniuser.h +++ b/src/ui/user/iniuser.h @@ -69,9 +69,6 @@ public: bool splashWindowVisible() const { return valueBool("splashWindow/visible", true); } void setSplashWindowVisible(bool on) { setValue("splashWindow/visible", on, true); } - bool homeAutoShowMenu() const { return valueBool("home/autoShowMenu"); } - void setHomeAutoShowMenu(bool v) { setValue("home/autoShowMenu", v); } - bool progNotifyMessage() const { return valueBool("prog/notifyMessage", true); } void setProgNotifyMessage(bool v) { setValue("prog/notifyMessage", v, true); } @@ -99,6 +96,9 @@ public: bool homeWindowMaximized() const { return valueBool("homeWindow/maximized"); } void setHomeWindowMaximized(bool on) { setValue("homeWindow/maximized", on); } + bool homeWindowAutoShowMenu() const { return valueBool("homeWindow/autoShowMenu"); } + void setHomeWindowAutoShowMenu(bool v) { setValue("homeWindow/autoShowMenu", v); } + QRect progWindowGeometry() const { return value("progWindow/geometry").toRect(); } void setProgWindowGeometry(const QRect &v) { setValue("progWindow/geometry", v); } diff --git a/src/ui/user/usersettings.cpp b/src/ui/user/usersettings.cpp index 8591ab07..1dc58646 100644 --- a/src/ui/user/usersettings.cpp +++ b/src/ui/user/usersettings.cpp @@ -46,6 +46,11 @@ void UserSettings::migrateIniOnStartup() if (version < 0x030911) { setCacheValue("prog/notifyMessage", ini()->value("tray/alertMessage")); } + + // COMPAT: v3.13.6 + if (version < 0x031306) { + setCacheValue("homeWindow/autoShowMenu", ini()->value("home/autoShowMenu")); + } } void UserSettings::migrateIniOnWrite() @@ -108,4 +113,9 @@ void UserSettings::migrateIniOnWrite() if (version < 0x030911) { removeIniKey("tray/alertMessage"); } + + // COMPAT: v3.13.6 + if (version < 0x031306) { + removeIniKey("home/autoShowMenu"); + } }