Set initial focus to host input widget.
[quassel.git] / src / qtui / settingspages / networkssettingspage.cpp
index 6f15075..69f5c81 100644 (file)
@@ -28,6 +28,7 @@
 #include "iconloader.h"
 #include "identity.h"
 #include "network.h"
+#include "presetnetworks.h"
 #include "settingspagedlg.h"
 #include "util.h"
 
@@ -786,7 +787,7 @@ NetworkAddDlg::NetworkAddDlg(const QStringList &exist, QWidget *parent) : QDialo
     ui.useSSL->setIcon(SmallIcon("document-encrypt"));
 
     // read preset networks
-    QStringList networks = Network::presetNetworks();
+    QStringList networks = PresetNetworks::names();
     foreach(QString s, existing)
     networks.removeAll(s);
     if (networks.count())
@@ -810,7 +811,7 @@ NetworkInfo NetworkAddDlg::networkInfo() const
         return info;
     }
     else
-        return Network::networkInfoFromPreset(ui.presetList->currentText());
+        return PresetNetworks::networkInfo(ui.presetList->currentText());
 }
 
 
@@ -864,6 +865,7 @@ ServerEditDlg::ServerEditDlg(const Network::Server &server, QWidget *parent) : Q
     ui.setupUi(this);
     ui.useSSL->setIcon(SmallIcon("document-encrypt"));
     ui.host->setText(server.host);
+    ui.host->setFocus();
     ui.port->setValue(server.port);
     ui.password->setText(server.password);
     ui.useSSL->setChecked(server.useSsl);