diff --git a/RsyncUI.pro b/RsyncUI.pro index 0b5fc16..4d0a7db 100644 --- a/RsyncUI.pro +++ b/RsyncUI.pro @@ -31,7 +31,7 @@ FORMS += \ mainwindow.ui TRANSLATIONS += \ - languages/fr/RsyncUI_fr_FR.ts + languages/fr_FR/RsyncUI_fr_FR.ts INCLUDEPATH += \ /usr/include/KF5 @@ -41,6 +41,6 @@ qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /usr/bin/ !isEmpty(target.path): INSTALLS += target -lang.path = /languages -lang.files = languages/* +lang.path = /languages/fr_FR/ +lang.files = languages/fr_FR/* INSTALLS += lang diff --git a/configuration.ui b/configuration.ui index a91fcbe..fd5de72 100644 --- a/configuration.ui +++ b/configuration.ui @@ -10,7 +10,7 @@ 0 0 400 - 300 + 127 @@ -22,12 +22,18 @@ 9 9 381 - 251 + 61 + + Enter the bandwidth limit + + + 5000 + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -52,7 +58,10 @@ - + Select th unit of bandwidth limit in Bytes, KiloBytes, MegaBytes, GigaBytes or PetaBytes + + + 5000 -1 @@ -71,7 +80,7 @@ 70 - 260 + 80 321 34 diff --git a/languages/fr/RsyncUI_fr_FR.qm b/languages/fr_FR/RsyncUI_fr_FR.qm similarity index 55% rename from languages/fr/RsyncUI_fr_FR.qm rename to languages/fr_FR/RsyncUI_fr_FR.qm index 68138d6..bb5f1ac 100644 Binary files a/languages/fr/RsyncUI_fr_FR.qm and b/languages/fr_FR/RsyncUI_fr_FR.qm differ diff --git a/languages/fr/RsyncUI_fr_FR.ts b/languages/fr_FR/RsyncUI_fr_FR.ts similarity index 67% rename from languages/fr/RsyncUI_fr_FR.ts rename to languages/fr_FR/RsyncUI_fr_FR.ts index 4b41b76..0e669d4 100644 --- a/languages/fr/RsyncUI_fr_FR.ts +++ b/languages/fr_FR/RsyncUI_fr_FR.ts @@ -9,11 +9,23 @@ Configuration - + + Enter the bandwidth limit + Entrez la limite de bande passante + + + + Bandwidth limit Bandwidth limit Limite de bande passante + + + Select th unit of bandwidth limit in Bytes, KiloBytes, MegaBytes, GigaBytes or PetaBytes + Unit of bandwidth + Sélectionnez l'unité de limite de bande passante en otctets, Ko, Mo, Go, Po + MainWindow @@ -29,40 +41,71 @@ Serveur - + + Enter server's URL + Entrez l'adresse du serveur + + + Port Port - + + Enter rsync port on server + Entrez le port du servuer rsync + + + + Press button to connect to rsync server + Connect to server + Cliquez pour se connecter au serveur rsync + + + Connection Connexion - + Return Retour - + + Click to view the list of files of this folder + Cliquez pour afficher la liste des documents + + + + Click to add to download queue + Cliquez pour ajouter à la file de téléchargement + + + + Click on file to stop downloading + Cliquez sur le document pour arrêter le téléchargement et l'enleveer de la file + + + %p% Downloading Téléchargement - - + + Menu Menu - + help Aide - - + + Change save folder Changer le dossier de destination @@ -71,22 +114,22 @@ Dossier d'enregistrement - + Bandwidth limit Limite de bande passante - + About À propos - + About Qt À propos de Qt - + Settings Paramètres diff --git a/main.cpp b/main.cpp index d149ea1..2d03fcd 100644 --- a/main.cpp +++ b/main.cpp @@ -1,11 +1,6 @@ #include "mainwindow.h" -#include -#include -#include -#include -#include + #include -#include int main(int argc, char *argv[]) @@ -14,14 +9,13 @@ int main(int argc, char *argv[]) QTranslator myappTranslator; QLocale localeName = QLocale::system(); - QString localeFile = "usr/share/locale/" + localeName.name() + "LC_MESSAGES/RsyncUI_" + localeName.name() + ".qm"; + QString localeFile = "/usr/share/locale/" + localeName.name() + "/LC_MESSAGES/RsyncUI_" + localeName.name() + ".qm"; if (myappTranslator.load(localeFile)) { a.installTranslator(&myappTranslator); } MainWindow w; - w.show(); return a.exec(); } diff --git a/mainwindow.h b/mainwindow.h index d729934..fa2ed58 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -62,7 +62,7 @@ class About QString title = "RsyncUI"; QString author = "Daniel TARTAVEL-JEANNOT"; QString licence = "GPL_V3"; - QString description = "Client for rsync server"; + QString description = "Client for rsync server\n\nYou click on file to enqueue it, and RyncUI Download one file a time"; QString email = "dtux@free.fr"; QString git = "https://git.labolyon.fr/dtux/RsyncUI/issues"; }; diff --git a/mainwindow.ui b/mainwindow.ui index ecab1a4..2a6d695 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -98,6 +98,12 @@ 0 + + Enter server's URL + + + 5000 + @@ -133,6 +139,12 @@ 16777215 + + Enter rsync port on server + + + 5000 + Qt::ImhPreferNumbers @@ -162,7 +174,10 @@ - + Press button to connect to rsync server + + + 5000 Connection @@ -190,6 +205,12 @@ 0 + + Click to view the list of files of this folder + + + 5000 + QAbstractItemView::SelectedClicked @@ -211,7 +232,16 @@ - Qt::CustomContextMenu + Qt::NoContextMenu + + + Click to add to download queue + + + 5000 + + + QAbstractItemView::NoEditTriggers @@ -273,6 +303,9 @@ + + Click on file to stop downloading + true diff --git a/tools.cpp b/tools.cpp index 9577d8f..13eb514 100644 --- a/tools.cpp +++ b/tools.cpp @@ -1,11 +1,4 @@ #include "mainwindow.h" -#include -#include -#include -#include -#include -#include -#include using namespace std; @@ -44,11 +37,12 @@ const vector explode(const string& s, const char& c, int n = 0) return v; } -FILE * popen2(array argv, string type, int & pid) +FILE * popen2(char * const argv, string type, int & pid) { pid_t child_pid; int fd[2]; QString message; + string command; if (pipe(fd) == -1) { @@ -80,7 +74,8 @@ FILE * popen2(array argv, string type, int & pid) } setpgid(child_pid, child_pid); //Needed so negative PIDs can kill children of /bin/sh - if (execl(argv[0].c_str(), argv[0].c_str(), argv[1].c_str(), argv[2].c_str(), argv[3].c_str(), argv[4].c_str(), argv[5].c_str(), NULL ) == -1) + //if (execlp(argv[0].c_str(), argv[0].c_str(), argv[1].c_str(), argv[2].c_str(), argv[3].c_str(), argv[4].c_str(), argv[5].c_str(), NULL ) == -1) + if (execvp(command.c_str(), &argv)) { perror("execl error => "); } @@ -98,14 +93,11 @@ FILE * popen2(array argv, string type, int & pid) } } - pid = child_pid; - if (type == "r") { return fdopen(fd[READ], "r"); } - return fdopen(fd[WRITE], "w"); } return 0; @@ -124,7 +116,6 @@ int pclose2(FILE * fp, pid_t pid) break; } } - return stat; } diff --git a/tools.h b/tools.h index 01593d8..f91ea53 100644 --- a/tools.h +++ b/tools.h @@ -9,7 +9,7 @@ using namespace std; const vector explode(const string& s, const char& c, int n); -FILE * popen2(array argv, string type, int & pid); +FILE * popen2(char * const argv, string type, int & pid); int pclose2(FILE * fp, pid_t pid);