aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-03-12 20:50:43 -0400
committerKen Moore <ken@pcbsd.org>2015-03-12 20:50:43 -0400
commit0864314ca2083ad584323997e1eabc570125d2a1 (patch)
treeaf2c529549b5ee78ea49946ff5add5c4eb962d18 /lumina-fm
parentChange the icon used for the "favorite files" button. Now it matches the User... (diff)
downloadlumina-0864314ca2083ad584323997e1eabc570125d2a1.tar.gz
lumina-0864314ca2083ad584323997e1eabc570125d2a1.tar.bz2
lumina-0864314ca2083ad584323997e1eabc570125d2a1.zip
Add Checksum support for FreeBSD, and tie it into lumina-fm.
Diffstat (limited to 'lumina-fm')
-rw-r--r--lumina-fm/BackgroundWorker.cpp2
-rw-r--r--lumina-fm/MainUI.cpp22
-rw-r--r--lumina-fm/MainUI.h2
3 files changed, 22 insertions, 4 deletions
diff --git a/lumina-fm/BackgroundWorker.cpp b/lumina-fm/BackgroundWorker.cpp
index cdb0644d..1438f71e 100644
--- a/lumina-fm/BackgroundWorker.cpp
+++ b/lumina-fm/BackgroundWorker.cpp
@@ -83,6 +83,6 @@ void BackgroundWorker::startDirChecks(QString path){
snapDirs[i] = dir.absolutePath()+"/"+snapDirs[i].section("::::",1,50)+"/"+reldir;
}
if(!snapDirs.isEmpty()){ emit SnapshotsAvailable(baseSnapDir, snapDirs); }
- qDebug() << "Found snapshots:" << snapDirs;
+ qDebug() << "Found snapshots";
}
} \ No newline at end of file
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp
index c9b651fa..df5c898a 100644
--- a/lumina-fm/MainUI.cpp
+++ b/lumina-fm/MainUI.cpp
@@ -938,6 +938,7 @@ void MainUI::OpenContextMenu(const QPoint &pt){
contextMenu->addAction(LXDG::findIcon("run-build-configure",""), tr("Open With..."), this, SLOT(OpenItemWith()) );
}
contextMenu->addAction(LXDG::findIcon("edit-rename",""), tr("Rename"), this, SLOT(RenameItem()) )->setEnabled(info.isWritable());
+ contextMenu->addAction(LXDG::findIcon("document-encrypted",""), tr("View Checksums"), this, SLOT(ChecksumItems()) );
contextMenu->addSeparator();
}
bool hasSelection = !getSelectedItems().isEmpty();
@@ -1463,8 +1464,25 @@ void MainUI::PasteItems(){
QApplication::clipboard()->setMimeData(dat);
}
}
- ItemSelectionChanged();
-
+ ItemSelectionChanged();
+}
+
+void MainUI::ChecksumItems(){
+ if(ui->stackedWidget->currentWidget()!=ui->page_browser){ return; }
+ QFileInfoList sel = getSelectedItems();
+ if(sel.isEmpty()){ return; }
+ QStringList info, files;
+ for(int i=0; i<sel.length(); i++){
+ files << sel[i].absoluteFilePath();
+ }
+ qDebug() << "Run Checksums:" << files;
+ info = LOS::Checksums(files);
+ qDebug() << " - Info:" << info;
+ if(info.isEmpty() || (info.length() != files.length()) ){ return; }
+ for(int i=0; i<info.length(); i++){
+ info[i] = QString("%2\t(%1)").arg(files[i].section("/",-1), info[i]);
+ }
+ QMessageBox::information(this, tr("File Checksums"), info.join("\n") );
}
void MainUI::resizeEvent(QResizeEvent *event){
diff --git a/lumina-fm/MainUI.h b/lumina-fm/MainUI.h
index 40ef25ff..97cadf86 100644
--- a/lumina-fm/MainUI.h
+++ b/lumina-fm/MainUI.h
@@ -89,7 +89,6 @@ private:
//Phonon Widgets for the multimedia player
QMediaPlayer *mediaObj;
QVideoWidget *videoDisplay;
- //Phonon::AudioOutput *audioOut;
QSlider *playerSlider;
QString playerTTime; //total time - to prevent recalculation every tick
@@ -219,6 +218,7 @@ private slots:
void CutItems();
void CopyItems();
void PasteItems();
+ void ChecksumItems();
signals:
void DirChanged(QString path);
bgstack15