Confirm restart
This commit is contained in:
parent
dd8e443c15
commit
701dc9197c
|
@ -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;
|
||||
|
|
|
@ -57,6 +57,7 @@ public slots:
|
|||
void showOwnDeviceId();
|
||||
void showLog();
|
||||
void showNotifications();
|
||||
void restartSyncthing();
|
||||
void quitTray();
|
||||
|
||||
private slots:
|
||||
|
|
|
@ -539,7 +539,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.ui" line="107"/>
|
||||
<location filename="../gui/traywidget.cpp" line="267"/>
|
||||
<location filename="../gui/traywidget.cpp" line="274"/>
|
||||
<source>Connect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -571,7 +571,7 @@
|
|||
<message>
|
||||
<location filename="../gui/traywidget.ui" line="230"/>
|
||||
<location filename="../gui/traywidget.ui" line="250"/>
|
||||
<location filename="../gui/traywidget.cpp" line="408"/>
|
||||
<location filename="../gui/traywidget.cpp" line="415"/>
|
||||
<source>unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -658,37 +658,42 @@ For <i>all</i> notifications, checkout the log</source>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="268"/>
|
||||
<location filename="../gui/traywidget.cpp" line="250"/>
|
||||
<source>Do you really want to restart Syncthing?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="275"/>
|
||||
<source>Not connected to Syncthing, click to connect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="279"/>
|
||||
<location filename="../gui/traywidget.cpp" line="286"/>
|
||||
<source>Pause</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="280"/>
|
||||
<location filename="../gui/traywidget.cpp" line="287"/>
|
||||
<source>Syncthing is running, click to pause all devices</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="285"/>
|
||||
<location filename="../gui/traywidget.cpp" line="292"/>
|
||||
<source>Continue</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="286"/>
|
||||
<location filename="../gui/traywidget.cpp" line="293"/>
|
||||
<source>At least one device is paused, click to resume</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="357"/>
|
||||
<location filename="../gui/traywidget.cpp" line="364"/>
|
||||
<source>The directory <i>%1</i> does not exist on the local machine.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="366"/>
|
||||
<location filename="../gui/traywidget.cpp" line="373"/>
|
||||
<source>The file <i>%1</i> does not exist on the local machine.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -539,7 +539,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.ui" line="107"/>
|
||||
<location filename="../gui/traywidget.cpp" line="267"/>
|
||||
<location filename="../gui/traywidget.cpp" line="274"/>
|
||||
<source>Connect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -571,7 +571,7 @@
|
|||
<message>
|
||||
<location filename="../gui/traywidget.ui" line="230"/>
|
||||
<location filename="../gui/traywidget.ui" line="250"/>
|
||||
<location filename="../gui/traywidget.cpp" line="408"/>
|
||||
<location filename="../gui/traywidget.cpp" line="415"/>
|
||||
<source>unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -658,37 +658,42 @@ For <i>all</i> notifications, checkout the log</source>
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="268"/>
|
||||
<location filename="../gui/traywidget.cpp" line="250"/>
|
||||
<source>Do you really want to restart Syncthing?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="275"/>
|
||||
<source>Not connected to Syncthing, click to connect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="279"/>
|
||||
<location filename="../gui/traywidget.cpp" line="286"/>
|
||||
<source>Pause</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="280"/>
|
||||
<location filename="../gui/traywidget.cpp" line="287"/>
|
||||
<source>Syncthing is running, click to pause all devices</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="285"/>
|
||||
<location filename="../gui/traywidget.cpp" line="292"/>
|
||||
<source>Continue</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="286"/>
|
||||
<location filename="../gui/traywidget.cpp" line="293"/>
|
||||
<source>At least one device is paused, click to resume</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="357"/>
|
||||
<location filename="../gui/traywidget.cpp" line="364"/>
|
||||
<source>The directory <i>%1</i> does not exist on the local machine.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/traywidget.cpp" line="366"/>
|
||||
<location filename="../gui/traywidget.cpp" line="373"/>
|
||||
<source>The file <i>%1</i> does not exist on the local machine.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
Loading…
Reference in New Issue