diff options
author | Weblate <noreply@weblate.org> | 2017-08-17 18:50:43 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2017-08-17 18:50:43 +0000 |
commit | 26fb7116282b20497201802220652b3907acbf3f (patch) | |
tree | 0558aeef32e7df82b426459af47b3ece56b69061 | |
parent | Translated using Weblate (Catalan) (diff) | |
parent | Merge remote-tracking branch 'origin/master' (diff) | |
download | lumina-26fb7116282b20497201802220652b3907acbf3f.tar.gz lumina-26fb7116282b20497201802220652b3907acbf3f.tar.bz2 lumina-26fb7116282b20497201802220652b3907acbf3f.zip |
Merge remote-tracking branch 'origin/master'
-rw-r--r-- | src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts | 112 | ||||
-rw-r--r-- | src-qt5/core/lumina-open/main.cpp | 18 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-archiver/MainUI.cpp | 10 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp | 27 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-archiver/TarBackend.h | 2 |
5 files changed, 93 insertions, 76 deletions
diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts index 4cd0c63e..7f0aeeed 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts @@ -21,7 +21,7 @@ <message> <location filename="../panel-plugins/applauncher/AppLaunchButton.cpp" line="67"/> <source>Select Application</source> - <translation>Seleccioneu l'aplicació</translation> + <translation>Seleccioneu l'aplicació</translation> </message> <message> <location filename="../panel-plugins/applauncher/AppLaunchButton.cpp" line="67"/> @@ -55,7 +55,7 @@ <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="139"/> <source>View Properties</source> - <translation>Mostra'n les propietats</translation> + <translation>Mostra'n les propietats</translation> </message> <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="141"/> @@ -65,7 +65,7 @@ <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="143"/> <source>Rename</source> - <translation>Canvia'n el nom</translation> + <translation>Canvia'n el nom</translation> </message> <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="146"/> @@ -85,7 +85,7 @@ <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="213"/> <source>Select Application</source> - <translation>Seleccioneu l'aplicació</translation> + <translation>Seleccioneu l'aplicació</translation> </message> <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="213"/> @@ -196,7 +196,7 @@ <message> <location filename="../BootSplash.ui" line="94"/> <source>Starting the Lumina Desktop...</source> - <translation>S'inicia l'escriptori Lumina...</translation> + <translation>S'inicia l'escriptori Lumina...</translation> </message> <message> <location filename="../BootSplash.cpp" line="17"/> @@ -211,22 +211,22 @@ <message> <location filename="../BootSplash.cpp" line="43"/> <source>Keep up with desktop news!</source> - <translation>Mantingueu-vos al dia de les notícies de l'escriptori!</translation> + <translation>Mantingueu-vos al dia de les notícies de l'escriptori!</translation> </message> <message> <location filename="../BootSplash.cpp" line="45"/> <source>There is a full handbook of information about the desktop available online.</source> - <translation>Hi ha un manual ple d'informació de l'escriptori disponible en línia.</translation> + <translation>Hi ha un manual ple d'informació de l'escriptori disponible en línia.</translation> </message> <message> <location filename="../BootSplash.cpp" line="47"/> <source>Want to change the interface? Everything is customizable in the desktop configuration!</source> - <translation>Voleu canviar-ne la interfície? Tot és personalitzable des de la configuració de l'escriptori!</translation> + <translation>Voleu canviar-ne la interfície? Tot és personalitzable des de la configuració de l'escriptori!</translation> </message> <message> <location filename="../BootSplash.cpp" line="49"/> <source>Lumina can easily reproduce the interface from most other desktop environments.</source> - <translation>El Lumina pot reproduir fàcilment la interfície de la majoria d'altres entorns d'escriptori.</translation> + <translation>El Lumina pot reproduir fàcilment la interfície de la majoria d'altres entorns d'escriptori.</translation> </message> <message> <location filename="../BootSplash.cpp" line="51"/> @@ -236,7 +236,7 @@ <message> <location filename="../BootSplash.cpp" line="53"/> <source>I have never been hurt by what I have not said</source> - <translation>Mai no m'ha fet mal el que no he dit.</translation> + <translation>Mai no m'ha fet mal el que no he dit.</translation> </message> <message> <location filename="../BootSplash.cpp" line="55"/> @@ -265,12 +265,12 @@ </message> <message> <location filename="../BootSplash.cpp" line="65"/> - <source>Don't expect to build up the weak by pulling down the strong.</source> + <source>Don't expect to build up the weak by pulling down the strong.</source> <translation>No espereu fer forts els febles enfonsant forts.</translation> </message> <message> <location filename="../BootSplash.cpp" line="67"/> - <source>You can't know too much, but you can say too much.</source> + <source>You can't know too much, but you can say too much.</source> <translation>No es pot saber massa, però es pot dir massa.</translation> </message> <message> @@ -281,7 +281,7 @@ <message> <location filename="../BootSplash.cpp" line="71"/> <source>Any society that would give up a little liberty to gain a little security will deserve neither and lose both.</source> - <translation>Qualsevol societat que deixi de banda una mica de llibertat per guanyar una mica de seguretat no en mereixerà ni una ni l'altra i les perdrà totes dues.</translation> + <translation>Qualsevol societat que deixi de banda una mica de llibertat per guanyar una mica de seguretat no en mereixerà ni una ni l'altra i les perdrà totes dues.</translation> </message> <message> <location filename="../BootSplash.cpp" line="73"/> @@ -341,7 +341,7 @@ <message> <location filename="../BootSplash.cpp" line="95"/> <source>The only way to do great work is to love what you do.</source> - <translation>L'única manera de fer una bona feina és que us agradi el que feu.</translation> + <translation>L'única manera de fer una bona feina és que us agradi el que feu.</translation> </message> <message> <location filename="../BootSplash.cpp" line="97"/> @@ -350,8 +350,8 @@ </message> <message> <location filename="../BootSplash.cpp" line="99"/> - <source>Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.</source> - <translation>Només hi ha dues coses infinites: l'univers i l'estupidesa humana, i no estic segur de la primera.</translation> + <source>Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.</source> + <translation>Només hi ha dues coses infinites: l'univers i l'estupidesa humana, i no estic segur de la primera.</translation> </message> <message> <location filename="../BootSplash.cpp" line="101"/> @@ -360,8 +360,8 @@ </message> <message> <location filename="../BootSplash.cpp" line="103"/> - <source>Do, or do not. There is no 'try'.</source> - <translation>Fes-ho o no. No hi ha un "intent".</translation> + <source>Do, or do not. There is no 'try'.</source> + <translation>Fes-ho o no. No hi ha un "intent".</translation> </message> <message> <location filename="../BootSplash.cpp" line="105"/> @@ -371,7 +371,7 @@ <message> <location filename="../BootSplash.cpp" line="107"/> <source>Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws.</source> - <translation>La gent bona no necessita lleis que els diguin d'actuar responsablement, mentre que la mala gent trobarà una manera d'evitar les lleis.</translation> + <translation>La gent bona no necessita lleis que els diguin d'actuar responsablement, mentre que la mala gent trobarà una manera d'evitar les lleis.</translation> </message> <message> <location filename="../BootSplash.cpp" line="109"/> @@ -380,8 +380,8 @@ </message> <message> <location filename="../BootSplash.cpp" line="111"/> - <source>It's kind of fun to do the impossible.</source> - <translation>És bastant divertit fer l'impossible.</translation> + <source>It's kind of fun to do the impossible.</source> + <translation>És bastant divertit fer l'impossible.</translation> </message> <message> <location filename="../BootSplash.cpp" line="113"/> @@ -396,7 +396,7 @@ <message> <location filename="../BootSplash.cpp" line="117"/> <source>Success usually comes to those who are too busy to be looking for it.</source> - <translation>L'èxit normalment arriba als que estan massa enfeinats per buscar-lo.</translation> + <translation>L'èxit normalment arriba als que estan massa enfeinats per buscar-lo.</translation> </message> <message> <location filename="../BootSplash.cpp" line="119"/> @@ -421,7 +421,7 @@ <message> <location filename="../BootSplash.cpp" line="127"/> <source>Sometimes it is not enough that we do our best; we must do what is required.</source> - <translation>Algunes vegades no n'hi ha prou amb fer-ho el millor que podem, hem de fer el que cal.</translation> + <translation>Algunes vegades no n'hi ha prou amb fer-ho el millor que podem, hem de fer el que cal.</translation> </message> <message> <location filename="../BootSplash.cpp" line="129"/> @@ -446,7 +446,7 @@ <message> <location filename="../BootSplash.cpp" line="148"/> <source>Loading User Preferences …</source> - <translation>Carregant les preferències de l'usuari…</translation> + <translation>Carregant les preferències de l'usuari…</translation> </message> <message> <location filename="../BootSplash.cpp" line="151"/> @@ -471,7 +471,7 @@ <message> <location filename="../BootSplash.cpp" line="163"/> <source>Preparing Workspace …</source> - <translation>Preparant l'espai de treball…</translation> + <translation>Preparant l'espai de treball…</translation> </message> <message> <location filename="../BootSplash.cpp" line="166"/> @@ -481,7 +481,7 @@ <message> <location filename="../BootSplash.cpp" line="169"/> <source>Starting App: %1</source> - <translation>Iniciant l'aplicació: %1</translation> + <translation>Iniciant l'aplicació: %1</translation> </message> </context> <context> @@ -532,7 +532,7 @@ <message> <location filename="../panel-plugins/systemstart/ItemWidget.cpp" line="190"/> <source>Pin to Desktop</source> - <translation>Enganxa a l'escriptori</translation> + <translation>Enganxa a l'escriptori</translation> </message> <message> <location filename="../panel-plugins/systemstart/ItemWidget.cpp" line="195"/> @@ -560,7 +560,7 @@ <message> <location filename="../JsonMenu.h" line="60"/> <source>Error parsing script output: %1</source> - <translation>Error analitzant la sortida de l'script: %1</translation> + <translation>Error analitzant la sortida de l'script: %1</translation> </message> </context> <context> @@ -684,7 +684,7 @@ <message> <location filename="../panel-plugins/clock/LClock.cpp" line="161"/> <source>Use System Time</source> - <translation>Usa l'hora del sistema</translation> + <translation>Usa l'hora del sistema</translation> </message> </context> <context> @@ -692,17 +692,17 @@ <message> <location filename="../desktop-plugins/LDPlugin.cpp" line="37"/> <source>Modify Item</source> - <translation>Modifica l'ítem</translation> + <translation>Modifica l'ítem</translation> </message> <message> <location filename="../desktop-plugins/LDPlugin.cpp" line="45"/> <source>Start Moving Item</source> - <translation>Inicia el trasllat de l'ítem</translation> + <translation>Inicia el trasllat de l'ítem</translation> </message> <message> <location filename="../desktop-plugins/LDPlugin.cpp" line="46"/> <source>Start Resizing Item</source> - <translation>Inicia el canvi de mida de l'ítem</translation> + <translation>Inicia el canvi de mida de l'ítem</translation> </message> <message> <location filename="../desktop-plugins/LDPlugin.cpp" line="48"/> @@ -717,7 +717,7 @@ <message> <location filename="../desktop-plugins/LDPlugin.cpp" line="51"/> <source>Remove Item</source> - <translation>Elimina l'ítem</translation> + <translation>Elimina l'ítem</translation> </message> </context> <context> @@ -773,7 +773,7 @@ <message> <location filename="../LDesktop.cpp" line="255"/> <source>Desktop Actions</source> - <translation>Accions de l'escriptori</translation> + <translation>Accions de l'escriptori</translation> </message> <message> <location filename="../LDesktop.cpp" line="257"/> @@ -879,7 +879,7 @@ <message> <location filename="../panel-plugins/systemdashboard/SysMenuQuick.ui" line="111"/> <source>Launch Audio Mixer</source> - <translation>Obre el Mesclador d'àudio</translation> + <translation>Obre el Mesclador d'àudio</translation> </message> <message> <location filename="../panel-plugins/systemdashboard/SysMenuQuick.ui" line="156"/> @@ -1182,12 +1182,12 @@ <message> <location filename="../desktop-plugins/rssreader/RSSFeedPlugin.ui" line="62"/> <source>View Options</source> - <translation>Mostra'n les opcions</translation> + <translation>Mostra'n les opcions</translation> </message> <message> <location filename="../desktop-plugins/rssreader/RSSFeedPlugin.ui" line="89"/> <source>Open Website</source> - <translation>Obre'n el lloc web</translation> + <translation>Obre'n el lloc web</translation> </message> <message> <location filename="../desktop-plugins/rssreader/RSSFeedPlugin.ui" line="92"/> @@ -1219,7 +1219,7 @@ <message> <location filename="../desktop-plugins/rssreader/RSSFeedPlugin.ui" line="287"/> <source>RSS URL</source> - <translation>URL de l'RSS</translation> + <translation>URL de l'RSS</translation> </message> <message> <location filename="../desktop-plugins/rssreader/RSSFeedPlugin.ui" line="302"/> @@ -1244,7 +1244,7 @@ <message> <location filename="../desktop-plugins/rssreader/RSSFeedPlugin.ui" line="437"/> <source>Some RSS feeds may request custom update intervals instead of using this setting</source> - <translation>Alguns canals RSS poden sol·licitar intervals d'actualització personalitzats en lloc d'utilitzar aquest paràmetre.</translation> + <translation>Alguns canals RSS poden sol·licitar intervals d'actualització personalitzats en lloc d'utilitzar aquest paràmetre.</translation> </message> <message> <location filename="../desktop-plugins/rssreader/RSSFeedPlugin.ui" line="440"/> @@ -1290,7 +1290,7 @@ <message> <location filename="../desktop-plugins/rssreader/RSSFeedPlugin.cpp" line="78"/> <source>Lumina Desktop RSS</source> - <translation>RSS de l'escriptori Lumina</translation> + <translation>RSS de l'escriptori Lumina</translation> </message> <message> <location filename="../desktop-plugins/rssreader/RSSFeedPlugin.cpp" line="143"/> @@ -1315,7 +1315,7 @@ <message> <location filename="../desktop-plugins/rssreader/RSSFeedPlugin.cpp" line="147"/> <source>Last Build Date: %1</source> - <translation>Data de l'última construcció: %1</translation> + <translation>Data de l'última construcció: %1</translation> </message> <message> <location filename="../desktop-plugins/rssreader/RSSFeedPlugin.cpp" line="148"/> @@ -1353,7 +1353,7 @@ <message> <location filename="../SettingsMenu.cpp" line="39"/> <source>All Desktop Settings</source> - <translation>Tots els paràmetres de l'escriptori</translation> + <translation>Tots els paràmetres de l'escriptori</translation> </message> <message> <location filename="../SettingsMenu.cpp" line="54"/> @@ -1411,7 +1411,7 @@ <message> <location filename="../panel-plugins/systemstart/StartMenu.ui" line="488"/> <source>Configure Desktop</source> - <translation>Configureu l'escriptori</translation> + <translation>Configureu l'escriptori</translation> </message> <message> <location filename="../panel-plugins/systemstart/StartMenu.ui" line="924"/> @@ -1461,17 +1461,17 @@ <message> <location filename="../panel-plugins/systemstart/StartMenu.cpp" line="291"/> <source>Yes</source> - <translation type="unfinished"></translation> + <translation>Sí</translation> </message> <message> <location filename="../panel-plugins/systemstart/StartMenu.cpp" line="292"/> <source>No</source> - <translation type="unfinished"></translation> + <translation>No</translation> </message> <message> <location filename="../panel-plugins/systemstart/StartMenu.cpp" line="293"/> <source>Cancel</source> - <translation type="unfinished">Cancel·la</translation> + <translation>Cancel·la</translation> </message> <message> <location filename="../panel-plugins/systemstart/StartMenu.cpp" line="501"/> @@ -1547,12 +1547,12 @@ <message> <location filename="../SystemWindow.cpp" line="58"/> <source>Yes</source> - <translation type="unfinished"></translation> + <translation>Sí</translation> </message> <message> <location filename="../SystemWindow.cpp" line="59"/> <source>No</source> - <translation type="unfinished"></translation> + <translation>No</translation> </message> </context> <context> @@ -1583,7 +1583,7 @@ <message> <location filename="../panel-plugins/userbutton/UserWidget.ui" line="14"/> <source>UserWidget</source> - <translation>Giny de l'usuari</translation> + <translation>Giny de l'usuari</translation> </message> <message> <location filename="../panel-plugins/userbutton/UserWidget.ui" line="24"/> @@ -1631,12 +1631,12 @@ <location filename="../panel-plugins/userbutton/UserWidget.ui" line="290"/> <location filename="../panel-plugins/userbutton/UserWidget.cpp" line="330"/> <source>Home</source> - <translation>Carpeta de l'usuari</translation> + <translation>Carpeta de l'usuari</translation> </message> <message> <location filename="../panel-plugins/userbutton/UserWidget.ui" line="293"/> <source>Home Directory</source> - <translation>Directori de l'usuari</translation> + <translation>Directori de l'usuari</translation> </message> <message> <location filename="../panel-plugins/userbutton/UserWidget.ui" line="322"/> @@ -1646,7 +1646,7 @@ <message> <location filename="../panel-plugins/userbutton/UserWidget.ui" line="375"/> <source>Go back to home directory</source> - <translation>Torna al directori de l'usuari</translation> + <translation>Torna al directori de l'usuari</translation> </message> <message> <location filename="../panel-plugins/userbutton/UserWidget.ui" line="350"/> @@ -1661,7 +1661,7 @@ <message> <location filename="../panel-plugins/userbutton/UserWidget.ui" line="461"/> <source>Desktop Preferences</source> - <translation>Preferències de l'escriptori</translation> + <translation>Preferències de l'escriptori</translation> </message> <message> <location filename="../panel-plugins/userbutton/UserWidget.ui" line="473"/> @@ -1671,7 +1671,7 @@ <message> <location filename="../panel-plugins/userbutton/UserWidget.ui" line="495"/> <source>Desktop Appearance/Plugins</source> - <translation>Aparença de l'escriptori / connectors</translation> + <translation>Aparença de l'escriptori / connectors</translation> </message> <message> <location filename="../panel-plugins/userbutton/UserWidget.ui" line="517"/> @@ -1681,12 +1681,12 @@ <message> <location filename="../panel-plugins/userbutton/UserWidget.ui" line="539"/> <source>Screensaver Settings</source> - <translation>Paràmetres de l'estalvi de pantalla</translation> + <translation>Paràmetres de l'estalvi de pantalla</translation> </message> <message> <location filename="../panel-plugins/userbutton/UserWidget.ui" line="581"/> <source>About the Lumina Desktop</source> - <translation>Quant a l'escriptori Lumina</translation> + <translation>Quant a l'escriptori Lumina</translation> </message> <message> <location filename="../panel-plugins/userbutton/UserWidget.cpp" line="289"/> diff --git a/src-qt5/core/lumina-open/main.cpp b/src-qt5/core/lumina-open/main.cpp index d421b5b6..72d09f42 100644 --- a/src-qt5/core/lumina-open/main.cpp +++ b/src-qt5/core/lumina-open/main.cpp @@ -88,9 +88,9 @@ void LaunchAutoStart(){ QString cmd = xdgapps[i]->getDesktopExec(); if(cmd.contains("%")){cmd = cmd.remove("%U").remove("%u").remove("%F").remove("%f").remove("%i").remove("%c").remove("%k").simplified(); } //Now run the command - if(!cmd.isEmpty()){ + if(!cmd.isEmpty()){ qDebug() << " - Auto-Starting File:" << xdgapps[i]->filePath; - QProcess::startDetached(cmd); + QProcess::startDetached(cmd); } } //make sure we clean up all the xdgapps structures @@ -103,7 +103,7 @@ QString cmdFromUser(int argc, char **argv, QString inFile, QString extension, QS if(extension=="mimetype"){ //qDebug() << "inFile:" << inFile; QStringList matches = LXDG::findAppMimeForFile(inFile, true).split("::::"); //allow multiple matches - //qDebug() << "Matches:" << matches; + qDebug() << "Mimetype Matches:" << matches; for(int i=0; i<matches.length(); i++){ defApp = LXDG::findDefaultAppForMime(matches[i]); //qDebug() << "MimeType:" << matches[i] << defApp; @@ -111,7 +111,7 @@ QString cmdFromUser(int argc, char **argv, QString inFile, QString extension, QS else if(i+1==matches.length()){ extension = matches[0]; } } }else{ defApp = LFileDialog::getDefaultApp(extension); } - //qDebug() << "extension:" << extension << "defApp:" << defApp; + qDebug() << "Mimetype:" << extension << "defApp:" << defApp; if( !defApp.isEmpty() && !showDLG ){ if(defApp.endsWith(".desktop")){ XDGDesktop DF(defApp); @@ -159,10 +159,10 @@ QString cmdFromUser(int argc, char **argv, QString inFile, QString extension, QS if(!w.appPath.isEmpty()){ path = w.appPath; } //Just do the default application registration here for now // might move it to the runtime phase later after seeing that the app has successfully started - if(w.setDefault){ + if(w.setDefault){ if(!w.appFile.isEmpty()){ LFileDialog::setDefaultApp(extension, w.appFile); } else{ LFileDialog::setDefaultApp(extension, w.appExec); } - }else{ LFileDialog::setDefaultApp(extension, ""); } + } //Now return the resulting application command return w.appExec; } @@ -234,7 +234,7 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat bool isFile=false; bool isUrl=false; QString extension; //Quick check/replacement for the URL syntax of a file - if(inFile.startsWith("file://")){ inFile.remove(0,7); } + if(inFile.startsWith("file://")){ inFile = QUrl(inFile).toLocalFile(); } //change from URL to file format for a local file //First make sure this is not a binary name first QString bin = inFile.section(" ",0,0).simplified(); if(LUtils::isValidBinary(bin) && !bin.endsWith(".desktop") && !QFileInfo(inFile).isDir() ){isFile=true; } @@ -317,10 +317,10 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat } } //Now assemble the exec string (replace file/url field codes as necessary) - if(useInputFile){ + if(useInputFile){ args = inFile; //just to keep them distinct internally // NOTE: lumina-open is only designed for a single input file, - // so no need to distinguish between the list codes (uppercase) + // so no need to distinguish between the list codes (uppercase) // and the single-file codes (lowercase) //Special "inFile" format replacements for input codes if( (cmd.contains("%f") || cmd.contains("%F") ) ){ 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)); } diff --git a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp index c0d3b03e..9fe735a3 100644 --- a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp +++ b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp @@ -8,6 +8,8 @@ #include <QFile> #include <QDir> #include <QDebug> +#include <QDateTime> +#include <QCoreApplication> Backend::Backend(QObject *parent) : QObject(parent){ //Setup the backend process @@ -38,8 +40,8 @@ void Backend::loadFile(QString path){ } bool Backend::canModify(){ - static QStringList validEXT; - if( validEXT.isEmpty() ){ + static QStringList validEXT; + if( validEXT.isEmpty() ){ validEXT << ".zip" << ".tar.gz" << ".tgz" << ".tar.xz" << ".txz" << ".tar.bz" << ".tbz" << ".tar.bz2" << ".tbz2" << ".tar" \ << ".tar.lzma" << ".tlz" << ".cpio" << ".pax" << ".ar" << ".shar" << ".7z"; } @@ -95,16 +97,16 @@ void Backend::startAdd(QStringList paths){ QStringList args; args << "-c" << "-a"; args << flags; - //Now setup the parent dir + //Now setup the parent dir QString parent = paths[0].section("/",0,-2); - for(int i=0; i<paths.length(); i++){ - paths[i] = paths[i].section(parent,1,-1); + for(int i=0; i<paths.length(); i++){ + paths[i] = paths[i].section(parent,1,-1); if(paths[i].startsWith("/")){ paths[i].remove(0,1); } } args << "-C" << parent; args << paths; if(QFile::exists(filepath)){ //append to existing - args.replaceInStrings(filepath, tmpfilepath); + args.replaceInStrings(filepath, tmpfilepath); args<< "@"+filepath; } STARTING=true; @@ -151,11 +153,20 @@ void Backend::startExtract(QString path, bool overwrite, QStringList files){ void Backend::startViewFile(QString path){ QStringList args; + QString newfilename = QDateTime::currentDateTime().toString("yyyyMMddhhmmss")+"-"+path.section("/",-1); args << "-x"; - args << flags <<"--include" << path <<"--strip-components" << QString::number(path.count("/")) << "-C" << QDir::tempPath(); + //args << flags <<"--include" << path <<"--strip-components" << QString::number(path.count("/")) << "-C" << QDir::tempPath(); + args << flags <<"--include" << path <<"--to-stdout"; STARTING=true; //qDebug() << "Starting command:" << "tar" << args; - PROC.start("tar", args); + emit ProcessStarting(); + QProcess tmpProc; + tmpProc.setStandardOutputFile(newfilename); + tmpProc.start("tar",args); + while(!tmpProc.waitForFinished(500)){ QCoreApplication::processEvents(); } + emit ProcessFinished(tmpProc.exitCode()==0, ""); + QProcess::startDetached("xdg-open", QStringList() << newfilename); + //PROC.start("tar", args); } //=============== diff --git a/src-qt5/desktop-utils/lumina-archiver/TarBackend.h b/src-qt5/desktop-utils/lumina-archiver/TarBackend.h index 3eb4eb53..dd08361c 100644 --- a/src-qt5/desktop-utils/lumina-archiver/TarBackend.h +++ b/src-qt5/desktop-utils/lumina-archiver/TarBackend.h @@ -22,7 +22,7 @@ public: //Listing routines QString currentFile(); - bool isWorking(); //is this currently still making changes? + bool isWorking(); //is this currently still making changes? //Contents listing QStringList heirarchy(); //returns all the file paths within the archive |