aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/desktop-utils')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp16
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h24
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui62
3 files changed, 58 insertions, 44 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
index e5004742..23269ec2 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
@@ -72,8 +72,8 @@
dirtreeModel = new QFileSystemModel(this);
dirtreeModel->setFilter(QDir::NoDotAndDotDot | QDir::AllDirs); // remove extraneous dirs
dirtreeModel->setRootPath(folderTreePath);
- //ui->folderViewPane->setModel(dirtreeModel)
-
+ ui->folderViewPane->setModel(dirtreeModel);
+ ui->splitter->setSizes( QList<int>() << this->width()/3 << 2*this->width()/3);
//---------------------------------------------------//
//Now update the rest of the UI
@@ -158,12 +158,11 @@
return showdirtree;
}
- /*
void DirWidget::on_folderViewPane_clicked(const QModelIndex &index){
- QString tPath = dirtreeModel->fileInfo(index).absoluteFilePath(); // get what was clicked
- ChangeDir(tPath);
+ QString tPath = dirtreeModel->fileInfo(index).absoluteFilePath(); // get what was clicked
+ ChangeDir(tPath);
}
- */
+
//---------------------------------------------------//
@@ -574,7 +573,7 @@
contextMenu->addAction(LXDG::findIcon("edit-cut",""), tr("Cut Selection"), this, SLOT(cutFiles()), kCut->key() )->setEnabled(canmodify);
contextMenu->addAction(LXDG::findIcon("edit-copy",""), tr("Copy Selection"), this, SLOT(copyFiles()), kCopy->key() )->setEnabled(canmodify);
//---------------------------------------------------//
- contextMenu->addAction(LXDG::findIcon("archive",""), tr("Auto-Extract"), this, SLOT(autoExtractFiles()), kExtract->key() )->setEnabled(canmodify);
+ if(LUtils::isValidBinary("lumina-archiver") && sel.length() ==1){ contextMenu->addAction(LXDG::findIcon("archive",""), tr("Auto-Extract"), this, SLOT(autoExtractFiles()), kExtract->key() )->setEnabled(canmodify); }
//---------------------------------------------------//
}
if( QApplication::clipboard()->mimeData()->hasFormat("x-special/lumina-copied-files") ){
@@ -617,6 +616,9 @@
ui->actionBack->setEnabled( currentBrowser()->history().length()>1 );
line_dir->setText(normalbasedir);
emit TabNameChanged(ID, normalbasedir.section("/",-1));
+ QModelIndex index = dirtreeModel->index(cur,0);
+ ui->folderViewPane->setCurrentIndex( index );
+ ui->folderViewPane->scrollTo(index);
}
void DirWidget::dirStatusChanged(QString stat){
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h
index c586e3e9..20b677d7 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h
@@ -34,13 +34,13 @@ public:
enum DETAILTYPES{ NAME, SIZE, TYPE, DATEMOD, DATECREATE};
DirWidget(QString objID, QWidget *parent = 0); //needs a unique ID (to distinguish from other DirWidgets)
~DirWidget();
-
+
void cleanup(); //called before the browser is closed down
-
+
//Directory Managment
void ChangeDir(QString dirpath);
void setDirCompleter(QCompleter *comp);
-
+
//Information
QString id();
QString currentDir();
@@ -61,7 +61,7 @@ public:
public slots:
//void LoadDir(QString dir, LFileInfoList list);
void LoadSnaps(QString basedir, QStringList snaps);
-
+
//Refresh options
void refresh(); //Refresh current directory
@@ -109,14 +109,14 @@ private slots:
// -- Bottom Action Buttons
void on_tool_zoom_in_clicked();
- void on_tool_zoom_out_clicked();
+ void on_tool_zoom_out_clicked();
// -- Top Snapshot Buttons
void on_tool_snap_newer_clicked();
void on_tool_snap_older_clicked();
void on_slider_snap_valueChanged(int val = -1);
void direct_snap_selected(QAction*);
-
+
//Top Toolbar buttons
void on_actionBack_triggered();
void on_actionUp_triggered();
@@ -130,16 +130,16 @@ private slots:
void fileCheckSums();
void fileProperties();
void openTerminal();
-
+
//Browser Functions
void OpenContextMenu();
void UpdateContextMenu();
void currentDirectoryChanged(bool widgetonly = false);
void dirStatusChanged(QString);
- void setCurrentBrowser(QString);
-// void on_folderViewPane_clicked();
-
+ void setCurrentBrowser(QString);
+ void on_folderViewPane_clicked(const QModelIndex &index);
+
//Context Menu Functions
// - DIRECTORY operations
void createNewFile();
@@ -156,7 +156,7 @@ private slots:
void removeFiles();
void runFiles();
void runWithFiles();
- //void attachToNewEmail();
+ //void attachToNewEmail();
void autoExtractFiles();
// - Context-specific operations
@@ -169,7 +169,7 @@ signals:
void OpenDirectories(QStringList); //Directories to open in other tabs/columns
void findSnaps(QString, QString); //ID, dirpath (Request snapshot information for a directory)
void CloseBrowser(QString); //ID (Request that this browser be closed)
-
+
//External App/Widget launching
void PlayFiles(LFileInfoList); //open in multimedia player
void ViewFiles(LFileInfoList); //open in slideshow
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui
index 29660ad4..c49e99ac 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui
@@ -19,29 +19,11 @@
<property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0" columnstretch="0,1">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <property name="horizontalSpacing">
- <number>1</number>
- </property>
- <property name="verticalSpacing">
- <number>2</number>
- </property>
- <item row="0" column="0" rowspan="2" colspan="2">
+ <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,1,0">
+ <item>
<layout class="QHBoxLayout" name="toolbar_layout"/>
</item>
- <item row="2" column="1">
+ <item>
<layout class="QVBoxLayout" name="browser_layout_main">
<property name="spacing">
<number>1</number>
@@ -122,12 +104,42 @@
</layout>
</widget>
</item>
- <item>
- <layout class="QHBoxLayout" name="browser_layout"/>
- </item>
</layout>
</item>
- <item row="3" column="0" colspan="2">
+ <item>
+ <widget class="QWidget" name="widget" native="true">
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QSplitter" name="splitter">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <widget class="QTreeView" name="folderViewPane">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="indentation">
+ <number>15</number>
+ </property>
+ <property name="uniformRowHeights">
+ <bool>true</bool>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QWidget" name="horizontalLayoutWidget">
+ <layout class="QHBoxLayout" name="browser_layout"/>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_status">
bgstack15