summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-03-04 20:04:14 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2017-03-04 20:04:14 -0600
commitd04a35d8c1c707d6fd79e03490e9d8bdd7022be1 (patch)
treef6ce96e8a5aeca3639c65629aa84b3b8760d9bf3
parentd09ca7b8ba18bee70e4b0c2f3b7774c28c15f256 (diff)
downloadhorizon-qt5-d04a35d8c1c707d6fd79e03490e9d8bdd7022be1.tar.gz
horizon-qt5-d04a35d8c1c707d6fd79e03490e9d8bdd7022be1.tar.bz2
horizon-qt5-d04a35d8c1c707d6fd79e03490e9d8bdd7022be1.tar.xz
horizon-qt5-d04a35d8c1c707d6fd79e03490e9d8bdd7022be1.zip
NetworkingPage: Determine whether Wireless or Wired should be shown next
-rw-r--r--networkingpage.cc24
1 files changed, 20 insertions, 4 deletions
diff --git a/networkingpage.cc b/networkingpage.cc
index c7860ff..d2d4195 100644
--- a/networkingpage.cc
+++ b/networkingpage.cc
@@ -17,9 +17,8 @@ NetworkingPage::NetworkingPage(QWidget *parent) : HorizonWizardPage(parent)
"If you have a normal network connection where your "
"computer is directly connected to the Internet via "
"Ethernet or Wi-Fi using a modem or router, choose "
- "Simple. If you have a more complicated network "
- "configuration, you need to set a static IP address, "
- "or you use a VPN, choose Advanced.\n\n"
+ "Simple. If you need to set a static IP address, "
+ "or you use a VPN or proxy server, choose Advanced.\n\n"
"If you don't want to configure networking or you "
"don't want to use this computer on the Internet, "
@@ -64,7 +63,24 @@ int NetworkingPage::nextId() const
{
if(radioGroup->checkedButton() == simple)
{
- return HorizonWizard::Page_Network_SimpleWired;
+ bool tryWireless = false;
+
+ for(auto &iface : this->horizonWizard()->interfaces)
+ {
+ if(iface.is_wireless())
+ {
+ tryWireless = true;
+ }
+ }
+
+ if(tryWireless)
+ {
+ return HorizonWizard::Page_Network_SimpleWireless;
+ }
+ else
+ {
+ return HorizonWizard::Page_Network_SimpleWired;
+ }
}
else if(radioGroup->checkedButton() == advanced)
{