UI: IniUser: "home/autoShowMenu" -> "homeWindow/autoShowMenu"

This commit is contained in:
Nodir Temirkhodjaev 2024-08-11 22:46:14 +05:00
parent 0454c89697
commit d7d722e74a
4 changed files with 16 additions and 6 deletions

View File

@ -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();
}

View File

@ -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();
});

View File

@ -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); }

View File

@ -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");
}
}