mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
parent
b9370c6e79
commit
f300ca5b7b
@ -40,6 +40,8 @@ MainWindow::MainWindow()
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
restoreGeometry(config()->get("Window/Geometry").toByteArray());
|
||||
|
||||
setWindowIcon(filePath()->applicationIcon());
|
||||
QAction* toggleViewAction = m_ui->toolBar->toggleViewAction();
|
||||
toggleViewAction->setText(tr("Show toolbar"));
|
||||
@ -413,6 +415,12 @@ void MainWindow::databaseTabChanged(int tabIndex)
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
saveWindowInformation();
|
||||
saveLastDatabases(event);
|
||||
}
|
||||
|
||||
void MainWindow::saveLastDatabases(QCloseEvent* event)
|
||||
{
|
||||
m_openDatabases.clear();
|
||||
bool openPreviousDatabasesOnStartup = config()->get("OpenPreviousDatabasesOnStartup").toBool();
|
||||
@ -436,6 +444,11 @@ void MainWindow::closeEvent(QCloseEvent* event)
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::saveWindowInformation()
|
||||
{
|
||||
config()->set("Window/Geometry", saveGeometry());
|
||||
}
|
||||
|
||||
void MainWindow::showEntryContextMenu(const QPoint& globalPos)
|
||||
{
|
||||
m_ui->menuEntries->popup(globalPos);
|
||||
|
@ -67,6 +67,9 @@ private:
|
||||
|
||||
static const QString BaseWindowTitle;
|
||||
|
||||
void saveWindowInformation();
|
||||
void saveLastDatabases(QCloseEvent* event);
|
||||
|
||||
const QScopedPointer<Ui::MainWindow> m_ui;
|
||||
SignalMultiplexer m_actionMultiplexer;
|
||||
QAction* m_clearHistoryAction;
|
||||
|
Loading…
Reference in New Issue
Block a user