aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-qt5/desktop-utils/lumina-fm/MainUI.cpp8
-rw-r--r--src-qt5/desktop-utils/lumina-fm/MainUI.h3
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.cpp5
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h1
4 files changed, 16 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
index 30267439..ea176846 100644
--- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
@@ -95,6 +95,7 @@ QSize orig = settings->value("preferences/MainWindowSize", QSize()).toSize();
nextTabLShort = new QShortcut( QKeySequence(tr("Shift+Left")), this);
nextTabRShort = new QShortcut( QKeySequence(tr("Shift+Right")), this);
togglehiddenfilesShort = new QShortcut( QKeySequence(tr("Ctrl+H")), this);
+ focusDirWidgetShort = new QShortcut( QKeySequence(tr("Ctrl+L")), this);
//Finish loading the interface
workThread->start();
@@ -252,6 +253,13 @@ void MainUI::setupConnections(){
connect(nextTabLShort, SIGNAL(activated()), this, SLOT( prevTab() ) );
connect(nextTabRShort, SIGNAL(activated()), this, SLOT( nextTab() ) );
connect(togglehiddenfilesShort, SIGNAL(activated()), this, SLOT( togglehiddenfiles() ) );
+ connect(focusDirWidgetShort, SIGNAL(activated()), this, SLOT( focusDirWidget() ) );
+}
+
+void MainUI::focusDirWidget()
+{
+ DirWidget *dir = FindActiveBrowser();
+ if(dir != 0) { dir->setFocusLineDir(); }
}
void MainUI::togglehiddenfiles()
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.h b/src-qt5/desktop-utils/lumina-fm/MainUI.h
index 4522b7f6..007fff97 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, *togglehiddenfilesShort;
+ QShortcut *nextTabLShort, *nextTabRShort, *togglehiddenfilesShort, *focusDirWidgetShort;
QCompleter *dirCompleter;
//Simplification Functions
@@ -141,6 +141,7 @@ private slots:
//Other Shortcuts
void togglehiddenfiles();
+ void focusDirWidget();
//Backend Info passing
void DirDataAvailable(QString, QString, LFileInfoList);
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.cpp
index d988bca6..a23c9aec 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.cpp
@@ -78,6 +78,11 @@ DirWidget::~DirWidget(){
stopload = true; //just in case another thread is still loading/running
}
+void DirWidget::setFocusLineDir() {
+ line_dir->setFocus();
+ line_dir->selectAll();
+}
+
void DirWidget::cleanup(){
stopload = true; //just in case another thread is still loading/running
if(thumbThread.isRunning()){ thumbThread.waitForFinished(); } //this will stop really quickly with the flag set
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h
index fad699b8..3ef9940b 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h
@@ -51,6 +51,7 @@ public:
void setDetails(QList<DETAILTYPES> list); //Which details to show and in which order (L->R)
void setThumbnailSize(int px);
void setShowCloseButton(bool show);
+ void setFocusLineDir();
//Date format for show items
QStringList getDateFormat();
bgstack15