diff options
author | q5sys <jt@obs-sec.com> | 2016-06-23 17:44:11 -0400 |
---|---|---|
committer | q5sys <jt@obs-sec.com> | 2016-06-23 17:44:11 -0400 |
commit | f20ec66f6a90d108ece31a192acd1f89b52b9931 (patch) | |
tree | c507a9afb9f18a87591fb3f2333c2d2919417226 /src-qt5/desktop-utils | |
parent | Cleaning up the lumina FreeBSD makefile. (diff) | |
download | lumina-f20ec66f6a90d108ece31a192acd1f89b52b9931.tar.gz lumina-f20ec66f6a90d108ece31a192acd1f89b52b9931.tar.bz2 lumina-f20ec66f6a90d108ece31a192acd1f89b52b9931.zip |
Add keyboard shortcut for showing/hiding hidden files
Diffstat (limited to 'src-qt5/desktop-utils')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.cpp | 14 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.h | 7 |
2 files changed, 17 insertions, 4 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp index a422e012..30267439 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp @@ -94,7 +94,8 @@ QSize orig = settings->value("preferences/MainWindowSize", QSize()).toSize(); if(DEBUG){ qDebug() << " - Keyboard Shortcuts"; } nextTabLShort = new QShortcut( QKeySequence(tr("Shift+Left")), this); nextTabRShort = new QShortcut( QKeySequence(tr("Shift+Right")), this); - + togglehiddenfilesShort = new QShortcut( QKeySequence(tr("Ctrl+H")), this); + //Finish loading the interface workThread->start(); if(DEBUG){ qDebug() << " - Icons"; } @@ -240,7 +241,7 @@ void MainUI::setupConnections(){ connect(tabBar, SIGNAL(tabCloseRequested(int)), this, SLOT(tabClosed(int)) ); connect(ui->menuBookmarks, SIGNAL(triggered(QAction*)), this, SLOT(goToBookmark(QAction*)) ); connect(ui->menuExternal_Devices, SIGNAL(triggered(QAction*)), this, SLOT(goToDevice(QAction*)) ); - + //Radio Buttons connect(radio_view_details, SIGNAL(toggled(bool)), this, SLOT(viewModeChanged(bool)) ); connect(radio_view_list, SIGNAL(toggled(bool)), this, SLOT(viewModeChanged(bool)) ); @@ -250,6 +251,15 @@ void MainUI::setupConnections(){ //Special Keyboard Shortcuts connect(nextTabLShort, SIGNAL(activated()), this, SLOT( prevTab() ) ); connect(nextTabRShort, SIGNAL(activated()), this, SLOT( nextTab() ) ); + connect(togglehiddenfilesShort, SIGNAL(activated()), this, SLOT( togglehiddenfiles() ) ); +} + +void MainUI::togglehiddenfiles() +{ + //change setChecked to inverse value + ui->actionView_Hidden_Files->setChecked( !settings->value("showhidden", true).toBool() ); + // then trigger function + on_actionView_Hidden_Files_triggered(); } void MainUI::loadSettings(){ diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.h b/src-qt5/desktop-utils/lumina-fm/MainUI.h index e0bae254..4522b7f6 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.h +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.h @@ -88,7 +88,7 @@ private: SlideshowWidget *SW; QSettings *settings; - QShortcut *nextTabLShort, *nextTabRShort; + QShortcut *nextTabLShort, *nextTabRShort, *togglehiddenfilesShort; QCompleter *dirCompleter; //Simplification Functions @@ -138,7 +138,10 @@ private slots: void tabClosed(int tab = -1); void nextTab(); //For keyboard shortcuts void prevTab(); //For keyboard shortcuts - + + //Other Shortcuts + void togglehiddenfiles(); + //Backend Info passing void DirDataAvailable(QString, QString, LFileInfoList); void SnapshotDataAvailable(QString, QString, QStringList); |