[PATCH 1 of 3] (issue39) Show generic warning on installation for firefox/thunderbird instances

Wald Commits scm-commit at wald.intevation.org
Thu Sep 25 12:05:11 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1411636297 -7200
# Node ID 8748223990eb54a83e7acc82011c0e97d1c7acdf
# Parent  1c77c4c6aff45547a13b941949fe51d3248c9ed1
(issue39) Show generic warning on installation for firefox/thunderbird instances

diff -r 1c77c4c6aff4 -r 8748223990eb ui/mainwindow.cpp
--- a/ui/mainwindow.cpp	Thu Sep 25 09:11:05 2014 +0200
+++ b/ui/mainwindow.cpp	Thu Sep 25 11:11:37 2014 +0200
@@ -1562,6 +1562,7 @@
 
 void MainWindow::checkAndInstallCerts()
 {
+#ifdef WIN32
     /* Checking before opening the dialog should be cheaper */
     QList<int> pids = ProcessHelp::getProcessesIdForName("firefox");
     pids.append(ProcessHelp::getProcessesIdForName("thunderbird"));
@@ -1581,6 +1582,25 @@
 
     waitDialog->exec();
     return;
+#else
+    /* On GNU Linux finding all firefox / thunderbird instances which
+     * could be found on the filesystem is more difficult. So
+     * for now we just show a generic warning dialog. */
+    QMessageBox* warnMessage = new QMessageBox (QMessageBox::Information,
+            tr("Firefox and Thunderbird certificate installation."),
+            tr("Please close all running Firefox and Thunderbird instances "
+                "before continuing with the installation."), QMessageBox::Ok | QMessageBox::No,
+            this);
+    warnMessage->button(QMessageBox::Ok)->setText(tr("Continue"));
+    warnMessage->setDefaultButton(QMessageBox::Ok);
+    warnMessage->button(QMessageBox::No)->setText(tr("Cancel"));
+    warnMessage->setWindowIcon(windowIcon());
+    warnMessage->setIconPixmap(QIcon(":/img/dialog-warning.png").pixmap(QSize(48,48)));
+
+    connect(warnMessage->button(QMessageBox::Ok), SIGNAL(clicked()), this, SLOT(installCerts()));
+    warnMessage->exec();
+    return;
+#endif
 }
 
 void MainWindow::togglePages(int button)


More information about the Trustbridge-commits mailing list