diff options
author | Ken Moore <moorekou@gmail.com> | 2015-10-15 13:36:02 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-10-15 13:36:02 -0400 |
commit | a421b32852251b75efdbec5f27d5a8bed7dc71d7 (patch) | |
tree | 7a05ae7a88d9be7de0c9408adafd6c506d53d505 | |
parent | Add a "-new-instance" CLI flag for any app using the LuminaSingleInstance cla... (diff) | |
download | lumina-a421b32852251b75efdbec5f27d5a8bed7dc71d7.tar.gz lumina-a421b32852251b75efdbec5f27d5a8bed7dc71d7.tar.bz2 lumina-a421b32852251b75efdbec5f27d5a8bed7dc71d7.zip |
Add an option to lumina-fm to spawn a new instance/window (Ctrl-N keyboard shortcut, or in the file menu).
-rw-r--r-- | lumina-fm/MainUI.cpp | 7 | ||||
-rw-r--r-- | lumina-fm/MainUI.h | 1 | ||||
-rw-r--r-- | lumina-fm/MainUI.ui | 12 |
3 files changed, 19 insertions, 1 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index 10b6dc82..8b367f39 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -201,7 +201,8 @@ void MainUI::setupIcons(){ //Setup all the icons using libLumina ui->actionClose->setIcon( LXDG::findIcon("application-exit","") ); - ui->actionNew_Tab->setIcon( LXDG::findIcon("tab-new-background","") ); + ui->actionNew_Tab->setIcon( LXDG::findIcon("tab-new","") );\ + ui->actionNew_Window->setIcon( LXDG::findIcon("window-new","") ); //ui->action_Preferences->setIcon( LXDG::findIcon("configure","") ); ui->actionManage_Bookmarks->setIcon( LXDG::findIcon("bookmarks-organize","") ); ui->actionScan->setIcon( LXDG::findIcon("system-search","") ); @@ -369,6 +370,10 @@ void MainUI::DisplayStatusBar(QString msg){ //--------------------- //Menu Actions //--------------------- +void MainUI::on_actionNew_Window_triggered(){ + QProcess::startDetached("lumina-fm -new-instance"); +} + void MainUI::on_actionNew_Tab_triggered(){ OpenDirs(QStringList() << QDir::homePath()); } diff --git a/lumina-fm/MainUI.h b/lumina-fm/MainUI.h index f4dda453..588e2f15 100644 --- a/lumina-fm/MainUI.h +++ b/lumina-fm/MainUI.h @@ -111,6 +111,7 @@ private slots: //void slotStartSyncTimer(); //Menu Actions + void on_actionNew_Window_triggered(); void on_actionNew_Tab_triggered(); void on_actionSearch_triggered(); void on_actionClose_triggered(); diff --git a/lumina-fm/MainUI.ui b/lumina-fm/MainUI.ui index f3787279..c2a56626 100644 --- a/lumina-fm/MainUI.ui +++ b/lumina-fm/MainUI.ui @@ -113,6 +113,7 @@ <property name="title"> <string>File</string> </property> + <addaction name="actionNew_Window"/> <addaction name="actionNew_Tab"/> <addaction name="actionSearch"/> <addaction name="separator"/> @@ -295,6 +296,17 @@ <string>Smaller Icons</string> </property> </action> + <action name="actionNew_Window"> + <property name="text"> + <string>New Window</string> + </property> + <property name="shortcut"> + <string>Ctrl+N</string> + </property> + <property name="shortcutContext"> + <enum>Qt::ApplicationShortcut</enum> + </property> + </action> </widget> <resources/> <connections/> |