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/BrowserWidget.cpp3
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp14
2 files changed, 10 insertions, 7 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp
index 1112f971..55347ca5 100644
--- a/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp
@@ -44,7 +44,8 @@ void BrowserWidget::changeDirectory(QString dir){
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.replace( QRegExp("/\\.zfs/snapshot/(.)+/"), "/" );
+ QString cleaned = dir;
+ cleaned = cleaned.replace( QRegExp("/\\.zfs/snapshot/(.)+/"), "/" );
if( (historyList.isEmpty() || historyList.last()!=cleaned) && !cleaned.isEmpty() ){ historyList << cleaned; }
}
qDebug() << "History:" << historyList;
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
index f1037896..b45200e9 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
@@ -23,7 +23,7 @@
#include "../ScrollDialog.h"
-#define DEBUG 1
+#define DEBUG 0
DirWidget::DirWidget(QString objID, QWidget *parent) : QWidget(parent), ui(new Ui::DirWidget){
ui->setupUi(this); //load the designer file
@@ -87,7 +87,7 @@ void DirWidget::cleanup(){
void DirWidget::ChangeDir(QString dirpath){
//stopload = true; //just in case it is still loading
//emit LoadDirectory(ID, dirpath);
- qDebug() << "ChangeDir:" << dirpath;
+ //qDebug() << "ChangeDir:" << dirpath;
currentBrowser()->changeDirectory(dirpath);
}
@@ -126,7 +126,7 @@ void DirWidget::setThumbnailSize(int px){
void DirWidget::LoadSnaps(QString basedir, QStringList snaps){
//Save these value internally for use later
- qDebug() << "ZFS Snapshots available:" << basedir << snaps;
+ //qDebug() << "ZFS Snapshots available:" << basedir << snaps;
snapbasedir = basedir;
snapshots = snaps;
//if(!snapbasedir.isEmpty()){ watcher->addPath(snapbasedir); } //add this to the watcher in case snapshots get created/removed
@@ -387,7 +387,7 @@ void DirWidget::dir_changed(){
QString dir = line_dir->text().simplified();
//Run the dir through the user-input checks
dir = LUtils::PathToAbsolute(dir);
- //qDebug() << "Dir:" << dir;
+ //qDebug() << "Dir Changed:" << dir;
//Quick check to ensure the directory exists
while(!QFile::exists(dir) && !dir.isEmpty()){
dir = dir.section("/",0,-2); //back up one additional dir
@@ -477,7 +477,7 @@ void DirWidget::OpenContextMenu(){
void DirWidget::UpdateContextMenu(){
//First generate the context menu based on the selection
- qDebug() << "Update context menu";
+ //qDebug() << "Update context menu";
QStringList sel = currentBrowser()->currentSelection();
contextMenu->clear();
@@ -506,13 +506,15 @@ void DirWidget::currentDirectoryChanged(bool widgetonly){
if(widgetonly){ ui->label_status->setText(currentBrowser()->status()); }
else{ ui->label_status->setText(tr("Loading...")); }
//qDebug() << "Start search for snapshots";
- if(!cur.contains("/.zfs/snapshot")){
+ if(!cur.contains("/.zfs/snapshot") ){
normalbasedir = cur;
ui->group_snaps->setVisible(false);
emit findSnaps(ID, cur);
+ qDebug() << "Changed to directory:" << cur;
}else{
//Re-assemble the normalbasedir variable (in case moving around within a snapshot)
normalbasedir = cur.replace( QRegExp("/\\.zfs/snapshot/(.)+/"), "/" );
+ qDebug() << "Changed to snapshot:" << cur << normalbasedir;
}
ui->actionBack->setEnabled( currentBrowser()->history().length()>1 );
line_dir->setText(normalbasedir);
bgstack15