From d04a35d8c1c707d6fd79e03490e9d8bdd7022be1 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 4 Mar 2017 20:04:14 -0600 Subject: NetworkingPage: Determine whether Wireless or Wired should be shown next --- networkingpage.cc | 24 ++++++++++++++++++++---- 1 file 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) { -- cgit v1.2.3-70-g09d2