diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index de6ff520..8d152f4e 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #if defined(Q_OS_MAC) #include @@ -48,6 +49,7 @@ #if defined(Q_OS_WIN) static const char synergyConfigName[] = "synergy.sgc"; static const QString synergyConfigFilter(QObject::tr("Synergy Configurations (*.sgc);;All files (*.*)")); +static const char BonjourUrl[] = "http://synergy-project.org/bonjour/BonjourPSSetup.exe"; #else static const char synergyConfigName[] = "synergy.conf"; static const QString synergyConfigFilter(QObject::tr("Synergy Configurations (*.conf);;All files (*.*)")); @@ -907,7 +909,7 @@ void MainWindow::on_m_pAutoConnectCheckBox_toggled(bool checked) QMessageBox::Yes | QMessageBox::No); if (r == QMessageBox::Yes) { - + downloadBonjour(); } else { m_pAutoConnectCheckBox->setChecked(false); @@ -969,3 +971,10 @@ bool MainWindow::isBonjourRunning() return result; } + +void MainWindow::downloadBonjour() +{ +#if defined(Q_OS_WIN) + QDesktopServices::openUrl(QUrl(BonjourUrl)); +#endif +} diff --git a/src/gui/src/MainWindow.h b/src/gui/src/MainWindow.h index 20cd3739..7e51267e 100644 --- a/src/gui/src/MainWindow.h +++ b/src/gui/src/MainWindow.h @@ -148,6 +148,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase void retranslateMenuBar(); bool isServiceRunning(QString name); bool isBonjourRunning(); + void downloadBonjour(); private: QSettings& m_Settings;