From 6b1a38389925839278b2735041e088224b4a7be2 Mon Sep 17 00:00:00 2001 From: q5sys Date: Mon, 27 Nov 2017 01:34:28 -0500 Subject: remove file manager dev folder --- src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.cpp | 75 -- src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.h | 44 - src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.ui | 101 -- src-qt5/desktop-utils/lumina-fm-dev/Browser.cpp | 161 --- src-qt5/desktop-utils/lumina-fm-dev/Browser.h | 75 -- .../desktop-utils/lumina-fm-dev/BrowserWidget.cpp | 424 ------- .../desktop-utils/lumina-fm-dev/BrowserWidget.h | 94 -- src-qt5/desktop-utils/lumina-fm-dev/DirData.h | 194 --- src-qt5/desktop-utils/lumina-fm-dev/FODialog.cpp | 387 ------ src-qt5/desktop-utils/lumina-fm-dev/FODialog.h | 87 -- src-qt5/desktop-utils/lumina-fm-dev/FODialog.ui | 84 -- .../lumina-fm-dev/Insight-FileManager.png | Bin 2829 -> 0 bytes src-qt5/desktop-utils/lumina-fm-dev/MainUI.cpp | 964 --------------- src-qt5/desktop-utils/lumina-fm-dev/MainUI.h | 193 --- src-qt5/desktop-utils/lumina-fm-dev/MainUI.ui | 440 ------- src-qt5/desktop-utils/lumina-fm-dev/OPWidget.cpp | 117 -- src-qt5/desktop-utils/lumina-fm-dev/OPWidget.h | 64 - src-qt5/desktop-utils/lumina-fm-dev/OPWidget.ui | 71 -- src-qt5/desktop-utils/lumina-fm-dev/README.md | 44 - src-qt5/desktop-utils/lumina-fm-dev/ScrollDialog.h | 55 - src-qt5/desktop-utils/lumina-fm-dev/TrayUI.cpp | 93 -- src-qt5/desktop-utils/lumina-fm-dev/TrayUI.h | 47 - src-qt5/desktop-utils/lumina-fm-dev/gitCompat.cpp | 45 - src-qt5/desktop-utils/lumina-fm-dev/gitCompat.h | 88 -- src-qt5/desktop-utils/lumina-fm-dev/gitWizard.cpp | 138 --- src-qt5/desktop-utils/lumina-fm-dev/gitWizard.h | 68 - src-qt5/desktop-utils/lumina-fm-dev/gitWizard.ui | 252 ---- .../lumina-fm-dev/i18n/lumina-fm_af.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_ar.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_az.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_bg.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_bn.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_bs.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_ca.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_cs.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_cy.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_da.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_de.ts | 1283 ------------------- .../lumina-fm-dev/i18n/lumina-fm_el.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_en_AU.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_en_GB.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_en_ZA.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_es.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_et.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_eu.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_fa.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_fi.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_fr.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_fr_CA.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_fur.ts | 981 --------------- .../lumina-fm-dev/i18n/lumina-fm_gl.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_he.ts | 1280 ------------------- .../lumina-fm-dev/i18n/lumina-fm_hi.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_hr.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_hu.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_id.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_is.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_it.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_ja.ts | 1299 -------------------- .../lumina-fm-dev/i18n/lumina-fm_ka.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_ko.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_lt.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_lv.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_mk.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_mn.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_ms.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_mt.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_nb.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_ne.ts | 981 --------------- .../lumina-fm-dev/i18n/lumina-fm_nl.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_pa.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_pl.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_pt.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_pt_BR.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_ro.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_ru.ts | 1281 ------------------- .../lumina-fm-dev/i18n/lumina-fm_sa.ts | 981 --------------- .../lumina-fm-dev/i18n/lumina-fm_sk.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_sl.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_sr.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_sv.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_sw.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_ta.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_tg.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_th.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_tr.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_uk.ts | 1282 ------------------- .../lumina-fm-dev/i18n/lumina-fm_ur.ts | 981 --------------- .../lumina-fm-dev/i18n/lumina-fm_uz.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_vi.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_zh_CN.ts | 1292 ------------------- .../lumina-fm-dev/i18n/lumina-fm_zh_HK.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_zh_TW.ts | 1279 ------------------- .../lumina-fm-dev/i18n/lumina-fm_zu.ts | 1279 ------------------- .../desktop-utils/lumina-fm-dev/lumina-fm.desktop | 18 - src-qt5/desktop-utils/lumina-fm-dev/lumina-fm.pro | 136 -- src-qt5/desktop-utils/lumina-fm-dev/main.cpp | 48 - .../lumina-fm-dev/widgets/DDListWidgets.h | 329 ----- .../lumina-fm-dev/widgets/DirWidget2.cpp | 911 -------------- .../lumina-fm-dev/widgets/DirWidget2.h | 193 --- .../lumina-fm-dev/widgets/DirWidget2.ui | 261 ---- .../lumina-fm-dev/widgets/MultimediaWidget.cpp | 222 ---- .../lumina-fm-dev/widgets/MultimediaWidget.h | 71 -- .../lumina-fm-dev/widgets/MultimediaWidget.ui | 181 --- .../lumina-fm-dev/widgets/SlideshowWidget.cpp | 169 --- .../lumina-fm-dev/widgets/SlideshowWidget.h | 57 - .../lumina-fm-dev/widgets/SlideshowWidget.ui | 346 ------ 107 files changed, 91951 deletions(-) delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.cpp delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.ui delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/Browser.cpp delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/Browser.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.cpp delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/DirData.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/FODialog.cpp delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/FODialog.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/FODialog.ui delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/Insight-FileManager.png delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/MainUI.cpp delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/MainUI.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/MainUI.ui delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/OPWidget.cpp delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/OPWidget.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/OPWidget.ui delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/README.md delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/ScrollDialog.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/TrayUI.cpp delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/TrayUI.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/gitCompat.cpp delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/gitCompat.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/gitWizard.cpp delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/gitWizard.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/gitWizard.ui delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_af.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_ar.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_az.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_bg.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_bn.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_bs.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_ca.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_cs.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_cy.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_da.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_de.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_el.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_en_AU.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_en_GB.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_en_ZA.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_es.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_et.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_eu.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_fa.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_fi.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_fr.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_fr_CA.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_fur.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_gl.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_he.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_hi.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_hr.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_hu.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_id.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_is.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_it.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_ja.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_ka.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_ko.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_lt.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_lv.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_mk.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_mn.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_ms.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_mt.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_nb.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_ne.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_nl.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_pa.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_pl.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_pt.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_pt_BR.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_ro.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_ru.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_sa.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_sk.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_sl.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_sr.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_sv.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_sw.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_ta.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_tg.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_th.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_tr.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_uk.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_ur.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_uz.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_vi.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_zh_CN.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_zh_HK.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_zh_TW.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/i18n/lumina-fm_zu.ts delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/lumina-fm.desktop delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/lumina-fm.pro delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/main.cpp delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/widgets/DDListWidgets.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/widgets/DirWidget2.cpp delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/widgets/DirWidget2.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/widgets/DirWidget2.ui delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/widgets/MultimediaWidget.cpp delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/widgets/MultimediaWidget.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/widgets/MultimediaWidget.ui delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/widgets/SlideshowWidget.cpp delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/widgets/SlideshowWidget.h delete mode 100644 src-qt5/desktop-utils/lumina-fm-dev/widgets/SlideshowWidget.ui (limited to 'src-qt5/desktop-utils') diff --git a/src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.cpp b/src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.cpp deleted file mode 100644 index 5125a48e..00000000 --- a/src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "BMMDialog.h" -#include "ui_BMMDialog.h" - -BMMDialog::BMMDialog(QWidget *parent) : QDialog(parent), ui(new Ui::BMMDialog){ - ui->setupUi(this); //load the designer file - this->setWindowIcon( LXDG::findIcon("bookmarks-organize","") ); - ui->tool_remove->setIcon( LXDG::findIcon("edit-delete","") ); - ui->tool_rename->setIcon( LXDG::findIcon("edit-rename","") ); - ui->push_done->setIcon( LXDG::findIcon("dialog-ok","") ); - connect(ui->tool_remove, SIGNAL(clicked()), this, SLOT(RemoveItem()) ); - connect(ui->tool_rename, SIGNAL(clicked()), this, SLOT(RenameItem()) ); - connect(ui->push_done, SIGNAL(clicked()), this, SLOT(close()) ); -} - -BMMDialog::~BMMDialog(){ -} - -void BMMDialog::loadSettings(QSettings *set){ - settings = set; //save this pointer for later - //Now fill the tree with the items - QStringList BM = settings->value("bookmarks", QStringList()).toStringList(); - ui->treeWidget->clear(); - for(int i=0; itreeWidget->addTopLevelItem( new QTreeWidgetItem(BM[i].split("::::")) ); - } - //Now expand to encompass all the items - ui->treeWidget->resizeColumnToContents(0); - ui->treeWidget->resizeColumnToContents(1); -} -// ==== PRIVATE ==== - -// ==== PRIVATE SLOTS ==== -void BMMDialog::RemoveItem(){ - //Get the currently selected item - if(ui->treeWidget->currentItem()==0){ return; } //nothing selected - QString item = ui->treeWidget->currentItem()->text(0)+"::::"+ui->treeWidget->currentItem()->text(1); - //Remove it from the widget - delete ui->treeWidget->takeTopLevelItem( ui->treeWidget->indexOfTopLevelItem( ui->treeWidget->currentItem() ) ); - //Remove it from the saved bookmarks - QStringList BM = settings->value("bookmarks",QStringList()).toStringList(); - BM.removeAll(item); - settings->setValue("bookmarks",BM); - settings->sync(); -} - -void BMMDialog::RenameItem(){ - //Get the currently selected item - if(ui->treeWidget->currentItem()==0){ return; } //nothing selected - QString olditem = ui->treeWidget->currentItem()->text(0)+"::::"+ui->treeWidget->currentItem()->text(1); - //Prompt for the new name - bool ok = false; - QString name = QInputDialog::getText(this, tr("Rename Bookmark"), tr("Name:"), QLineEdit::Normal, olditem.section("::::",0,0), \ - &ok, 0, Qt::ImhFormattedNumbersOnly | Qt::ImhUppercaseOnly | Qt::ImhLowercaseOnly); - if(!ok || name.isEmpty()){ return; } //cancelled - //Check if this name already exists - QStringList BM = settings->value("bookmarks",QStringList()).toStringList(); - if(BM.filter(name+"::::").length() >0){ - QMessageBox::warning(this, tr("Invalid Name"), tr("This bookmark name already exists. Please choose another.") ); - QTimer::singleShot(0,this, SLOT(RenameItem())); - return; - } - //Rename it in the widget - ui->treeWidget->currentItem()->setText(0,name); - //Replace it in the saved bookmarks - BM.removeAll(olditem); - BM.append(name+"::::"+olditem.section("::::",1,3)); - settings->setValue("bookmarks",BM); - settings->sync(); -} \ No newline at end of file diff --git a/src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.h b/src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.h deleted file mode 100644 index d421446c..00000000 --- a/src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.h +++ /dev/null @@ -1,44 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This is the dialog for managing bookmarks (BookMark Manager) -//=========================================== -#ifndef _LUMINA_FILE_MANAGER_BOOKMARK_MANAGER_DIALOG_H -#define _LUMINA_FILE_MANAGER_BOOKMARK_MANAGER_DIALOG_H - -// Qt includes -#include -#include -#include -#include -#include -#include - -// libLumina includes -#include - -namespace Ui{ - class BMMDialog; -}; - -class BMMDialog : public QDialog{ - Q_OBJECT -public: - BMMDialog(QWidget *parent = 0); - ~BMMDialog(); - - void loadSettings(QSettings *); - -private: - Ui::BMMDialog *ui; - QSettings *settings; - -private slots: - void RemoveItem(); - void RenameItem(); -}; - -#endif diff --git a/src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.ui b/src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.ui deleted file mode 100644 index fbadb61e..00000000 --- a/src-qt5/desktop-utils/lumina-fm-dev/BMMDialog.ui +++ /dev/null @@ -1,101 +0,0 @@ - - - BMMDialog - - - - 0 - 0 - 466 - 238 - - - - Manage Bookmarks - - - - - - - - 5 - - - false - - - true - - - 130 - - - - Name - - - - - Path - - - - - - - - - - - - Remove Bookmark - - - Remove - - - Qt::ToolButtonTextBesideIcon - - - - - - - Rename BookMark - - - Rename - - - Qt::ToolButtonTextBesideIcon - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Finished - - - - - - - - - - diff --git a/src-qt5/desktop-utils/lumina-fm-dev/Browser.cpp b/src-qt5/desktop-utils/lumina-fm-dev/Browser.cpp deleted file mode 100644 index 36cae5f4..00000000 --- a/src-qt5/desktop-utils/lumina-fm-dev/Browser.cpp +++ /dev/null @@ -1,161 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2016, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "Browser.h" - -#include -#include -#include -#include - -#include - -Browser::Browser(QObject *parent) : QObject(parent){ - watcher = new QFileSystemWatcher(this); - connect(watcher, SIGNAL(fileChanged(const QString&)), this, SLOT(fileChanged(QString)) ); - connect(watcher, SIGNAL(directoryChanged(const QString&)), this, SLOT(dirChanged(QString)) ); - showHidden = false; - showThumbs = false; - imageFormats = LUtils::imageExtensions(false); //lowercase suffixes - connect(this, SIGNAL(threadDone(QString, QImage)), this, SLOT(futureFinished(QString, QImage))); //will always be between different threads -} - -Browser::~Browser(){ - //watcher->deleteLater(); -} - -QString Browser::currentDirectory(){ return currentDir; } - -void Browser::showHiddenFiles(bool show){ - if(show !=showHidden){ - showHidden = show; - if(!currentDir.isEmpty()){ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); } - } -} -bool Browser::showingHiddenFiles(){ - return showHidden; -} - -void Browser::showThumbnails(bool show){ - if(show != showThumbs){ - showThumbs = show; - if(!currentDir.isEmpty()){ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); } - } -} - -bool Browser::showingThumbnails(){ - return showThumbs; -} - -// PRIVATE -void Browser::loadItem(QString info, Browser *obj){ - QImage pix; - if(imageFormats.contains(info.section(".",-1).toLower()) ){ - QFile file(info); - if(file.open(QIODevice::ReadOnly)){ - QByteArray bytes = file.readAll(); - file.close(); - pix.loadFromData(bytes); - if(pix.width() > 256 || pix.height() > 256 ){ - pix = pix.scaled(256,256, Qt::KeepAspectRatio, Qt::FastTransformation); - } - } - } - - //qDebug() << " - done with item:" << info; - obj->emit threadDone(info, pix); -} - -QIcon Browser::loadIcon(QString icon){ - if(!mimeIcons.contains(icon)){ - mimeIcons.insert(icon, LXDG::findIcon(icon, "unknown")); - } - - return mimeIcons[icon]; -} - - -// PRIVATE SLOTS -void Browser::fileChanged(QString file){ - if(file.startsWith(currentDir+"/") ){ - if(QFile::exists(file) ){ QtConcurrent::run(this, &Browser::loadItem, file, this); } //file modified but not removed - else{ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); } //file removed - need to update entire dir - }else if(file==currentDir){ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); } -} - -void Browser::dirChanged(QString dir){ - - if(dir==currentDir){ QTimer::singleShot(500, this, SLOT(loadDirectory()) ); } - else if(dir.startsWith(currentDir)){ QtConcurrent::run(this, &Browser::loadItem, dir, this ); } -} - -void Browser::futureFinished(QString name, QImage icon){ - //Note: this will be called once for every item that loads - QIcon ico; - //LFileInfo info(name); - LFileInfo *info = new LFileInfo(name); - if(!icon.isNull() && showThumbs){ - //qDebug() << " -- Data:"; - QPixmap pix = QPixmap::fromImage(icon); - ico.addPixmap(pix); - //}else if(info->isDir()){ - //qDebug() << " -- Folder:"; - //ico = loadIcon("folder"); - } - if(ico.isNull()){ - //qDebug() << " -- MimeType:" << info.fileName() << info.mimetype(); - ico = loadIcon(info->iconfile()); - } - this->emit itemDataAvailable( ico, info); - //qDebug() << " -- done:" << name; -} - -// PUBLIC SLOTS -void Browser::loadDirectory(QString dir){ - if(dir.isEmpty()){ dir = currentDir; } //reload current directory - if(dir.isEmpty()){ return; } //nothing to do - nothing previously loaded - //qDebug() << "Load Directory" << dir; - if(currentDir != dir){ //let the main widget know to clear all current items (completely different dir) - oldFiles.clear(); - emit clearItems(); - } - currentDir = dir; //save this for later - //clean up the watcher first - QStringList watched; watched << watcher->files() << watcher->directories(); - if(!watched.isEmpty()){ watcher->removePaths(watched); } - QStringList old = oldFiles; //copy this over for the moment (both lists will change in a moment) - oldFiles.clear(); //get ready for re-creating this list - // read the given directory - QDir directory(dir); - if(directory.exists()){ - QStringList files; - if(showHidden){ files = directory.entryList( QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot, QDir::NoSort); } - else{ files = directory.entryList( QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot, QDir::NoSort); } - emit itemsLoading(files.length()); - for(int i=0; iaddPath(directory.absoluteFilePath(files[i])); - //qDebug() << "Future Starting:" << files[i]; - QString path = directory.absoluteFilePath(files[i]); - if(old.contains(path)){ old.removeAll(path); } - oldFiles << path; //add to list for next time - //if(showThumbs && imageFormats.contains(path.section(".",-1).toLower())){ - QtConcurrent::run(this, &Browser::loadItem, path, this); - /*}else{ - //No special icon loading - just skip the file read step - futureFinished(path, QImage()); //loadItem(path, this); - }*/ - } - watcher->addPath(directory.absolutePath()); - if(!old.isEmpty()){ - old.removeAll(directory.absolutePath()); - for(int i=0; i -#include -#include -#include -//#include - -#include -/*class FileItem{ -public: - QString name; - QByteArray icon; - - FileItem(){} - ~FileItem(){}; -};*/ - -class Browser : public QObject{ - Q_OBJECT -public: - Browser(QObject *parent = 0); - ~Browser(); - - QString currentDirectory(); - void showHiddenFiles(bool); - bool showingHiddenFiles(); - - void showThumbnails(bool); - bool showingThumbnails(); - - //FileItem loadItem(QString info); //this is the main loader class - multiple instances each run in a separate thread - -private: - QString currentDir; - QFileSystemWatcher *watcher; - bool showHidden, showThumbs; - QStringList imageFormats, oldFiles; - QHash mimeIcons; //cache for quickly re-using QIcons - - void loadItem(QString info, Browser *obj); //this is the main loader class - multiple instances each run in a separate thread - QIcon loadIcon(QString icon); //simplification for using/populating the mimIcons cache - -private slots: - void fileChanged(QString); //tied into the watcher - for file change notifications - void dirChanged(QString); // tied into the watcher - for new/removed files in the current dir - - void futureFinished(QString, QImage); - -public slots: - void loadDirectory(QString dir = ""); - -signals: - //Main Signals - void itemRemoved(QString item); //emitted if a file was removed from the underlying - void clearItems(); //emitted when dirs change for example - void itemDataAvailable(QIcon, LFileInfo*); - - //Start/Stop signals for loading of data - void itemsLoading(int); //number of items which are getting loaded - - //Internal signal for the alternate threads - void threadDone(QString, QImage); -}; - -#endif diff --git a/src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.cpp b/src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.cpp deleted file mode 100644 index d5f219bb..00000000 --- a/src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.cpp +++ /dev/null @@ -1,424 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2016, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "BrowserWidget.h" - -#include -#include -#include - -#include -#include - -BrowserWidget::BrowserWidget(QString objID, QWidget *parent) : QWidget(parent){ - //Setup the Widget/UI - this->setLayout( new QVBoxLayout(this) ); - ID = objID; - //BROWSER = 0; - //Setup the backend browser object - BROWSER = new Browser(this); - connect(BROWSER, SIGNAL(clearItems()), this, SLOT(clearItems()) ); - connect(BROWSER, SIGNAL(itemRemoved(QString)), this, SLOT(itemRemoved(QString)) ); - connect(BROWSER, SIGNAL(itemDataAvailable(QIcon, LFileInfo*)), this, SLOT(itemDataAvailable(QIcon, LFileInfo*)) ); - connect(BROWSER, SIGNAL(itemsLoading(int)), this, SLOT(itemsLoading(int)) ); - connect(this, SIGNAL(dirChange(QString)), BROWSER, SLOT(loadDirectory(QString)) ); - listWidget = 0; - treeWidget = 0; - readDateFormat(); - freshload = true; //nothing loaded yet - numItems = 0; - this->setMouseTracking(true); -} - -BrowserWidget::~BrowserWidget(){ - BROWSER->deleteLater(); -} - -void BrowserWidget::changeDirectory(QString dir){ - if(BROWSER->currentDirectory()==dir){ return; } //already on this directory - //qDebug() << "Change Directory:" << dir << historyList; - - if( !dir.contains("/.zfs/snapshot/") ){ - if(historyList.isEmpty() || !dir.isEmpty()){ historyList << dir; } - }else{ - //Need to remove the zfs snapshot first and ensure that it is not the same dir (just a diff snapshot) - QString cleaned = dir; - cleaned = cleaned.replace( QRegExp("/\\.zfs/snapshot/(.)+/"), "/" ); - if( (historyList.isEmpty() || historyList.last()!=cleaned) && !cleaned.isEmpty() ){ historyList << cleaned; } - } - //qDebug() << "History:" << historyList; - emit dirChange(dir); -} - -void BrowserWidget::showDetails(bool show){ - //Clean up widgets first - QSize iconsize; - if(show && listWidget!=0){ - //Clean up list widget - iconsize = listWidget->iconSize(); - this->layout()->removeWidget(listWidget); - listWidget->deleteLater(); - listWidget = 0; - }else if(!show && treeWidget!=0){ - iconsize = treeWidget->iconSize(); - this->layout()->removeWidget(treeWidget); - treeWidget->deleteLater(); - treeWidget = 0; - } - // qDebug() << "Create Widget: details:" << show; - //Now create any new widgets - if(show && treeWidget == 0){ - treeWidget = new DDTreeWidget(this); - treeWidget->setContextMenuPolicy(Qt::CustomContextMenu); - if(!iconsize.isNull()){ treeWidget->setIconSize(iconsize); } - this->layout()->addWidget(treeWidget); - connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SIGNAL(itemsActivated()) ); - connect(treeWidget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SIGNAL(contextMenuRequested()) ); - connect(treeWidget, SIGNAL(DataDropped(QString, QStringList)), this, SIGNAL(DataDropped(QString, QStringList)) ); - connect(treeWidget, SIGNAL(GotFocus()), this, SLOT(selectionChanged()) ); - retranslate(); - treeWidget->sortItems(0, Qt::AscendingOrder); - if(!BROWSER->currentDirectory().isEmpty()){ emit dirChange(""); } - }else if(!show && listWidget==0){ - listWidget = new DDListWidget(this); - listWidget->setContextMenuPolicy(Qt::CustomContextMenu); - if(!iconsize.isNull()){ listWidget->setIconSize(iconsize); } - this->layout()->addWidget(listWidget); - connect(listWidget, SIGNAL(itemActivated(QListWidgetItem*)), this, SIGNAL(itemsActivated()) ); - connect(listWidget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SIGNAL(contextMenuRequested()) ); - connect(listWidget, SIGNAL(DataDropped(QString, QStringList)), this, SIGNAL(DataDropped(QString, QStringList)) ); - connect(listWidget, SIGNAL(GotFocus()), this, SLOT(selectionChanged()) ); - if(!BROWSER->currentDirectory().isEmpty()){ emit dirChange(""); } - } - //qDebug() << " Done making widget"; -} - -bool BrowserWidget::hasDetails(){ - return (treeWidget!=0); -} - -void BrowserWidget::showHiddenFiles(bool show){ - BROWSER->showHiddenFiles(show); -} - -bool BrowserWidget::hasHiddenFiles(){ - return BROWSER->showingHiddenFiles(); -} - -void BrowserWidget::showThumbnails(bool show){ - BROWSER->showThumbnails(show); -} - -bool BrowserWidget::hasThumbnails(){ - return BROWSER->showingThumbnails(); -} - -void BrowserWidget::setThumbnailSize(int px){ - bool larger = true; - if(listWidget!=0){ - larger = listWidget->iconSize().height() < px; - listWidget->setIconSize(QSize(px,px)); - }else if(treeWidget!=0){ - larger = treeWidget->iconSize().height() < px; - treeWidget->setIconSize(QSize(px,px)); - } - //qDebug() << "Changing Icon Size:" << px << larger; - if(BROWSER->currentDirectory().isEmpty() || !larger ){ return; } //don't need to reload icons unless the new size is larger - emit dirChange(""); -} - -int BrowserWidget::thumbnailSize(){ - if(listWidget!=0){ return listWidget->iconSize().height(); } - else if(treeWidget!=0){ return treeWidget->iconSize().height(); } - return 0; -} - -void BrowserWidget::setHistory(QStringList paths){ - //NOTE: later items are used first - historyList = paths; -} - -QStringList BrowserWidget::history(){ - return historyList; -} - -void BrowserWidget::setShowActive(bool show){ - QString base = "";//"QListWidget::item,QTreeWidget::item{ border: 1px solid transparent; background-color: red; } QListWidget::item:hover,QTreeWidget::item:hover{ border: 1px solid black; background-color: blue; }"; - if(!show){ base.prepend("QAbstractScrollArea{ background-color: rgba(10,10,10,10); } QHeaderView{ background-color: lightgrey; } "); } - this->setStyleSheet(base); -} - -// This function is only called if user changes sessionsettings. By doing so, operations like sorting by date -// are faster because the date format is already stored in DirWidget::date_format static variable -void BrowserWidget::readDateFormat() { - if(!date_format.isEmpty()) - date_format.clear(); - QSettings settings("lumina-desktop","sessionsettings"); - // If value doesn't exist or is not setted, empty string is returned - date_format << settings.value("DateFormat").toString(); - date_format << settings.value("TimeFormat").toString(); -} - - -QStringList BrowserWidget::currentSelection(){ - QStringList out; - if(listWidget!=0){ - QList sel = listWidget->selectedItems(); - //qDebug() << "Selection number:" << sel.length(); - //if(sel.isEmpty() && listWidget->currentItem()!=0){ sel << listWidget->currentItem(); } - //qDebug() << "Selection number:" << sel.length(); - for(int i=0; iwhatsThis(); qDebug() << "Selection:" << sel[i]->text() << sel[i]->whatsThis(); } - }else if(treeWidget!=0){ - QList sel = treeWidget->selectedItems(); - //if(sel.isEmpty() && treeWidget->currentItem()!=0){ sel << treeWidget->currentItem(); } - for(int i=0; iwhatsThis(0); } - } - out.removeDuplicates(); //just in case - tree widgets sometimes "select" each column as an individual item - return out; -} - -QStringList BrowserWidget::currentItems(int type){ - //type: 0=all, -1=files, +1=dirs - QStringList paths; - if(listWidget!=0){ - for(int i=0; icount(); i++){ - if(i<0 && (listWidget->item(i)->data(Qt::UserRole).toString()=="file") ){ //FILES - paths << listWidget->item(i)->whatsThis(); - }else if(i>0 && (listWidget->item(i)->data(Qt::UserRole).toString()=="dir")){ //DIRS - paths << listWidget->item(i)->whatsThis(); - }else if(i==0){ //ALL - paths << listWidget->item(i)->whatsThis(); - } - } - }else if(treeWidget!=0){ - for(int i=0; itopLevelItemCount(); i++){ - if(i<0 && !treeWidget->topLevelItem(i)->text(1).isEmpty()){ //FILES - paths << treeWidget->topLevelItem(i)->whatsThis(0); - }else if(i>0 && treeWidget->topLevelItem(i)->text(1).isEmpty()){ //DIRS - paths << treeWidget->topLevelItem(i)->whatsThis(0); - }else if(i==0){ //ALL - paths << treeWidget->topLevelItem(i)->whatsThis(0); - } - } - } - return paths; -} - -// ================= -// PUBLIC SLOTS -// ================= -void BrowserWidget::retranslate(){ - if(listWidget!=0){ - - }else if(treeWidget!=0){ - QTreeWidgetItem *it = new QTreeWidgetItem(); - it->setText(0,tr("Name")); - it->setText(1,tr("Size")); - it->setText(2, tr("Type")); - it->setText(3, tr("Date Modified") ); - it->setText(4, tr("Date Created") ); - treeWidget->setHeaderItem(it); - //Now reset the sorting (alphabetically, dirs first) - treeWidget->sortItems(0, Qt::AscendingOrder); // sort by name - treeWidget->sortItems(1, Qt::AscendingOrder); //sort by type - } -} - -// ================= -// PRIVATE -// ================= -QString BrowserWidget::DTtoString(QDateTime dt){ - QStringList fmt = date_format; - if(fmt.isEmpty() || fmt.length()!=2 || (fmt[0].isEmpty() && fmt[1].isEmpty()) ){ - //Default formatting - return dt.toString(Qt::DefaultLocaleShortDate); - }else if(fmt[0].isEmpty()){ - //Time format only - return (dt.date().toString(Qt::DefaultLocaleShortDate)+" "+dt.time().toString(fmt[1])); - }else if(fmt[1].isEmpty()){ - //Date format only - return (dt.date().toString(fmt[0])+" "+dt.time().toString(Qt::DefaultLocaleShortDate)); - }else{ - //both date/time formats set - return dt.toString(fmt.join(" ")); - } -} - -// ================= -// PRIVATE SLOTS -// ================= -void BrowserWidget::clearItems(){ - //qDebug() << "Clear Items"; - if(listWidget!=0){ listWidget->clear(); } - else if(treeWidget!=0){ treeWidget->clear(); } - freshload = true; -} - -void BrowserWidget::itemRemoved(QString item){ - //qDebug() << "item removed" << item; - if(treeWidget!=0){ - QList found = treeWidget->findItems(item.section("/",-1), Qt::MatchExactly, 0); //look for exact name match - if(found.isEmpty()){ return; } //no match - delete found[0]; - }else if(listWidget!=0){ - QList found = listWidget->findItems(item.section("/",-1), Qt::MatchExactly); //look for exact name match - if(found.isEmpty()){ return; } - delete found[0]; - } -} - -void BrowserWidget::itemDataAvailable(QIcon ico, LFileInfo *info){ - //qDebug() << "Item Data Available:" << info->fileName(); - int num = 0; - if(listWidget!=0){ - //LIST WIDGET - name and icon only - if(info->isDesktopFile() && info->XDG()->isValid()){ - QList items = listWidget->findItems(info->XDG()->name, Qt::MatchExactly); - //Could be multiple items with the same text in this case - check paths as well - bool found = false; - for(int i=0; iwhatsThis()==info->absoluteFilePath()){ - found = true; - items[i]->setText(info->XDG()->name); - items[i]->setIcon(ico); - } - } - if(!found){ - //New Item - QListWidgetItem *it = new CQListWidgetItem(ico, info->XDG()->name, listWidget); - it->setWhatsThis(info->absoluteFilePath()); - it->setData(Qt::UserRole, (info->isDir() ? "dir" : "file")); //used for sorting - listWidget->addItem(it); - } - }else{ - //non-desktop entry - if(!listWidget->findItems(info->fileName(), Qt::MatchExactly).isEmpty()){ - //Update existing item - QListWidgetItem *it = listWidget->findItems(info->fileName(), Qt::MatchExactly).first(); - it->setText(info->fileName()); - it->setWhatsThis(info->absoluteFilePath()); - it->setIcon(ico); - - }else{ - //New item - QListWidgetItem *it = new CQListWidgetItem(ico, info->fileName(), listWidget); - it->setWhatsThis(info->absoluteFilePath()); - it->setData(Qt::UserRole, (info->isDir() ? "dir" : "file")); //used for sorting - listWidget->addItem(it); - } - num = listWidget->count(); - } //end non-desktop entry - }else if(treeWidget!=0){ - QTreeWidgetItem *it = 0; - if(info->isDesktopFile()){ - QList items = treeWidget->findItems(info->XDG()->name, Qt::MatchExactly, 0); - for(int i=0; iwhatsThis(0)==info->absoluteFilePath()){ it = items[i]; } - } - if(it==0){ - //New item - it = new CQTreeWidgetItem(treeWidget); - it->setText(0, info->XDG()->name ); //name (0) - treeWidget->addTopLevelItem(it); - } - }else{ - if( ! treeWidget->findItems(info->fileName(), Qt::MatchExactly, 0).isEmpty() ){ it = treeWidget->findItems(info->fileName(), Qt::MatchExactly, 0).first(); } - else{ - it = new CQTreeWidgetItem(treeWidget); - it->setText(0, info->fileName() ); //name (0) - treeWidget->addTopLevelItem(it); - } - } - //Now set/update all the data - it->setIcon(0, ico); - it->setText(1, info->isDir() ? "" : LUtils::BytesToDisplaySize(info->size()) ); //size (1) - it->setText(2, info->mimetype() ); //type (2) - it->setText(3, DTtoString(info->lastModified() )); //modification date (3) - it->setText(4, DTtoString(info->created()) ); //creation date (4) - //Now all the hidden data - it->setWhatsThis(0, info->absoluteFilePath()); - it->setWhatsThis(3, info->lastModified().toString("yyyyMMddhhmmsszzz") ); //sorts by this actually - it->setWhatsThis(4, info->created().toString("yyyyMMddhhmmsszzz") ); //sorts by this actually - num = treeWidget->topLevelItemCount(); - } - - if(num < numItems){ - //Still loading items - //this->setEnabled(false); - }else{ - if(freshload && treeWidget!=0){ - //qDebug() << "Resize Tree Widget Contents"; - for(int i=0; icolumnCount(); i++){ treeWidget->resizeColumnToContents(i); } - } - freshload = false; //any further changes are updates - not a fresh load of a dir - //Done loading items - //this->setEnabled(true); - //Assemble any status message - QString stats = QString(tr("Capacity: %1")).arg(LOS::FileSystemCapacity(BROWSER->currentDirectory())); - int nF, nD; - double bytes = 0; - nF = nD = 0; - if(listWidget!=0){ - bytes = -1; //not supported for this widget - for(int i=0; icount(); i++){ - if(listWidget->item(i)->data(Qt::UserRole).toString()=="dir"){ nD++; } //directory - else{ nF++; } //file - } - }else if(treeWidget!=0){ - for(int i=0; itopLevelItemCount(); i++){ - if(treeWidget->topLevelItem(i)->text(1).isEmpty()){ - nD++; //directory - }else{ - nF++; //file - bytes+=LUtils::DisplaySizeToBytes(treeWidget->topLevelItem(i)->text(1)); - } - } - } - if( (nF+nD) >0){ - stats.prepend("\t"); - if(nF>0){ - //Has Files - if(bytes>0){ - stats.prepend( QString(tr("Files: %1 (%2)")).arg(QString::number(nF), LUtils::BytesToDisplaySize(bytes)) ); - }else{ - stats.prepend( QString(tr("Files: %1")).arg(QString::number(nF)) ); - } - } - if(nD > 0){ - //Has Dirs - if(nF>0){ stats.prepend(" / "); }//has files output already - stats.prepend( QString(tr("Dirs: %1")).arg(QString::number(nD)) ); - } - } - emit updateDirectoryStatus( stats.simplified() ); - statustip = stats.simplified(); //save for later - }//end check for finished loading items -} - -void BrowserWidget::itemsLoading(int total){ - //qDebug() << "Got number of items loading:" << total; - if(listWidget!=0){ listWidget->setWhatsThis( BROWSER->currentDirectory() ); } - if(treeWidget!=0){ treeWidget->setWhatsThis(BROWSER->currentDirectory() ); } - numItems = total; //save this for later - if(total<1){ - emit updateDirectoryStatus( tr("No Directory Contents") ); - this->setEnabled(true); - } -} - -void BrowserWidget::selectionChanged(){ - emit hasFocus(ID); //let the parent know the widget is "active" with the user -} - -void BrowserWidget::resizeEvent(QResizeEvent *ev){ - QWidget::resizeEvent(ev); //do the normal processing first - //The list widget needs to be poked to rearrange the items to fit the new size - // tree widget does this fine at the moment. - if(listWidget!=0){ - listWidget->sortItems(Qt::AscendingOrder); - } -} diff --git a/src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.h b/src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.h deleted file mode 100644 index fafb3746..00000000 --- a/src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.h +++ /dev/null @@ -1,94 +0,0 @@ -// Lumina-DE source code -// Copyright (c) 2016, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This is the main browsing frontend for the file manager -//=========================================== -#ifndef _LUMINA_FM_BROWSE_FRONTEND_H -#define _LUMINA_FM_BROWSE_FRONTEND_H - -#include -#include -#include - -#include "Browser.h" -#include "widgets/DDListWidgets.h" - -class BrowserWidget : public QWidget{ - Q_OBJECT -private: - Browser *BROWSER; - //QThread *bThread; //browserThread - int numItems; //used for checking if all the items have loaded yet - QString ID, statustip; - QStringList date_format, historyList; - bool freshload; - - //The drag and drop brower widgets - DDListWidget *listWidget; - DDTreeWidget *treeWidget; - - QString DTtoString(QDateTime dt); //QDateTime to string simplification routine - -public: - BrowserWidget(QString objID, QWidget *parent = 0); - ~BrowserWidget(); - - QString id(){ return ID; } - - void changeDirectory(QString dir); - QString currentDirectory(){ return BROWSER->currentDirectory(); } - - void showDetails(bool show); - bool hasDetails(); - - void showHiddenFiles(bool show); - bool hasHiddenFiles(); - - void showThumbnails(bool show); - bool hasThumbnails(); - void setThumbnailSize(int px); - int thumbnailSize(); - - void setHistory(QStringList); - QStringList history(); - - void setShowActive(bool show); //used for accenting if the widget is "active" - - QString status(){ return statustip; } - - //Date format for show items - void readDateFormat(); - - //Return all the items which are currently selected - QStringList currentSelection(); - QStringList currentItems(int type = 0); //type: 0=all, -1=files, +1=dirs - -public slots: - void retranslate(); - -private slots: - //Browser connections - void clearItems(); - void itemRemoved(QString); - void itemDataAvailable(QIcon, LFileInfo*); - void itemsLoading(int total); - void selectionChanged(); - -protected: - void resizeEvent(QResizeEvent *ev); - -signals: - //External signals - void itemsActivated(); - void updateDirectoryStatus(QString); - void contextMenuRequested(); - void DataDropped(QString, QStringList); - void hasFocus(QString); //ID output - - //Internal signal - void dirChange(QString); //current dir path - -}; -#endif diff --git a/src-qt5/desktop-utils/lumina-fm-dev/DirData.h b/src-qt5/desktop-utils/lumina-fm-dev/DirData.h deleted file mode 100644 index 528a82d6..00000000 --- a/src-qt5/desktop-utils/lumina-fm-dev/DirData.h +++ /dev/null @@ -1,194 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This is the backend classes for fetching directory information/contents -//=========================================== -#ifndef _LUMINA_FM_BACKGROUND_DATA_CLASSES_H -#define _LUMINA_FM_BACKGROUND_DATA_CLASSES_H - -#include -#include -#include -#include -#include - -#include -#include - -#define ZSNAPDIR QString("/.zfs/snapshot/") - -#define DIR_DEBUG 0 - -//Class used for keeping track of directory information in the HASH -class LDirInfoList{ -public: - //Internal variables - QDateTime lastcheck; - QList list; - QStringList fileNames; //list of filenames for comparison/checking sorting - QString dirpath; //directory this structure was reading - QString snapdir; //base snapshot directory (if one was requested/found) - bool hashidden; - QStringList mntpoints; - - //Access Functions - LDirInfoList(QString path = ""){ - dirpath = path; - list.clear(); - fileNames.clear(); - hashidden = false; - //Generate the list of all mountpoints if possible - if(LUtils::isValidBinary("zfs")){ - mntpoints = LUtils::getCmdOutput("zfs list -H -o mountpoint").filter("/"); - mntpoints.removeDuplicates(); - } - } - ~LDirInfoList(){} - - //(re)Load a directory contents - void update(bool showhidden = false){ - if(dirpath.isEmpty()){ return; } //nothing to do - //Assemble the structures - QDir dir(dirpath); - hashidden = showhidden; - if(!dir.exists()){ - list.clear(); - fileNames.clear(); - dirpath.clear(); //invalid directory now - return; - } - if(dirpath.contains(ZSNAPDIR) && snapdir.isEmpty()){ - snapdir = dirpath.section(ZSNAPDIR,0,0)+ZSNAPDIR; //no need to go looking for it later - } - QFileInfoList dirlist; - //Fill the structure - list.clear(); - fileNames.clear(); - lastcheck = QDateTime::currentDateTime().addMSecs(-500); //prevent missing any simultaneous dir changes - if(showhidden){ dirlist = dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot | QDir::Hidden , QDir::Name | QDir::DirsFirst); } - else{ dirlist = dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot , QDir::Name | QDir::DirsFirst); } - //Simple add routine - can make it more dynamic/selective about updating individual items later - for(int i=0; imnt.length()){ mnt = mntpoints[i]; } - } - if(QFile::exists(mnt+ZSNAPDIR)){ snapdir = mnt+ZSNAPDIR; } - else{ snapdir.clear(); } //none found - } - } - -}; - -//This class is designed to be run in a background thread and get all the necessary info for a directory listing -class DirData : public QObject{ - Q_OBJECT -private: - QHash HASH; //Where we cache any info for rapid access later - -signals: - void DirDataAvailable(QString, QString, LFileInfoList); //[ID, Dirpath, DATA] - void SnapshotDataAvailable(QString, QString, QStringList); //[ID, BaseSnapDir, SnapNames] - -public: - //Variables - bool showHidden; //Whether hidden files/dirs should be output - bool zfsavailable; //Whether it should even bother looking for ZFS snapshots - bool pauseData; //When paused - this will ignore any requests for information (need to manually refresh browsers after unpause) - - //Functions - DirData(){ - showHidden = false; - zfsavailable = false; - pauseData = false; - } - ~DirData(){} - -public slots: - void GetDirData(QString ID, QString dirpath){ - return; - if(pauseData){ return; } - if(DIR_DEBUG){ qDebug() << "GetDirData:" << ID << dirpath; } - //The ID is used when returning the info in a moment - //Make sure to use the canonical path in the HASH search - don't use - QString canon = QFileInfo(dirpath).canonicalFilePath(); - if(!HASH.contains(canon)){ - //New directory (not previously loaded) - LDirInfoList info(canon); - info.update(showHidden); - HASH.insert(canon, info); - }else{ - //See if the saved info needs to be updated - //if( (HASH.value(canon).hashidden != showHidden) || (QFileInfo(canon).lastModified() > HASH.value(canon).lastcheck) ){ - HASH[canon].update(showHidden); - //} - } - if(DIR_DEBUG){ qDebug() << " -- Dir Data Found:" << ID << dirpath << HASH.value(canon).list.length(); } - emit DirDataAvailable(ID, dirpath, HASH.value(canon).list); - } - - void GetSnapshotData(QString ID, QString dirpath){ - if(pauseData){ return; } - if(DIR_DEBUG){ qDebug() << "GetSnapshotData:" << ID << dirpath; } - QString base; QStringList snaps; - //Only check if ZFS is flagged as available - if(zfsavailable){ - //First find if the hash already has an entry for this directory - if(!HASH.contains(dirpath)){ - LDirInfoList info(dirpath); - HASH.insert(dirpath,info); - } - //Now see if a snapshot directory has already been located - if(HASH.value(dirpath).snapdir.isEmpty()){ - HASH[dirpath].findSnapDir(); - } - //Now read off all the available snapshots - if(HASH.value(dirpath).snapdir != "-" && !HASH.value(dirpath).snapdir.isEmpty()){ - //Good snapshot directory found - read off the current snapshots (can change regularly - don't cache this) - base = HASH.value(dirpath).snapdir; - QDir dir(base); - QString canon = QFileInfo(dirpath).canonicalFilePath(); - QString dcanon = QString(dir.canonicalPath()+"/").section(ZSNAPDIR,0,0); - QString relpath = canon.section( dcanon+"/" ,-1); - //qDebug() << "Snapshot Dir:" << base << dcanon << "Dir:" << dirpath << canon << "Relpath:" << relpath; - snaps = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Time |QDir::Reversed ); - //Also remove any "empty" snapshots (might be leftover by tools like "zfsnap") - for(int i=0; i newest - } - - } - //if(DIR_DEBUG){ qDebug() << " -- Snap Data Found:" << ID << base << snaps; } - if(!base.isEmpty() && !snaps.isEmpty()){ - emit SnapshotDataAvailable(ID, base, snaps); - } - } - -}; - -#endif diff --git a/src-qt5/desktop-utils/lumina-fm-dev/FODialog.cpp b/src-qt5/desktop-utils/lumina-fm-dev/FODialog.cpp deleted file mode 100644 index 0d04b912..00000000 --- a/src-qt5/desktop-utils/lumina-fm-dev/FODialog.cpp +++ /dev/null @@ -1,387 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "FODialog.h" -#include "ui_FODialog.h" - -#include -#include - -#include - -#define DEBUG 0 - -FODialog::FODialog(QWidget *parent) : QDialog(parent), ui(new Ui::FODialog){ - ui->setupUi(this); //load the designer file - ui->label->setText(tr("Calculating")); - ui->progressBar->setVisible(false); - ui->push_stop->setIcon( LXDG::findIcon("edit-delete","") ); - WorkThread = new QThread(); - Worker = new FOWorker(); - connect(Worker, SIGNAL(startingItem(int,int,QString,QString)), this, SLOT(UpdateItem(int,int,QString,QString)) ); - connect(Worker, SIGNAL(finished(QStringList)), this, SLOT(WorkDone(QStringList)) ); - Worker->moveToThread(WorkThread); - WorkThread->start(); - - //Make sure this dialog is centered on the parent - if(parent!=0){ - QPoint ctr = parent->mapToGlobal(parent->geometry().center()); - this->move( ctr.x()-(this->width()/2), ctr.y()-(this->height()/2) ); - } - this->show(); -} - -FODialog::~FODialog(){ - Worker->stopped = true; //just in case it might still be running when closed - WorkThread->quit(); - WorkThread->wait(); - delete Worker; - //delete WorkThread; -} - -void FODialog::setOverwrite(bool ovw){ - if(ovw){ Worker->overwrite = 1; } - else{ Worker->overwrite = 0; } -} - -//Public "start" functions -bool FODialog::RemoveFiles(QStringList paths){ - Worker->ofiles = paths; - Worker->isRM = true; - if(CheckOverwrite()){ - QTimer::singleShot(10,Worker, SLOT(slotStartOperations())); - return true; - }else{ - this->close(); - return false; - } -} - -bool FODialog::CopyFiles(QStringList oldPaths, QStringList newPaths){ - //same permissions as old files - if(oldPaths.length() == newPaths.length()){ - Worker->ofiles = oldPaths; - Worker->nfiles = newPaths; - } - Worker->isCP=true; - if(CheckOverwrite()){ - QTimer::singleShot(10,Worker, SLOT(slotStartOperations())); - return true; - }else{ - this->close(); - return false; - } -} - -bool FODialog::RestoreFiles(QStringList oldPaths, QStringList newPaths){ - //user/group rw permissions - if(oldPaths.length() == newPaths.length()){ - Worker->ofiles = oldPaths; - Worker->nfiles = newPaths; - } - Worker->isRESTORE = true; - if(CheckOverwrite()){ - QTimer::singleShot(10,Worker, SLOT(slotStartOperations())); - return true; - }else{ - this->close(); - return false; - } -} - -bool FODialog::MoveFiles(QStringList oldPaths, QStringList newPaths){ - //no change in permissions - if(oldPaths.length() == newPaths.length()){ - Worker->ofiles = oldPaths; - Worker->nfiles = newPaths; - } - Worker->isMV=true; - if(CheckOverwrite()){ - QTimer::singleShot(10,Worker, SLOT(slotStartOperations())); - return true; - }else{ - this->close(); - return false; - } -} - -bool FODialog::CheckOverwrite(){ - bool ok = true; - //Quick check that a file is not supposed to be moved/copied/restored onto itself - if(!Worker->isRM){ - for(int i=0; infiles.length(); i++){ - if(Worker->nfiles[i] == Worker->ofiles[i]){ - //duplicate - remove it from the queue - Worker->nfiles.removeAt(i); Worker->ofiles.removeAt(i); - i--; - } - } - } - if(!Worker->isRM && Worker->overwrite==-1){ - //Check if the new files already exist, and prompt for action - QStringList existing; - for(int i=0; infiles.length(); i++){ - if(QFile::exists(Worker->nfiles[i])){ existing << Worker->nfiles[i].section("/",-1); } - } - if(!existing.isEmpty()){ - //Prompt for whether to overwrite, not overwrite, or cancel - QMessageBox dialog(QMessageBox::Question, tr("Overwrite Files?"), tr("Do you want to overwrite the existing files?")+"\n"+tr("Note: It will just add a number to the filename otherwise.")+"\n\n"+existing.join(", "), QMessageBox::YesToAll | QMessageBox::NoToAll | QMessageBox::Cancel, this); - - dialog.setButtonText(QMessageBox::YesToAll, tr("YesToAll")); - dialog.setButtonText(QMessageBox::NoToAll, tr("NoToAll")); - dialog.setButtonText(QMessageBox::Cancel, tr("Cancel")); - dialog.setDefaultButton(QMessageBox::NoToAll); - const int ans = dialog.exec(); - if(ans==QMessageBox::NoToAll){ Worker->overwrite = 0; } //don't overwrite - else if(ans==QMessageBox::YesToAll){ Worker->overwrite = 1; } //overwrite - else{ qDebug() << " - Cancelled"; Worker->overwrite = -1; ok = false; } //cancel operations - if(DEBUG){ qDebug() << " - Overwrite:" << Worker->overwrite; } - } - } - QApplication::processEvents(); - QApplication::processEvents(); - return ok; -} - -void FODialog::UpdateItem(int cur, int tot, QString oitem, QString nitem){ - ui->progressBar->setRange(0,tot); - ui->progressBar->setValue(cur); - ui->progressBar->setVisible(true); - QString msg; - if(Worker->isRM){ msg = tr("Removing: %1"); } - else if(Worker->isCP){ msg = tr("Copying: %1 to %2"); } - else if(Worker->isRESTORE){ msg = tr("Restoring: %1 as %2"); } - else if(Worker->isMV){ msg = tr("Moving: %1 to %2"); } - if(msg.contains("%2")){ - msg = msg.arg(oitem.section("/",-1), nitem.section("/",-1)); - }else{ - msg = msg.arg(oitem.section("/",-1)); - } - msg = ui->label->fontMetrics().elidedText(msg, Qt::ElideRight, ui->label->width()); - ui->label->setText( msg ); -} - -void FODialog::WorkDone(QStringList errlist){ - if(!errlist.isEmpty()){ - QString msg; - if(Worker->isRM){ msg = tr("Could not remove these files:"); } - else if(Worker->isCP){ msg = tr("Could not copy these files:"); } - else if(Worker->isRESTORE){ msg = tr("Could not restore these files:"); } - else if(Worker->isMV){ msg = tr("Could not move these files:"); } - ScrollDialog dlg(this); - dlg.setWindowTitle(tr("File Errors")); - dlg.setText( msg+"\n\n"+errlist.join("\n") ); - dlg.exec(); - } - noerrors = errlist.isEmpty(); - this->close(); -} - -void FODialog::on_push_stop_clicked(){ - Worker->stopped = true; -} - -// =================== -// ==== FOWorker Class ==== -// =================== -QStringList FOWorker::subfiles(QString dirpath, bool dirsfirst){ - //NOTE: dirpath (input) is always the first/last item in the output as well! - QStringList out; - if(dirsfirst){ out << dirpath; } - if( QFileInfo(dirpath).isDir() ){ - QDir dir(dirpath); - if(dirsfirst){ - //Now recursively add any subdirectories and their contents - QStringList subdirs = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden, QDir::NoSort); - for(int i=0; i