Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
6a381c05c8 | |||
106727506d | |||
e10558ff5b | |||
f40e4f9485 | |||
d82c8c942d |
@ -22,6 +22,7 @@ Un clic gauche sur un fichier l'ajoute à la file des téléchargements, sur un
|
||||
Un clic droit sur un dossier ouvre un menu contextuel permettant de télécharger le dossier entier.
|
||||
Une notification s'affiche lors du début, de la fin, et lorsque l'on stoppe un téléchargement.
|
||||
Le gadget de fermeture ferme la fenêtre mais ne quitte pas l'application, pour afficher à nouveau la fenêtre, cliquez sur l'icône dans la boite à miniatures.
|
||||
Un identifiant et un mot de passe lorsqu'un service est protégé par mot de passe, celui-ci est enregistré dans le portefeuille système(gome-keyring ou kwallet)
|
||||
|
||||
## File de téléchargement
|
||||
|
||||
@ -30,7 +31,7 @@ Cliquez sur un fichier pour le supprimer de la file et une fenêtre de confirmat
|
||||
## Barre d'outils
|
||||
|
||||
1er icône: Changer le dossier de destination
|
||||
Permet de changer le dossier de téléchargement par défaut pour chaque service de chaque serveur.
|
||||
- Permet de changer le dossier de téléchargement par défaut pour chaque service de chaque serveur.
|
||||
|
||||
2ème icône: Paramètres de l'application
|
||||
- Limite de bande passante
|
||||
@ -41,7 +42,7 @@ Cliquez sur un fichier pour le supprimer de la file et une fenêtre de confirmat
|
||||
- Enregistrement automatique
|
||||
Enregistre automatiquement la liste des téléchargements en cours.(activé par défaut)
|
||||
3ème icône: À propos
|
||||
Affiche les propriétés de l'application.
|
||||
- Affiche les propriétés de l'application.
|
||||
4ème icône: À propos de QT
|
||||
5 ème icône: Quitter
|
||||
5ème icône: Quitter
|
||||
Permet de quitter le programme.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.14.2, 2023-03-09T18:12:22. -->
|
||||
<!-- Written by QtCreator 4.14.2, 2023-03-09T22:37:54. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Name: rsyncui
|
||||
Summary: Client for rsync server
|
||||
Version: 2.10
|
||||
Version: 2.10.1
|
||||
Release: %mkrel 1
|
||||
License: GPLv3
|
||||
Group: Networking/Remote access
|
||||
|
@ -288,7 +288,10 @@ void MainWindow::populateTree()
|
||||
{
|
||||
// server is validated, scanning directory
|
||||
path = this->connexion.service + "/";
|
||||
scanDir(this->connexion.server, this->connexion.port, nullptr, path);
|
||||
while (this->rescan)
|
||||
{
|
||||
scanDir(this->connexion.server, this->connexion.port, nullptr, path);
|
||||
}
|
||||
}
|
||||
// Restoring cursor
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
@ -352,16 +355,19 @@ void MainWindow::populateList(int item)
|
||||
this->settings.endGroup();
|
||||
this->settings.beginGroup("Hidden/" + server);
|
||||
hidden = this->settings.allKeys();
|
||||
this->settings.endGroup();
|
||||
for (i = 0; i < hidden.size(); i++)
|
||||
if (hidden.count() > 0)
|
||||
{
|
||||
service = hidden.at(i);
|
||||
//TODO detect if service is already present
|
||||
if (testServicePresence(service, false))
|
||||
for (i = 0; i < hidden.size(); i++)
|
||||
{
|
||||
ui->listWidget->addItem(service + "\n\t");
|
||||
service = hidden[i];
|
||||
//TODO detect if service is already present
|
||||
if (testServicePresence(service, false))
|
||||
{
|
||||
ui->listWidget->addItem(service + "\n\t");
|
||||
}
|
||||
}
|
||||
}
|
||||
this->settings.endGroup();
|
||||
QGuiApplication::restoreOverrideCursor(); //setting cursor to default
|
||||
}
|
||||
}
|
||||
@ -559,10 +565,11 @@ bool MainWindow::scanDir(QString server, int portN, QTreeWidgetItem *parent, QSt
|
||||
addTreeItem(filename, size, fullsize, fileType, date, isDir, parent);
|
||||
if (passwdOk == false and !this->connexion.password.isEmpty())
|
||||
{
|
||||
this->settings.setValue("Passwords/" + this->connexion.server + "/" + this->connexion.service + "/", this->connexion.user);
|
||||
this->settings.setValue("Passwords/" + this->connexion.server + "/" + this->connexion.service + "/" + this->connexion.user, true);
|
||||
setPassword(this->connexion.user, this->connexion.password);
|
||||
this->settings.sync();
|
||||
}
|
||||
this->rescan = false;
|
||||
}
|
||||
}
|
||||
flag = false;
|
||||
@ -740,7 +747,7 @@ void MainWindow::preparePopulateTree()
|
||||
this->downloading.savePath = this->settings.value(str).toString();
|
||||
}
|
||||
|
||||
getUserPassword(&this->connexion);
|
||||
//getUserPassword(&this->connexion);
|
||||
|
||||
populateTree();
|
||||
}
|
||||
@ -755,6 +762,7 @@ bool MainWindow::getUserPassword(Connexion * object)
|
||||
QString password;
|
||||
QString server;
|
||||
QString service;
|
||||
int c;
|
||||
|
||||
bool returnValue = false;
|
||||
bool ok = false;
|
||||
@ -767,7 +775,8 @@ bool MainWindow::getUserPassword(Connexion * object)
|
||||
|
||||
this->settings.beginGroup("Passwords/" + server + "/" + service);
|
||||
logins = this->settings.allKeys();
|
||||
if (logins.count() != 1)
|
||||
c = logins.count();
|
||||
if ( c != 1)
|
||||
{
|
||||
//choose login in case of multiples logins
|
||||
login = QInputDialog::getItem(this,
|
||||
@ -813,7 +822,6 @@ bool MainWindow::getUserPassword(Connexion * object)
|
||||
//Slot activated when a file is clicked in the treeview
|
||||
void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadDir)
|
||||
{
|
||||
QFuture<void> future;
|
||||
QFileDialog dialog;
|
||||
QTreeWidgetItem * itemR;
|
||||
QString path;
|
||||
@ -923,9 +931,13 @@ void MainWindow::on_treeWidget_itemClicked(QTreeWidgetItem *item, bool downloadD
|
||||
}else
|
||||
{
|
||||
//Item is a Directory
|
||||
scanDir(this->connexion.server, this->connexion.port, item, this->connexion.service + "/" + path +"/");
|
||||
item->setExpanded(true);
|
||||
while (this->rescan)
|
||||
{
|
||||
scanDir(this->connexion.server, this->connexion.port, item, this->connexion.service + "/" + path +"/");
|
||||
item->setExpanded(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (config.autosaveCheckbox->checkState() == Qt::Checked)
|
||||
{
|
||||
saveDownloadList();
|
||||
@ -970,7 +982,7 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
tr("Rsync process crashed"));
|
||||
}
|
||||
//test result code of command (if 20 then command stopped by user)
|
||||
if (exitCode != 0)
|
||||
if (exitCode != 0 and this->stopDlAsked != true)
|
||||
{
|
||||
if (exitCode == 20)
|
||||
{
|
||||
@ -993,7 +1005,7 @@ void MainWindow::downloadFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
retry = true;
|
||||
}
|
||||
}
|
||||
|
||||
this->stopDlAsked = false;
|
||||
this->trayIcon->showMessage(a.applicationName(), tr("Download ") + aborted + "\n" + this->downloading.path, QSystemTrayIcon::Information);
|
||||
|
||||
// disconnecting signals to slots
|
||||
@ -1067,6 +1079,7 @@ void MainWindow::on_listDownload_itemClicked(QListWidgetItem *item)
|
||||
if (reply == QMessageBox::Yes)
|
||||
{
|
||||
// stopping download
|
||||
this->stopDlAsked = true;
|
||||
emit (stopDownloading(this->downloading.process));
|
||||
}
|
||||
}else
|
||||
@ -1083,7 +1096,6 @@ void MainWindow::on_listDownload_itemClicked(QListWidgetItem *item)
|
||||
// removing line from download list
|
||||
ui->listDownload->removeItemWidget(item);
|
||||
delete item;
|
||||
|
||||
}
|
||||
}
|
||||
if (config.autosaveCheckbox->checkState() == Qt::Checked)
|
||||
@ -1336,7 +1348,8 @@ void MainWindow::on_actionHiddenService_triggered()
|
||||
if (ok && !text.isEmpty())
|
||||
{
|
||||
this->connexion.service = text;
|
||||
this->settings.setValue("Hidden/" + this->connexion.server + "/" + text, true);
|
||||
this->settings.setValue("Hidden/" + this->connexion.server + '/' + text, true);
|
||||
ui->listWidget->addItem(text + "\n\t");
|
||||
preparePopulateTree();
|
||||
}
|
||||
}
|
||||
|
@ -25,8 +25,6 @@
|
||||
#include <cstdio>
|
||||
#include <QMessageBox>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <QFuture>
|
||||
#include <qtconcurrentrun.h>
|
||||
#include <QFileDialog>
|
||||
#include <QThread>
|
||||
#include <QProgressDialog>
|
||||
@ -90,7 +88,7 @@ class Downloading
|
||||
class About
|
||||
{
|
||||
public:
|
||||
QString version = "2.10";
|
||||
QString version = "2.10.1";
|
||||
QString author = "Daniel TARTAVEL-JEANNOT";
|
||||
QString licence = "GPL_V3";
|
||||
QString description;
|
||||
@ -120,6 +118,7 @@ class MainWindow : public QMainWindow
|
||||
QSystemTrayIcon * trayIcon;
|
||||
QString icon = "/usr/share/icons/RsyncUI.png";
|
||||
bool rescan = false;
|
||||
bool stopDlAsked;
|
||||
|
||||
QList<QString> UnitText {
|
||||
tr("B"),
|
||||
|
@ -44,7 +44,7 @@ QString getPassword(const QString& name)
|
||||
|
||||
if(readPass.error())
|
||||
{
|
||||
qDebug()<<"KeyHandler~Error reading decrypt Pass. Error: " + readPass.errorString();
|
||||
cout << "KeyHandler~Error reading decrypt Pass. Error: " + readPass.errorString() . toStdString() << endl;
|
||||
return "";
|
||||
}
|
||||
else
|
||||
|
@ -48,7 +48,7 @@ const vector<string> explode(const string& s, const char& c, int n = 0)
|
||||
// return true in case of error
|
||||
bool testRsyncReturn(MainWindow * w, QProcess * myProcess)
|
||||
{
|
||||
if (myProcess->exitStatus() != 0)
|
||||
if (myProcess->exitStatus() != 0 and w->stopDlAsked != true)
|
||||
{
|
||||
QMessageBox::warning(
|
||||
w,
|
||||
@ -58,6 +58,7 @@ bool testRsyncReturn(MainWindow * w, QProcess * myProcess)
|
||||
QMessageBox::Ok);
|
||||
return true;
|
||||
}
|
||||
w->stopDlAsked = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user