diff options
author | ZackaryWelch <welch.zackary@gmail.com> | 2017-09-07 18:05:30 -0400 |
---|---|---|
committer | ZackaryWelch <welch.zackary@gmail.com> | 2017-09-07 18:05:30 -0400 |
commit | 2c3ebcb7558125e112ed08b76e50da8d7a3fc60b (patch) | |
tree | 14f9a8207b31407b873c104ac7eb9710a1c4e764 /src-qt5/desktop-utils/lumina-fm/widgets | |
parent | write auto-archival methods for file manager integration (diff) | |
download | lumina-2c3ebcb7558125e112ed08b76e50da8d7a3fc60b.tar.gz lumina-2c3ebcb7558125e112ed08b76e50da8d7a3fc60b.tar.bz2 lumina-2c3ebcb7558125e112ed08b76e50da8d7a3fc60b.zip |
Fixed bug with lumina-fm editing default configuration file as root
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/widgets')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp | 9 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h | 15 |
2 files changed, 11 insertions, 13 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp index 78759aa2..8273d09c 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp @@ -28,7 +28,7 @@ #define DEBUG 0 -DirWidget::DirWidget(QString objID, QWidget *parent) : QWidget(parent), ui(new Ui::DirWidget){ +DirWidget::DirWidget(QString objID, QSettings *settings, QWidget *parent) : QWidget(parent), ui(new Ui::DirWidget){ ui->setupUi(this); //load the designer file ID = objID; //Assemble the toolbar for the widget @@ -54,6 +54,7 @@ DirWidget::DirWidget(QString objID, QWidget *parent) : QWidget(parent), ui(new U toolbar->addAction(ui->actionDualColumn); columnActionGroup->addAction(ui->actionDualColumn); toolbar->addAction(ui->actionMenu); + this->settings = settings; //Add the browser widgets RCBW = 0; //right column browser is unavailable initially BW = new BrowserWidget("", this); @@ -340,8 +341,7 @@ void DirWidget::on_tool_zoom_in_clicked(){ size += 16; setThumbnailSize(size); //Now Save the size value as the default for next time - QSettings SET("lumina-desktop","lumina-fm"); - SET.setValue("iconsize", size); + settings->setValue("iconsize", size); } void DirWidget::on_tool_zoom_out_clicked(){ @@ -350,8 +350,7 @@ void DirWidget::on_tool_zoom_out_clicked(){ size -= 16; setThumbnailSize(size); //Now Save the size value as the default for next time - QSettings SET("lumina-desktop","lumina-fm"); - SET.setValue("iconsize", size); + settings->setValue("iconsize", size); } // -- Top Snapshot Buttons diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h index bff8cb74..8dd367df 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h @@ -32,7 +32,7 @@ class DirWidget : public QWidget{ Q_OBJECT public: enum DETAILTYPES{ NAME, SIZE, TYPE, DATEMOD, DATECREATE}; - DirWidget(QString objID, QWidget *parent = 0); //needs a unique ID (to distinguish from other DirWidgets) + DirWidget(QString objID, QSettings *settings, QWidget *parent = 0); //needs a unique ID (to distinguish from other DirWidgets) ~DirWidget(); void cleanup(); //called before the browser is closed down @@ -75,6 +75,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; + QSettings *settings; bool canmodify; //The Toolbar and associated items @@ -95,13 +96,11 @@ private: BrowserWidget* currentBrowser(); QStringList currentDirFiles(); //all the "files" available within the current dir/browser - //QProcess *pExtract; - - //OpenWithMenu - QString fileEXT, filePath; - QStringList mimetypes, keys, files; - //QStringList getPreferredApplications(); - + //QProcess *pExtract; + //OpenWithMenu + QString fileEXT, filePath; + QStringList mimetypes, keys, files; + //QStringList getPreferredApplications(); private slots: //UI BUTTONS/Actions |