mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-07 06:27:39 +03:00
parent
0bac9752ba
commit
6c695e3fd0
3 changed files with 10 additions and 0 deletions
|
@ -41,6 +41,9 @@ MainWindow::MainWindow()
|
|||
QAction* toggleViewAction = m_ui->toolBar->toggleViewAction();
|
||||
toggleViewAction->setText(tr("Show toolbar"));
|
||||
m_ui->menuView->addAction(toggleViewAction);
|
||||
bool showToolbar = config()->get("ShowToolbar").toBool();
|
||||
m_ui->toolBar->setVisible(showToolbar);
|
||||
connect(m_ui->toolBar, SIGNAL(visibilityChanged(bool)), this, SLOT(saveToolbarState(bool)));
|
||||
|
||||
m_clearHistoryAction = new QAction("Clear history", m_ui->menuFile);
|
||||
m_lastDatabasesActions = new QActionGroup(m_ui->menuRecentDatabases);
|
||||
|
@ -353,6 +356,11 @@ void MainWindow::showGroupContextMenu(const QPoint& globalPos)
|
|||
m_ui->menuGroups->popup(globalPos);
|
||||
}
|
||||
|
||||
void MainWindow::saveToolbarState(bool value)
|
||||
{
|
||||
config()->set("ShowToolbar", value);
|
||||
}
|
||||
|
||||
void MainWindow::setShortcut(QAction* action, QKeySequence::StandardKey standard, int fallback)
|
||||
{
|
||||
if (!QKeySequence::keyBindings(standard).isEmpty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue