From 934824433db7e6606571dd521be57c134d41b653 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Wed, 8 Aug 2018 16:47:45 +0100 Subject: [PATCH] #6338 Auto Config hint widget with link to open Settings dialog --- src/gui/res/Synergy.qrc | 1 + src/gui/res/icons/16x16/auto-config.png | Bin 0 -> 610 bytes src/gui/src/MainWindow.cpp | 8 ++ src/gui/src/MainWindow.h | 2 + src/gui/src/MainWindowBase.ui | 93 +++++++++++++++++++++++- 5 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 src/gui/res/icons/16x16/auto-config.png diff --git a/src/gui/res/Synergy.qrc b/src/gui/res/Synergy.qrc index 8f8ac0c8..479b7a05 100644 --- a/src/gui/res/Synergy.qrc +++ b/src/gui/res/Synergy.qrc @@ -54,5 +54,6 @@ image/spinning-wheel.gif icons/16x16/padlock.png icons/16x16/synergy-transfering.png + icons/16x16/auto-config.png diff --git a/src/gui/res/icons/16x16/auto-config.png b/src/gui/res/icons/16x16/auto-config.png new file mode 100644 index 0000000000000000000000000000000000000000..88484f432f2e726ea84c16d4fcb3b393e2b815f0 GIT binary patch literal 610 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^xl_H+M9WCijSl0AZa z85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YDR+uenMVO6iP5s=4O z;1O92wCOqsGdgL^t^f+Mmw5WRvOnVB5M&q7?X!8zz`$tW>EaloaXxo~y*IO?z|s5X zF(R7RcBp4TfM(>^BM+*1GmJ>J60Ah=g`f*T|M#qy{3o#uexUa_%!K7#)5Bm zKecJN{?l;#z&P!&;({cFEmvo-X(+1S(KNit>LYDDQKgsb&%~|A)E`;Rvn~3Xm7lZj zv*J>VUm;v`q*Q{P$vdAN*DN9x?^ocrDJn>E4W7rN%w6Zt;Ja`fjG?OgO{t z2@Fov64!{5l*E!$tK_0oAjM#0U}&Lh074;#=2iygR)%KU21Zr}2K%Ca)uL#~%}>cp ztHiD0Je$)&paw~h4Z-BuF?hQAxvXhide(); m_pLineEditHostname->hide(); + m_pWidgetAutoConfig->hide(); } else { m_pLabelServerName->show(); @@ -1258,6 +1259,8 @@ void MainWindow::updateAutoConfigWidgets() m_pLabelAutoDetected->hide(); m_pComboServerList->hide(); + + m_pWidgetAutoConfig->show(); } } @@ -1403,3 +1406,8 @@ void MainWindow::secureSocket(bool secureSocket) m_pLabelPadlock->hide(); } } + +void MainWindow::on_m_pLabelAutoConfig_linkActivated(const QString &) +{ + m_pActionSettings->trigger(); +} diff --git a/src/gui/src/MainWindow.h b/src/gui/src/MainWindow.h index 4f881073..e267ccf2 100644 --- a/src/gui/src/MainWindow.h +++ b/src/gui/src/MainWindow.h @@ -237,6 +237,8 @@ private slots: void on_m_pButtonApply_clicked(); void on_windowShown(); + void on_m_pLabelAutoConfig_linkActivated(const QString &link); + signals: void windowShown(); }; diff --git a/src/gui/src/MainWindowBase.ui b/src/gui/src/MainWindowBase.ui index b4f6bb1c..42f44dd6 100644 --- a/src/gui/src/MainWindowBase.ui +++ b/src/gui/src/MainWindowBase.ui @@ -129,6 +129,81 @@ + + + + + 0 + 28 + + + + + 2 + + + 0 + + + 0 + + + 8 + + + + + + 0 + 0 + + + + + 16 + 20 + + + + + 244 + 16777215 + + + + + + + :/res/icons/16x16/auto-config.png + + + + + + + <html><head/><body><p>Manual Config mode active, consider using Auto Config instead (<a href="#"><span style=" text-decoration: underline; color:#007af4;">Settings</span></a>)</p></body></html> + + + Qt::RichText + + + + + + + Qt::Horizontal + + + + 200 + 0 + + + + + + + @@ -314,12 +389,24 @@ + + + 0 + 0 + + + + + 200 + 0 + + Hostname or IP address of the server computer. - + @@ -329,13 +416,13 @@ - 120 + 200 0 - + Server: