aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/MainUI.cpp2
-rw-r--r--src-qt5/desktop-utils/lumina-fm/MainUI.ui2
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp13
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h3
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui7
5 files changed, 24 insertions, 3 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
index 87c3a0f8..692b7562 100644
--- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
@@ -116,6 +116,7 @@ QSize orig = settings->value("preferences/MainWindowSize", QSize()).toSize();
TRAY = new TrayUI(this);
connect(TRAY, SIGNAL(JobsFinished()), this, SLOT(TrayJobsFinished()) );
if(DEBUG){ qDebug() << " - Done with init"; }
+ ui->actionOpen_as_Root->setVisible(LUtils::isValidBinary("qsudo"));
}
MainUI::~MainUI(){
@@ -971,3 +972,4 @@ void MainUI::on_actionOpen_as_Root_triggered()
{
ExternalProcess::launch("qsudo lumina-fm");
}
+
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.ui b/src-qt5/desktop-utils/lumina-fm/MainUI.ui
index 56de9b7c..8a635199 100644
--- a/src-qt5/desktop-utils/lumina-fm/MainUI.ui
+++ b/src-qt5/desktop-utils/lumina-fm/MainUI.ui
@@ -119,6 +119,8 @@
<addaction name="separator"/>
<addaction name="actionClose_Browser"/>
<addaction name="separator"/>
+ <addaction name="actionOpen_as_Root"/>
+ <addaction name="separator"/>
<addaction name="actionClose"/>
</widget>
<widget class="QMenu" name="menuView">
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
index a8cbea2c..83040108 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
@@ -284,10 +284,11 @@ void DirWidget::createMenus(){
else{ cOpenMenu->clear(); }
cOpenMenu->setTitle(tr("Launch..."));
cOpenMenu->setIcon( LXDG::findIcon("quickopen","") );
- cOpenMenu->addAction(LXDG::findIcon("utilities-terminal",""), tr("Terminal"), this, SLOT(openTerminal()), kOpTerm->key());
+ cOpenMenu->addAction(LXDG::findIcon("utilities-terminal",""), tr("Open Current Dir in a Terminal"), this, SLOT(openTerminal()), kOpTerm->key());
cOpenMenu->addAction(LXDG::findIcon("media-slideshow",""), tr("SlideShow"), this, SLOT(openInSlideshow()), kOpSS->key());
cOpenMenu->addAction(LXDG::findIcon("media-playback-start-circled","media-playback-start"), tr("Multimedia Player"), this, SLOT(openMultimedia()), kOpMM->key());
-/*
+ if(LUtils::isValidBinary("qsudo")){ cOpenMenu->addAction(LXDG::findIcon("", ""), tr("Open Current Dir as Root"), this, SLOT(openRootFM()));
+ /*
if(cFModMenu==0){ cFModMenu = new QMenu(this); }
else{ cFModMenu->clear(); }
cFModMenu->setTitle(tr("Modify Files..."));
@@ -322,6 +323,8 @@ void DirWidget::createMenus(){
}
+}
+
BrowserWidget* DirWidget::currentBrowser(){
if(cBID.isEmpty() || RCBW==0){ return BW; }
else{ return RCBW; }
@@ -883,3 +886,9 @@ void DirWidget::mouseReleaseEvent(QMouseEvent *ev){
ev->ignore(); //not handled here
}
}
+
+void DirWidget::openRootFM(){
+ rootfmdir = "qsudo lumina-fm -new-instance " + currentDir();
+ qDebug() << "rootfmdir" << rootfmdir;
+ ExternalProcess::launch(rootfmdir);
+}
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h
index 8dd367df..04af46fc 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h
@@ -73,7 +73,7 @@ private:
Ui::DirWidget *ui;
BrowserWidget *BW, *RCBW; //Main BrowserWidget and right-column browser widget
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
+ QString normalbasedir, snapbasedir, snaprelpath, rootfmdir; //for maintaining directory context while moving between snapshots
QStringList snapshots, needThumbs, tmpSel;
QSettings *settings;
bool canmodify;
@@ -129,6 +129,7 @@ private slots:
void fileCheckSums();
void fileProperties();
void openTerminal();
+ void openRootFM();
//Browser Functions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui
index 099fd91a..5f980c67 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui
@@ -25,11 +25,18 @@
<property name="font">
<font>
<family>Droid Sans Mono</family>
+ <pointsize>16</pointsize>
<weight>75</weight>
<italic>false</italic>
<bold>true</bold>
</font>
</property>
+ <property name="frameShape">
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Sunken</enum>
+ </property>
<property name="text">
<string> * - FILE MANAGER RUNNING AS ROOT- * </string>
</property>
bgstack15