Show server list when 2 or more servers detected
This commit is contained in:
parent
66a1ffa5f5
commit
2aec1223ae
|
@ -220,6 +220,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="m_pLabelScreenName">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="m_pLabelServerName">
|
||||
<property name="text">
|
||||
|
@ -233,13 +240,6 @@
|
|||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="m_pLineEditHostname"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="m_pLabelScreenName">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="m_pCheckBoxAutoConnect">
|
||||
<property name="text">
|
||||
|
@ -247,16 +247,22 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="m_pLabelServerList">
|
||||
<property name="text">
|
||||
<string>Server list:</string>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="m_pComboServerList">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="m_pComboServerList"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -117,6 +117,8 @@ MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig) :
|
|||
}
|
||||
|
||||
m_pCheckBoxAutoConnect->setChecked(appConfig.autoConnect());
|
||||
|
||||
m_pComboServerList->hide();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
@ -823,6 +825,10 @@ void MainWindow::serverDetected(const QString name)
|
|||
// Note: the first added item triggers startSynergy
|
||||
m_pComboServerList->addItem(name);
|
||||
}
|
||||
|
||||
if (m_pComboServerList->count() > 1) {
|
||||
m_pComboServerList->show();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_m_pGroupClient_toggled(bool on)
|
||||
|
|
Loading…
Reference in New Issue