diff --git a/tray/gui/traywidget.cpp b/tray/gui/traywidget.cpp
index 72331b2..4887bad 100644
--- a/tray/gui/traywidget.cpp
+++ b/tray/gui/traywidget.cpp
@@ -127,7 +127,7 @@ TrayWidget::TrayWidget(TrayMenu *parent) :
connect(viewIdButton, &QPushButton::clicked, this, &TrayWidget::showOwnDeviceId);
connect(showLogButton, &QPushButton::clicked, this, &TrayWidget::showLog);
connect(m_ui->notificationsPushButton, &QPushButton::clicked, this, &TrayWidget::showNotifications);
- connect(restartButton, &QPushButton::clicked, &m_connection, &SyncthingConnection::restart);
+ connect(restartButton, &QPushButton::clicked, this, &TrayWidget::restartSyncthing);
connect(m_connectionsActionGroup, &QActionGroup::triggered, this, &TrayWidget::handleConnectionSelected);
}
@@ -245,6 +245,13 @@ void TrayWidget::showNotifications()
m_ui->notificationsPushButton->setHidden(true);
}
+void TrayWidget::restartSyncthing()
+{
+ if(QMessageBox::warning(this, QCoreApplication::applicationName(), tr("Do you really want to restart Syncthing?"), QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
+ m_connection.restart();
+ }
+}
+
void TrayWidget::quitTray()
{
QObject *parent;
diff --git a/tray/gui/traywidget.h b/tray/gui/traywidget.h
index c6f590f..fde1733 100644
--- a/tray/gui/traywidget.h
+++ b/tray/gui/traywidget.h
@@ -57,6 +57,7 @@ public slots:
void showOwnDeviceId();
void showLog();
void showNotifications();
+ void restartSyncthing();
void quitTray();
private slots:
diff --git a/tray/translations/syncthingtray_de_DE.ts b/tray/translations/syncthingtray_de_DE.ts
index 4888c22..fa816c4 100644
--- a/tray/translations/syncthingtray_de_DE.ts
+++ b/tray/translations/syncthingtray_de_DE.ts
@@ -539,7 +539,7 @@
-
+
@@ -571,7 +571,7 @@
-
+
@@ -658,37 +658,42 @@ For <i>all</i> notifications, checkout the log
-
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/tray/translations/syncthingtray_en_US.ts b/tray/translations/syncthingtray_en_US.ts
index 8f5ef4f..9e7017d 100644
--- a/tray/translations/syncthingtray_en_US.ts
+++ b/tray/translations/syncthingtray_en_US.ts
@@ -539,7 +539,7 @@
-
+
@@ -571,7 +571,7 @@
-
+
@@ -658,37 +658,42 @@ For <i>all</i> notifications, checkout the log
-
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+