diff --git a/localization/rssguard-cs_CZ.ts b/localization/rssguard-cs_CZ.ts
index 275f0b3e0..65354019f 100644
--- a/localization/rssguard-cs_CZ.ts
+++ b/localization/rssguard-cs_CZ.ts
@@ -161,6 +161,13 @@ Status auto-aktualizace: %5
+
+ FeedsToolBar
+
+ Toolbar spacer
+ Mezera
+
+
FeedsView
@@ -1176,6 +1183,22 @@ Autoři této aplikace nenesou žádnou odpovědnost za ztrátu Vašich dat.custom external browser is not set correctly
vlastní externí prohlížeč není správně nastaven
+
+ Toolbars
+ Nástrojové lišty
+
+
+ Toolbar for feeds list
+ Lišta seznamu kanálů
+
+
+ Toolbar for messages list
+ Lišta seznamu zpráv
+
+
+ Select toolbar to edit
+ Zvolte lištu, kterou chcete upravit
+
FormStandardCategoryDetails
@@ -1762,6 +1785,45 @@ Přejít na web aplikace a stáhnout jej ručně.
Obsah zprávy.
+
+ MessagesToolBar
+
+ Search messages
+ Hledat zprávy
+
+
+ Message search box
+ Hledací panel zpráv
+
+
+ Menu for highlighting messages
+ Menu pro zvýrazňování zpráv
+
+
+ No extra highlighting
+ Nic nezvýrazňovat
+
+
+ Highlight unread messages
+ Zvýraznit nepřečtené zprávy
+
+
+ Highlight important messages
+ Zvýraznit důležité zprávy
+
+
+ Display all messages
+
+
+
+ Message highlighter
+ Zvýrazňovač zpráv
+
+
+ Toolbar spacer
+ Mezera
+
+
MessagesView
@@ -1951,6 +2013,37 @@ Přejít na web aplikace a stáhnout jej ručně.
Otevřít nový tab webového prohlížeče.
+
+ ToolBarEditor
+
+ Dialog
+
+
+
+ Activated actions
+ Aktivované akce
+
+
+ Available actions
+ Dostupné akce
+
+
+ Insert separator
+ Vložit oddělovač
+
+
+ Insert spacer
+ Vložit mezeru
+
+
+ Separator
+ Oddělovač
+
+
+ Toolbar spacer
+ Mezera
+
+
TrayIconMenu
diff --git a/localization/rssguard-de_DE.ts b/localization/rssguard-de_DE.ts
index 67dee8e8b..a8ebd47f4 100644
--- a/localization/rssguard-de_DE.ts
+++ b/localization/rssguard-de_DE.ts
@@ -151,6 +151,13 @@ Auto-update status: %5
+
+ FeedsToolBar
+
+ Toolbar spacer
+
+
+
FeedsView
@@ -1150,6 +1157,22 @@ Authors of this application are NOT responsible for lost data.
custom external browser is not set correctly
+
+ Toolbars
+
+
+
+ Toolbar for feeds list
+
+
+
+ Toolbar for messages list
+
+
+
+ Select toolbar to edit
+
+
FormStandardCategoryDetails
@@ -1738,6 +1761,45 @@ Go to application website to obtain it manually.
Inhalt der Nachricht.
+
+ MessagesToolBar
+
+ Search messages
+
+
+
+ Message search box
+
+
+
+ Menu for highlighting messages
+
+
+
+ No extra highlighting
+
+
+
+ Highlight unread messages
+
+
+
+ Highlight important messages
+
+
+
+ Display all messages
+
+
+
+ Message highlighter
+
+
+
+ Toolbar spacer
+
+
+
MessagesView
@@ -1927,6 +1989,37 @@ Go to application website to obtain it manually.
+
+ ToolBarEditor
+
+ Dialog
+
+
+
+ Activated actions
+
+
+
+ Available actions
+
+
+
+ Insert separator
+
+
+
+ Insert spacer
+
+
+
+ Separator
+
+
+
+ Toolbar spacer
+
+
+
TrayIconMenu
diff --git a/localization/rssguard-en_GB.ts b/localization/rssguard-en_GB.ts
index e3d7b02ad..269d60b49 100644
--- a/localization/rssguard-en_GB.ts
+++ b/localization/rssguard-en_GB.ts
@@ -151,6 +151,13 @@ Auto-update status: %5
+
+ FeedsToolBar
+
+ Toolbar spacer
+
+
+
FeedsView
@@ -1148,6 +1155,22 @@ Authors of this application are NOT responsible for lost data.
custom external browser is not set correctly
+
+ Toolbars
+
+
+
+ Toolbar for feeds list
+
+
+
+ Toolbar for messages list
+
+
+
+ Select toolbar to edit
+
+
FormStandardCategoryDetails
@@ -1733,6 +1756,45 @@ Go to application website to obtain it manually.
+
+ MessagesToolBar
+
+ Search messages
+
+
+
+ Message search box
+
+
+
+ Menu for highlighting messages
+
+
+
+ No extra highlighting
+
+
+
+ Highlight unread messages
+
+
+
+ Highlight important messages
+
+
+
+ Display all messages
+
+
+
+ Message highlighter
+
+
+
+ Toolbar spacer
+
+
+
MessagesView
@@ -1922,6 +1984,37 @@ Go to application website to obtain it manually.
+
+ ToolBarEditor
+
+ Dialog
+
+
+
+ Activated actions
+
+
+
+ Available actions
+
+
+
+ Insert separator
+
+
+
+ Insert spacer
+
+
+
+ Separator
+
+
+
+ Toolbar spacer
+
+
+
TrayIconMenu
diff --git a/localization/rssguard-fr_FR.ts b/localization/rssguard-fr_FR.ts
index 41e982588..5f845512a 100644
--- a/localization/rssguard-fr_FR.ts
+++ b/localization/rssguard-fr_FR.ts
@@ -157,6 +157,13 @@ Statut de la mise à jour automatique : %5
+
+ FeedsToolBar
+
+ Toolbar spacer
+
+
+
FeedsView
@@ -1172,6 +1179,22 @@ Les auteurs de cette application NE sont PAS responsable de la perte de données
custom external browser is not set correctly
Le navigateur externe n'a pas été correctement défini
+
+ Toolbars
+
+
+
+ Toolbar for feeds list
+
+
+
+ Toolbar for messages list
+
+
+
+ Select toolbar to edit
+
+
FormStandardCategoryDetails
@@ -1761,6 +1784,45 @@ Aller sur le site de l'application pour les obtenir manuellement.Contenu du message.
+
+ MessagesToolBar
+
+ Search messages
+
+
+
+ Message search box
+
+
+
+ Menu for highlighting messages
+
+
+
+ No extra highlighting
+
+
+
+ Highlight unread messages
+
+
+
+ Highlight important messages
+
+
+
+ Display all messages
+
+
+
+ Message highlighter
+
+
+
+ Toolbar spacer
+
+
+
MessagesView
@@ -1950,6 +2012,37 @@ Aller sur le site de l'application pour les obtenir manuellement.Ouvrir un nouvel onglet de navigation web.
+
+ ToolBarEditor
+
+ Dialog
+
+
+
+ Activated actions
+
+
+
+ Available actions
+
+
+
+ Insert separator
+
+
+
+ Insert spacer
+
+
+
+ Separator
+
+
+
+ Toolbar spacer
+
+
+
TrayIconMenu
diff --git a/localization/rssguard-nl_NL.ts b/localization/rssguard-nl_NL.ts
index b92dbc1e6..47991cb6d 100644
--- a/localization/rssguard-nl_NL.ts
+++ b/localization/rssguard-nl_NL.ts
@@ -158,6 +158,13 @@ Status automatisch bijwerken: %5
+
+ FeedsToolBar
+
+ Toolbar spacer
+
+
+
FeedsView
@@ -1174,6 +1181,22 @@ Auteurs van Rssguard zijn NIET verantwoordelijk voor verlies van gegevens.custom external browser is not set correctly
Aangepaste externe browser in niet correct ingesteld
+
+ Toolbars
+
+
+
+ Toolbar for feeds list
+
+
+
+ Toolbar for messages list
+
+
+
+ Select toolbar to edit
+
+
FormStandardCategoryDetails
@@ -1763,6 +1786,45 @@ Ga naar RRSguard website en download het handmatig.
Inhoud van het bericht.
+
+ MessagesToolBar
+
+ Search messages
+
+
+
+ Message search box
+
+
+
+ Menu for highlighting messages
+
+
+
+ No extra highlighting
+
+
+
+ Highlight unread messages
+
+
+
+ Highlight important messages
+
+
+
+ Display all messages
+
+
+
+ Message highlighter
+
+
+
+ Toolbar spacer
+
+
+
MessagesView
@@ -1952,6 +2014,37 @@ Ga naar RRSguard website en download het handmatig.
Open een nieuw webbrowser tabblad.
+
+ ToolBarEditor
+
+ Dialog
+
+
+
+ Activated actions
+
+
+
+ Available actions
+
+
+
+ Insert separator
+
+
+
+ Insert spacer
+
+
+
+ Separator
+
+
+
+ Toolbar spacer
+
+
+
TrayIconMenu
diff --git a/resources/7za/7za.exe b/resources/7za/7za.exe
new file mode 100644
index 000000000..7f6bf86bc
Binary files /dev/null and b/resources/7za/7za.exe differ
diff --git a/src/gui/formupdate.cpp b/src/gui/formupdate.cpp
index 7d56492f8..4b0fbfa00 100755
--- a/src/gui/formupdate.cpp
+++ b/src/gui/formupdate.cpp
@@ -29,7 +29,7 @@
#include
#include
-#if defined(Q_OS_WIN32)
+#if defined(Q_OS_WIN)
#include "qt_windows.h"
#endif
@@ -82,7 +82,7 @@ void FormUpdate::checkForUpdates() {
m_ui->m_lblAvailableRelease->setText(update.first.m_availableVersion);
m_ui->m_txtChanges->setText(update.first.m_changes);
- if (update.first.m_availableVersion >= APP_VERSION) {
+ if (update.first.m_availableVersion > APP_VERSION) {
m_ui->m_lblStatus->setStatus(WidgetWithStatus::Ok,
tr("New release available."),
tr("This is new version which can be\ndownloaded and installed."));
@@ -116,7 +116,9 @@ void FormUpdate::startUpdate() {
// On Windows/OS2 we can update the application right away.
// Download the files.
QByteArray output;
- //NetworkFactory::downloadFile(url_file, DOWNLOAD_TIMEOUT, output);
+ QNetworkReply::NetworkError download_result = NetworkFactory::downloadFile(url_file,
+ 10 * DOWNLOAD_TIMEOUT,
+ output);
#if QT_VERSION >= 0x050000
QString temp_directory = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
@@ -128,11 +130,7 @@ void FormUpdate::startUpdate() {
QString output_file_name = url_file.mid(url_file.lastIndexOf('/') + 1);
QFile output_file(temp_directory + QDir::separator() + output_file_name);
- if (output_file.exists()) {
- output_file.remove();
- }
-
- if (output_file.open(QIODevice::WriteOnly)) {
+ if (output_file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
output_file.write(output);
output_file.flush();
output_file.close();
@@ -147,9 +145,10 @@ void FormUpdate::startUpdate() {
#if defined(Q_OS_WIN32)
ShellExecute(0,
0,
- (wchar_t *)QString("updater.exe").utf16(),
- (wchar_t *) QString("\"%1\" \"%2\"").arg(qApp->applicationFilePath(),
- output_file.fileName()).utf16(),
+ (wchar_t *) QString("updater.exe").utf16(),
+ (wchar_t *) QString("\"%1\" \"%2\" \"%3\"").arg(temp_directory,
+ qApp->applicationFilePath(),
+ output_file.fileName()).utf16(),
0,
SW_SHOWNORMAL);
#elif defined(Q_OS_OS2)
diff --git a/src/updater/detector.cpp b/src/updater/detector.cpp
index c731b81ea..7207b5961 100644
--- a/src/updater/detector.cpp
+++ b/src/updater/detector.cpp
@@ -6,7 +6,7 @@ Detector::Detector(QObject *parent) : QObject(parent) {
void Detector::handleMessage(const QString &message) {
if (message == "app_is_running") {
- qDebug("Detected another instance of RSS Guard/Updater was starting...");
+ qDebug("Another instance of RSS Guard/Updater was starting...");
}
else if (message == "app_quit") {
// zprava na vypnuti, tu ignorujeme.
diff --git a/src/updater/main.cpp b/src/updater/main.cpp
index 8cd478dee..65ce6a0c3 100644
--- a/src/updater/main.cpp
+++ b/src/updater/main.cpp
@@ -22,22 +22,56 @@
#include
#include
#include
+#include
+#include
+bool removeDir(const QString & dirName) {
+ bool result = true;
+ QDir dir(dirName);
+
+ if (dir.exists(dirName)) {
+ foreach (QFileInfo info, dir.entryInfoList(QDir::NoDotAndDotDot | QDir::System | QDir::Hidden | QDir::AllDirs | QDir::Files, QDir::DirsFirst)) {
+ if (info.isDir()) {
+ result = removeDir(info.absoluteFilePath());
+ }
+ else {
+ result = QFile::remove(info.absoluteFilePath());
+ }
+
+ if (!result) {
+ return result;
+ }
+ }
+
+ result = dir.rmdir(dirName);
+ }
+
+ return result;
+}
+
int main(int argc, char *argv[]) {
// Instantiate base application object.
QtSingleCoreApplication application("rssguard", argc, argv);
- qDebug("Instantiated QtSingleApplication class.");
- if (argc != 3) {
- qDebug("Insufficient arguments passed. Quitting updater...");
- }
- else {
- // Print input data.
- qDebug("RSS Guard application executable: %s", argv[1]);
- qDebug("File with update to be installed: %s", argv[2]);
+ if (argc != 4) {
+ qDebug("Insufficient arguments passed. Quitting RSS Guard updater...");
+ return EXIT_FAILURE;
}
+ QString temp_directory = QDir::toNativeSeparators(argv[1]);
+ QString rssguard_executable = QDir::toNativeSeparators(argv[2]);
+ QString rssguard_path = QDir::toNativeSeparators(QFileInfo(rssguard_executable).absolutePath());
+ QString update_archive = QDir::toNativeSeparators(argv[3]);
+
+ // Print input data.
+ qDebug("\n===== directories & files =====");
+ qDebug("TEMP folder:\n\t %s", qPrintable(temp_directory));
+ qDebug("RSS Guard application executable:\n\t %s", qPrintable(rssguard_executable));
+ qDebug("RSS Guard application path:\n\t %s", qPrintable(rssguard_path));
+ qDebug("File with update to be installed:\n\t %s", qPrintable(update_archive));
+ qDebug("===== directories & files =====\n");
+
// Check if main RSS Guard instance is running.
if (application.sendMessage("app_quit")) {
qDebug("RSS Guard application is running. Quitting it...");
@@ -52,10 +86,39 @@ int main(int argc, char *argv[]) {
QObject::connect(&application, SIGNAL(messageReceived(QString)),
&detector, SLOT(handleMessage(QString)));
- // Everything is set up, file is downloaded, RSS Guard is not running.
- // TODO: nahradit spravne "/" > "\\" v argumentech pro 7za
- // https://code.google.com/p/quite-rss/source/browse/src/mainwindow.cpp?repo=updater#393
- QProcess::startDetached("7za", QStringList() << "e" << argv[2]);
+ QString extractor_program("7za.exe");
+ QStringList arguments;
+ QString output_temp_directory = temp_directory + QDir::separator() + "rssguard";
+
+ // Remove old folders.
+ if (QDir(output_temp_directory).exists()) {
+ removeDir(output_temp_directory);
+ }
+
+ arguments << "x" << update_archive << "-r" <<
+ "-y" << QString("-o%1").arg(output_temp_directory);
+
+ switch (QProcess::execute(extractor_program, arguments)) {
+ case -1:
+ qDebug("\nDecompressor crashed. Upgrading process failed.");
+ return EXIT_FAILURE;
+
+ case -2:
+ qDebug("\nDecompressor was not started successfully. Upgrading process failed.");
+ return EXIT_FAILURE;
+
+ case 0:
+ qDebug("\nDecompression is done.");
+ break;
+
+ default:
+ qDebug("\nUnspecified error occured.");
+ return EXIT_FAILURE;
+ }
+
+ // All needed files are now decompressed in temporary directory.
+ // Copy all possible files to RSS Guard application path and
+ // do final cleanup.
// Enter global event loop.
return QtSingleCoreApplication::exec();