aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm/widgets
diff options
context:
space:
mode:
authorq5sys <jt@obs-sec.com>2017-06-13 14:24:31 -0400
committerq5sys <jt@obs-sec.com>2017-06-13 14:24:31 -0400
commit8ab7b2cfb6a3fa9c35293a06ede627a48027605b (patch)
treed5b3849d7cf4feb4b16f14b82359af4be79fd6fb /src-qt5/desktop-utils/lumina-fm/widgets
parentredo dirtreepane to work the same as other options (diff)
downloadlumina-8ab7b2cfb6a3fa9c35293a06ede627a48027605b.tar.gz
lumina-8ab7b2cfb6a3fa9c35293a06ede627a48027605b.tar.bz2
lumina-8ab7b2cfb6a3fa9c35293a06ede627a48027605b.zip
fix dirtreepane bugs and deactive from menu
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/widgets')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp32
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h12
2 files changed, 21 insertions, 23 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
index 64cb4718..a2adc94f 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
@@ -70,7 +70,6 @@
dirtreeModel->setFilter(QDir::NoDotAndDotDot | QDir::AllDirs); // remove extraneous dirs
dirtreeModel->setRootPath(folderTreePath);
//ui->folderViewPane->setModel(dirtreeModel)
- //ui->folderViewPane->setVisible(false); // set hidden initially to preserve legacy appearance of lumina-fm
//Now update the rest of the UI
canmodify = false; //initial value
@@ -139,6 +138,21 @@
ui->tool_zoom_out->setEnabled(px >16); //lower limit on image sizes
}
+ //====================
+ // Folder Pane
+ //====================
+
+ void DirWidget::showDirTreePane(bool show){
+ if(show !=showdirtree){
+ showdirtree = show;
+ }
+ }
+
+ bool DirWidget::showingDirTreePane(){
+ return showdirtree;
+ }
+
+
// ================
// PUBLIC SLOTS
// ================
@@ -223,7 +237,6 @@
kOpSS= new QShortcut(QKeySequence(Qt::Key_F6),this);
kOpMM= new QShortcut(QKeySequence(Qt::Key_F7),this);
kOpTerm = new QShortcut(QKeySequence(Qt::Key_F1),this);
-// kTreePane = new QShortcut(QKeySequence(Qt::CTRL+Qt::Key_P),this);
connect(kZoomIn, SIGNAL(activated()), this, SLOT(on_tool_zoom_in_clicked()) );
connect(kZoomOut, SIGNAL(activated()), this, SLOT(on_tool_zoom_out_clicked()) );
@@ -750,21 +763,6 @@
if(!list.isEmpty()){ emit PlayFiles(list); }
}
- //====================
- // Folder Pane
- //====================
-
- void DirWidget::showDirTreePane(bool showdirtree){
- if(showdirtree !=showHidden){
- showHidden = showdirtree;
- if(!currentDir.isEmpty()){ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); }
- }
- }
-
- bool DirWidget::showingDirTreePane(){
- return showHidden;
- }
-
//====================
// PROTECTED
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h
index 3626e85d..aca4f0fe 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h
@@ -44,15 +44,17 @@ public:
//Information
QString id();
QString currentDir();
- QFileSystemModel dirtreeModel;
+ QFileSystemModel *dirtreeModel;
//View Settings
void setShowDetails(bool show);
void showHidden(bool show);
void showThumbnails(bool show);
void setThumbnailSize(int px);
- void setFocusLineDir();
-
+ void setFocusLineDir();
+ void showDirTreePane(bool show);
+ bool showingDirTreePane();
+
public slots:
//void LoadDir(QString dir, LFileInfoList list);
void LoadSnaps(QString basedir, QStringList snaps);
@@ -63,8 +65,6 @@ public slots:
//Theme change functions
void UpdateIcons();
void UpdateText();
- void showDirTreePane(bool);
- bool showingDirTreePane();
private:
@@ -73,7 +73,7 @@ private:
QString ID, cBID; //unique ID assigned by the parent, and currently active browser widget
QString normalbasedir, snapbasedir, snaprelpath; //for maintaining directory context while moving between snapshots
QStringList snapshots, needThumbs, tmpSel;
- bool canmodify;
+ bool canmodify, showdirtree;
//The Toolbar and associated items
QToolBar *toolbar;
bgstack15