diff options
author | Saturneric <[email protected]> | 2021-07-04 19:48:22 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-07-04 19:48:22 +0000 |
commit | 62970671ccf5368e6044c88b576d5c0e53c1124a (patch) | |
tree | 113b7503fc8e1473d719d69f3ea2d8b49141f8b5 /src/ui/main_window/MainWindowUI.cpp | |
parent | Merge branch 'main' into develop (diff) | |
download | GpgFrontend-62970671ccf5368e6044c88b576d5c0e53c1124a.tar.gz GpgFrontend-62970671ccf5368e6044c88b576d5c0e53c1124a.zip |
Improve the access method and interface of fast file operation
Diffstat (limited to 'src/ui/main_window/MainWindowUI.cpp')
-rw-r--r-- | src/ui/main_window/MainWindowUI.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui/main_window/MainWindowUI.cpp b/src/ui/main_window/MainWindowUI.cpp index 6c3c57fe..233a0927 100644 --- a/src/ui/main_window/MainWindowUI.cpp +++ b/src/ui/main_window/MainWindowUI.cpp @@ -42,6 +42,11 @@ void MainWindow::createActions() { openAct->setToolTip(tr("Open an existing file")); connect(openAct, SIGNAL(triggered()), edit, SLOT(slotOpen())); + browserAct = new QAction(tr("&Browser"), this); + browserAct->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_B)); + browserAct->setToolTip(tr("Open a file browser")); + connect(browserAct, SIGNAL(triggered()), this, SLOT(slotOpenFileTab())); + saveAct = new QAction(tr("&Save"), this); saveAct->setIcon(QIcon(":filesave.png")); saveAct->setShortcut(QKeySequence::Save); @@ -264,6 +269,7 @@ void MainWindow::createActions() { void MainWindow::createMenus() { fileMenu = menuBar()->addMenu(tr("&File")); fileMenu->addAction(newTabAct); + fileMenu->addAction(browserAct); fileMenu->addAction(openAct); fileMenu->addSeparator(); fileMenu->addAction(saveAct); @@ -343,6 +349,7 @@ void MainWindow::createToolBars() { fileToolBar->addAction(newTabAct); fileToolBar->addAction(openAct); fileToolBar->addAction(saveAct); + fileToolBar->hide(); viewMenu->addAction(fileToolBar->toggleViewAction()); cryptToolBar = addToolBar(tr("Crypt")); @@ -385,7 +392,6 @@ void MainWindow::createToolBars() { // Add dropdown menu for file encryption/decryption to crypttoolbar fileEncButton = new QToolButton(); - // fileEncButton->setMenu(fileEncMenu); connect(fileEncButton, SIGNAL(clicked(bool)), this, SLOT(slotOpenFileTab())); fileEncButton->setPopupMode(QToolButton::InstantPopup); fileEncButton->setIcon(QIcon(":fileencryption.png")); |