aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-08-17 18:48:13 +0000
committerWeblate <noreply@weblate.org>2017-08-17 18:48:13 +0000
commit0e90665da788209184b031cf7f183ca917fae92c (patch)
treec276b16fb7f189200a26716ea8cc5f0cdcf45677 /src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
parentTranslated using Weblate (Catalan) (diff)
parentSmall changes to lumina-open: (diff)
downloadlumina-0e90665da788209184b031cf7f183ca917fae92c.tar.gz
lumina-0e90665da788209184b031cf7f183ca917fae92c.tar.bz2
lumina-0e90665da788209184b031cf7f183ca917fae92c.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/desktop-utils/lumina-archiver/MainUI.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/MainUI.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
index 2dae90a4..afead9af 100644
--- a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
@@ -196,8 +196,8 @@ QString MainUI::OpenFileTypes(){
void MainUI::NewArchive(){
QString file = QFileDialog::getSaveFileName(this, tr("Create Archive"), QDir::homePath(), CreateFileTypes() );
if(file.isEmpty()){ return; }
- if(QFile::exists(file)){
- if( !QFile::remove(file) ){ QMessageBox::warning(this, tr("Error"), QString(tr("Could not overwrite file:"))+"\n"+file); }
+ if(QFile::exists(file)){
+ if( !QFile::remove(file) ){ QMessageBox::warning(this, tr("Error"), QString(tr("Could not overwrite file:"))+"\n"+file); }
}
ui->label_progress->setText(""); //just clear it (this action is instant)
BACKEND->loadFile(file);
@@ -267,6 +267,12 @@ void MainUI::extractSelection(){
void MainUI::ViewFile(QTreeWidgetItem *it){
if(it->childCount()>0){ return; } //directory - not viewable
+ /*QString newfile = QDir::tempPath()+"/"+it->whatsThis(0).section("/",-1);
+ if(QFile::exists(newfile)){
+ if(QMessageBox::Yes != QMessageBox::question(this, tr("File exists"), tr("A temporary file with the same name already exists, do you want to overwrite it?")+"\n\n"+newfile, QMessageBox::Yes | QMessageBox::No, QMessageBox::No) ){
+ return; //cancelled
+ }
+ }*/
ui->label_progress->setText(tr("Extracting..."));
BACKEND->startViewFile(it->whatsThis(0));
}
bgstack15