mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Merge pull request #1819 from vsvyatski/develop
Remove empty context menu from the main menu
This commit is contained in:
@@ -150,6 +150,7 @@ void Config::init(const QString& fileName)
|
|||||||
m_defaults.insert("security/autotypeask", true);
|
m_defaults.insert("security/autotypeask", true);
|
||||||
m_defaults.insert("security/IconDownloadFallbackToGoogle", false);
|
m_defaults.insert("security/IconDownloadFallbackToGoogle", false);
|
||||||
m_defaults.insert("GUI/Language", "system");
|
m_defaults.insert("GUI/Language", "system");
|
||||||
|
m_defaults.insert("GUI/HideToolbar", false);
|
||||||
m_defaults.insert("GUI/ShowTrayIcon", false);
|
m_defaults.insert("GUI/ShowTrayIcon", false);
|
||||||
m_defaults.insert("GUI/DarkTrayIcon", false);
|
m_defaults.insert("GUI/DarkTrayIcon", false);
|
||||||
m_defaults.insert("GUI/MinimizeToTray", false);
|
m_defaults.insert("GUI/MinimizeToTray", false);
|
||||||
|
|||||||
@@ -133,8 +133,6 @@ MainWindow::MainWindow()
|
|||||||
|
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
|
|
||||||
m_ui->toolBar->setContextMenuPolicy(Qt::PreventContextMenu);
|
|
||||||
|
|
||||||
// Setup the search widget in the toolbar
|
// Setup the search widget in the toolbar
|
||||||
SearchWidget* search = new SearchWidget();
|
SearchWidget* search = new SearchWidget();
|
||||||
search->connectSignals(m_actionMultiplexer);
|
search->connectSignals(m_actionMultiplexer);
|
||||||
@@ -841,6 +839,8 @@ void MainWindow::applySettingsChanges()
|
|||||||
m_inactivityTimer->deactivate();
|
m_inactivityTimer->deactivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_ui->toolBar->setHidden(config()->get("GUI/HideToolbar").toBool());
|
||||||
|
|
||||||
updateTrayIcon();
|
updateTrayIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -175,6 +175,17 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenuBar" name="menubar">
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>30</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="contextMenuPolicy">
|
||||||
|
<enum>Qt::PreventContextMenu</enum>
|
||||||
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&Database</string>
|
<string>&Database</string>
|
||||||
@@ -277,6 +288,9 @@
|
|||||||
<addaction name="menuHelp"/>
|
<addaction name="menuHelp"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QToolBar" name="toolBar">
|
<widget class="QToolBar" name="toolBar">
|
||||||
|
<property name="contextMenuPolicy">
|
||||||
|
<enum>Qt::PreventContextMenu</enum>
|
||||||
|
</property>
|
||||||
<property name="movable">
|
<property name="movable">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ void SettingsWidget::loadSettings()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_generalUi->detailsHideCheckBox->setChecked(config()->get("GUI/HideDetailsView").toBool());
|
m_generalUi->detailsHideCheckBox->setChecked(config()->get("GUI/HideDetailsView").toBool());
|
||||||
|
m_generalUi->toolbarHideCheckBox->setChecked(config()->get("GUI/HideToolbar").toBool());
|
||||||
m_generalUi->systrayShowCheckBox->setChecked(config()->get("GUI/ShowTrayIcon").toBool());
|
m_generalUi->systrayShowCheckBox->setChecked(config()->get("GUI/ShowTrayIcon").toBool());
|
||||||
m_generalUi->systrayDarkIconCheckBox->setChecked(config()->get("GUI/DarkTrayIcon").toBool());
|
m_generalUi->systrayDarkIconCheckBox->setChecked(config()->get("GUI/DarkTrayIcon").toBool());
|
||||||
m_generalUi->systrayMinimizeToTrayCheckBox->setChecked(config()->get("GUI/MinimizeToTray").toBool());
|
m_generalUi->systrayMinimizeToTrayCheckBox->setChecked(config()->get("GUI/MinimizeToTray").toBool());
|
||||||
@@ -210,6 +211,7 @@ void SettingsWidget::saveSettings()
|
|||||||
config()->set("GUI/Language", m_generalUi->languageComboBox->itemData(currentLangIndex).toString());
|
config()->set("GUI/Language", m_generalUi->languageComboBox->itemData(currentLangIndex).toString());
|
||||||
|
|
||||||
config()->set("GUI/HideDetailsView", m_generalUi->detailsHideCheckBox->isChecked());
|
config()->set("GUI/HideDetailsView", m_generalUi->detailsHideCheckBox->isChecked());
|
||||||
|
config()->set("GUI/HideToolbar", m_generalUi->toolbarHideCheckBox->isChecked());
|
||||||
config()->set("GUI/ShowTrayIcon", m_generalUi->systrayShowCheckBox->isChecked());
|
config()->set("GUI/ShowTrayIcon", m_generalUi->systrayShowCheckBox->isChecked());
|
||||||
config()->set("GUI/DarkTrayIcon", m_generalUi->systrayDarkIconCheckBox->isChecked());
|
config()->set("GUI/DarkTrayIcon", m_generalUi->systrayDarkIconCheckBox->isChecked());
|
||||||
config()->set("GUI/MinimizeToTray", m_generalUi->systrayMinimizeToTrayCheckBox->isChecked());
|
config()->set("GUI/MinimizeToTray", m_generalUi->systrayMinimizeToTrayCheckBox->isChecked());
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>684</width>
|
<width>684</width>
|
||||||
<height>732</height>
|
<height>794</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
@@ -179,6 +179,13 @@
|
|||||||
<string>General</string>
|
<string>General</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="toolbarHideCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Hide toolbar (icons)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="systrayShowCheckBox">
|
<widget class="QCheckBox" name="systrayShowCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|||||||
Reference in New Issue
Block a user