unconfusinating the core edit dialog
[quassel.git] / src / qtui / coreconnectdlg.cpp
index 909592e..9932c8f 100644 (file)
 #include "clientsyncer.h"
 #include "coreconfigwizard.h"
 
-CoreConnectDlg::CoreConnectDlg(QWidget *parent, bool autoconnect) : QDialog(parent) {
+CoreConnectDlg::CoreConnectDlg(QWidget *parent, bool autoconnect)
+  : QDialog(parent)
+{
   ui.setupUi(this);
 
+  // make it look more native under Mac OS X:
+  setWindowFlags(Qt::Sheet);
+
   clientSyncer = new ClientSyncer(this);
   wizard = 0;
 
@@ -47,6 +52,7 @@ CoreConnectDlg::CoreConnectDlg(QWidget *parent, bool autoconnect) : QDialog(pare
   foreach(AccountId id, s.knownAccounts()) {
     if(!id.isValid()) continue;
     QVariantMap data = s.retrieveAccountData(id);
+    data["AccountId"] = QVariant::fromValue<AccountId>(id);
     accounts[id] = data;
     QListWidgetItem *item = new QListWidgetItem(data["AccountName"].toString(), ui.accountList);
     item->setData(Qt::UserRole, QVariant::fromValue<AccountId>(id));
@@ -489,6 +495,14 @@ CoreAccountEditDlg::CoreAccountEditDlg(AccountId id, const QVariantMap &acct, co
     ui.useSsl->setEnabled(false);
 #endif
   }
+
+#ifndef BUILD_MONO
+  // if we don't have a mono build we hide the option to use the internal connection and force the setting to use remote host
+  ui.useInternal->setChecked(false);
+  ui.useInternal->hide();
+  ui.useRemote->hide();
+  ui.labelUseBuiltinCore->hide();
+#endif
 }
 
 QVariantMap CoreAccountEditDlg::accountData() {