aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/MainUI.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/MainUI.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
index 9962a4bf..f1ffe0d8 100644
--- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
@@ -94,6 +94,7 @@ QSize orig = settings->value("preferences/MainWindowSize", QSize()).toSize();
nextTabRShort = new QShortcut( QKeySequence(tr("Shift+Right")), this);
togglehiddenfilesShort = new QShortcut( QKeySequence(tr("Ctrl+H")), this);
focusDirWidgetShort = new QShortcut( QKeySequence(tr("Ctrl+L")), this);
+ toggledirtreepaneShort = new QShortcut( QKeySequence(tr("Ctrl+P")), this);
//Finish loading the interface
workThread->start();
@@ -181,6 +182,7 @@ void MainUI::OpenDirs(QStringList dirs){
DW->setThumbnailSize(settings->value("iconsize", 32).toInt());
DW->showHidden( ui->actionView_Hidden_Files->isChecked() );
DW->showThumbnails( ui->actionShow_Thumbnails->isChecked() );
+ DW->showDirTreePane( ui->actionView_showDirTreePane->isChecked() );
//Now load the directory
DW->ChangeDir(dirs[i]); //kick off loading the directory info
}
@@ -254,6 +256,8 @@ void MainUI::setupConnections(){
connect(nextTabRShort, SIGNAL(activated()), this, SLOT( nextTab() ) );
connect(togglehiddenfilesShort, SIGNAL(activated()), this, SLOT( togglehiddenfiles() ) );
connect(focusDirWidgetShort, SIGNAL(activated()), this, SLOT( focusDirWidget() ) );
+ connect(toggledirtreepaneShort, SIGNAL(activated()), this, SLOT( toggleDirTreePane() ) );
+
}
void MainUI::focusDirWidget()
@@ -270,6 +274,14 @@ void MainUI::togglehiddenfiles()
on_actionView_Hidden_Files_triggered();
}
+void MainUI::toggleDirTreePane()
+{
+ //change setChecked to inverse value
+ ui->actionView_Hidden_Files->setChecked( !settings->value("showdirtree", true).toBool() );
+ // then trigger function
+ on_actionView_showDirTreePane_triggered();
+}
+
void MainUI::loadSettings(){
//Note: make sure this is run after all the UI elements are created and connected to slots
// but before the first directory gets loaded
@@ -277,6 +289,9 @@ void MainUI::loadSettings(){
on_actionView_Hidden_Files_triggered(); //make sure to update the models too
ui->actionShow_Thumbnails->setChecked( settings->value("showthumbnails",true).toBool());
on_actionShow_Thumbnails_triggered(); //make sure to update models too
+ ui->actionView_showDirTreePane->setChecked( settings->value("showdirtree", false).toBool());
+ on_actionView_showDirTreePane_triggered(); //make sure to update the models too
+
//ui->actionShow_Action_Buttons->setChecked(settings->value("showactions", true).toBool() );
//on_actionShow_Action_Buttons_triggered(); //make sure to update the UI
//ui->actionShow_Thumbnails->setChecked( settings->value("showthumbnails", true).toBool() );
@@ -476,6 +491,14 @@ void MainUI::on_actionView_Hidden_Files_triggered(){
}
+void MainUI::on_actionView_showDirTreePane_triggered(){
+ //worker->showdirtree = ui->actionView_showDirTreePane->isChecked();
+ settings->setValue("showdirtree", ui->actionView_showDirTreePane->isChecked());
+//Re-load the current browsers
+
+}
+
+
/*void MainUI::on_actionShow_Action_Buttons_triggered(){
bool show = ui->actionShow_Action_Buttons->isChecked();
settings->setValue("showactions", show);
bgstack15