Compare commits

...

4 Commits
2.0 ... 2.1.1

Author SHA1 Message Date
4ead825bad version 2.1.1 2023-02-11 13:42:46 +01:00
f73174216a -corrected bug
- added  warning when selecting a file which is already in download
  queue
2023-02-11 13:40:46 +01:00
0b60543ff3 version 2.1 2023-02-11 01:15:41 +01:00
d52a0663e5 - added verification of already downloaded files 2023-02-11 01:14:14 +01:00
6 changed files with 95 additions and 59 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.14.2, 2023-02-10T23:24:32. -->
<!-- Written by QtCreator 4.14.2, 2023-02-11T01:13:28. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

@ -2,7 +2,7 @@
Name: rsyncui
Summary: Client for rsync server
Version: 2.0
Version: 2.1.1
Release: %mkrel 1
License: GPLv3
Group: Networking/Remote access

View File

@ -168,27 +168,27 @@
<translation>Paramètres</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="86"/>
<location filename="mainwindow.cpp" line="90"/>
<source>KB</source>
<translation>Ko</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="86"/>
<location filename="mainwindow.cpp" line="90"/>
<source>MB</source>
<translation>Mo</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="86"/>
<location filename="mainwindow.cpp" line="90"/>
<source>GB</source>
<translation>Go</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="86"/>
<location filename="mainwindow.cpp" line="90"/>
<source>TB</source>
<translation>To</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="86"/>
<location filename="mainwindow.cpp" line="90"/>
<source>PB</source>
<translation>Po</translation>
</message>
@ -217,95 +217,98 @@ Cliquez sur un fichier pour l&apos;ajouter dans la file de téléchargement</tra
<translation>Type</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="92"/>
<location filename="mainwindow.cpp" line="97"/>
<source>A list of interrupted downloads exists, do you want to continue downloading ? if not the list will be cleared</source>
<translation>Une liste de téléchargement existe, voulez-vous utiliser cette liste ? si non, elle sera effacée</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="393"/>
<location filename="mainwindow.cpp" line="138"/>
<source>Clicking Save button, You can save the list of downloads
</source>
<translation>Vous pouvez enregistrer la liste des téléchargements en cliquant sur &quot;enregister&quot;
</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="143"/>
<source>Exiting will stop downloading, and will clear the download queue.
Do you want to exit ?</source>
<translation>Si vous sortez, les téléchargements seront arrêter.
Voulez-vous vraiment sortir ?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="425"/>
<source>server does not exists</source>
<translation>Le serveur n&apos;existe pas</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="421"/>
<location filename="mainwindow.cpp" line="441"/>
<location filename="mainwindow.cpp" line="452"/>
<location filename="mainwindow.cpp" line="472"/>
<source>Dir</source>
<translation>dossier</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="424"/>
<location filename="mainwindow.cpp" line="487"/>
<location filename="mainwindow.cpp" line="456"/>
<location filename="mainwindow.cpp" line="540"/>
<source>File</source>
<translation>Doc</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="561"/>
<location filename="mainwindow.cpp" line="549"/>
<source>File is already downloaded. Do you want to reload it ? The old file will be deleted</source>
<translation>Le document est déjà téléchargé. Voulez-vous le télécharger à nouveau ? L&apos;ancien fichier sera effacé</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="584"/>
<source>File is already downloading</source>
<translation>Le document est déjà en téléchargement</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="628"/>
<source>Rsync process crashed</source>
<translation>Le processus rsync à planté</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="699"/>
<location filename="mainwindow.cpp" line="784"/>
<source>Version</source>
<translation>Version</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="700"/>
<location filename="mainwindow.cpp" line="785"/>
<source>Licence</source>
<translation>License</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="701"/>
<location filename="mainwindow.cpp" line="786"/>
<source>Author</source>
<translation>Auteur</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="702"/>
<location filename="mainwindow.cpp" line="787"/>
<source>EMail</source>
<translation>Courriel</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="703"/>
<location filename="mainwindow.cpp" line="788"/>
<source>Source code</source>
<translation>Code source</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="725"/>
<location filename="mainwindow.cpp" line="811"/>
<source>Since the save path is linked to service, you need to select a service before you can select a folder</source>
<translation>Vous devez sélectionnez un service pour pouvoir sélectionnez un dossier par défaut</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="728"/>
<location filename="mainwindow.cpp" line="816"/>
<source>Choose folder where to save file</source>
<translation>Choisissez un dossier enregistrer le document</translation>
</message>
<message>
<source>Choose directory to save file</source>
<translation type="vanished">Choisissez le dossier enregistrer</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="620"/>
<location filename="mainwindow.cpp" line="702"/>
<source>Do you want to stop downloading and delete this file from download queue ?</source>
<translation>Voulez-vous arrêter le téléchargement et enlever ce fichier de la file de téléchargement ?</translation>
</message>
<message>
<source>A list of interrupted downloads exists, do you want to continue downloading ? or you can delete the list</source>
<translation type="vanished">Voulez-vous reprendre les téléchargements interrompus la fois précédente? ou vous pouvez supprimer la liste</translation>
</message>
<message>
<source>Remove</source>
<translation type="vanished">Supprimer</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="135"/>
<source>Exiting will stop downloading, and will clear the download queue.
You can save the list of downloads
Do you want to exit ?</source>
<translatorcomment>i</translatorcomment>
<translation>Si vous sortez, les téléchargements seront arrêter, mais vous pouvez enregistrer la liste pour la prochaine fois.
Voulez-vous vraiment sortir ?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="632"/>
<location filename="mainwindow.cpp" line="716"/>
<source>Do you want to delete this file from download queue ?</source>
<translation>Voulez-vous enlever ce fichier de la file de téléchargement ?</translation>
</message>

Binary file not shown.

View File

@ -507,11 +507,29 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD
QTreeWidgetItem * itemR;
QString path;
QString str;
QMessageBox::StandardButton reply;
itemR = item;
// assembling path from treewidget
path = item->text(0);
// exists saving path in settings ?
str = "Folder/" + this->connexion.server + "/" + this->connexion.service;
if(!this->settings.contains(str))
{
// saving path do not exists, asking for it
if(!on_DefaultSaveFolder_triggered())
{
cout << "no directory selectioned, ignoring download request";
return;
}
}else
{
this->downloading.savePath = this->settings.value(str).toString();
}
while(itemR->parent() != NULL)
{
itemR = itemR->parent();
@ -522,20 +540,27 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD
if (item->text(1) == tr("File") or downloadDir == true)
{
// Item is a file
// searching if file exists in savepath
if (QFile::exists(this->downloading.savePath + "/" + path))
{
reply = QMessageBox::question(
this,
"RsyncUI",
tr("File is already downloaded. Do you want to reload it ? The old file will be deleted"),
QMessageBox::Yes|QMessageBox::No,
QMessageBox::No);
if (reply == QMessageBox::No)
{
return;
}else
{
QFile::remove(this->downloading.savePath + "/" + path);
}
}
if(ui->listDownload->findItems(path, Qt::MatchStartsWith).empty())
{
// exists saving path in settings ?
str = "Folder/" + this->connexion.server + "/" + this->downloading.service;
if(!this->settings.contains(str))
{
// saving path do not exists, asking for it
if(!on_DefaultSaveFolder_triggered())
{
cout << "no directory selectioned, ignoring download request";
return;
}
}
// is there a downloading process ?
if (this->downloading.process == nullptr)
{
@ -551,6 +576,13 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD
// Adding download in download list
str = path + " => " + this->connexion.server + "/" + this->connexion.service;
ui->listDownload->addItem(str);
}else
{
QMessageBox::warning(
this,
"RsyncUI",
tr("File is already downloading" )
);
}
}else
{
@ -609,7 +641,7 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
disconnect(this->downloading.process, 0, 0, 0);
// reset variables and window
this->downloading.process= nullptr;
this->downloading.process = nullptr;
ui->progressBar->hide();
delete ui->listDownload->takeItem(0);
this->downloading.clear();
@ -634,7 +666,7 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
path.resize(pos);
this->downloading.path = path;
// save path exists in settings ?
// savepath exists in settings ?
str = "Folder/" + this->downloading.server + "/" + this->downloading.service;
if (this->settings.contains(str))
{
@ -652,6 +684,7 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
}
}
}
saveDownloadList();
}

View File

@ -73,7 +73,7 @@ class About
{
public:
QString title = "RsyncUI";
QString version = "2.0";
QString version = "2.1.1";
QString author = "Daniel TARTAVEL-JEANNOT";
QString licence = "GPL_V3";
QString description;