From: Marcus Eggenberger Date: Tue, 21 Oct 2008 16:26:59 +0000 (+0200) Subject: hiding internal connection mode in client only build X-Git-Tag: 0.3.1~136 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=81b7a767c2e8066ca560001c4e69073daaa77272 hiding internal connection mode in client only build --- diff --git a/src/qtui/coreconnectdlg.cpp b/src/qtui/coreconnectdlg.cpp index d61a0211..953b8da2 100644 --- a/src/qtui/coreconnectdlg.cpp +++ b/src/qtui/coreconnectdlg.cpp @@ -29,6 +29,7 @@ #include "clientsyncer.h" #include "coreconfigwizard.h" #include "iconloader.h" +#include "quassel.h" CoreConnectDlg::CoreConnectDlg(bool autoconnect, QWidget *parent) : QDialog(parent) @@ -40,6 +41,10 @@ CoreConnectDlg::CoreConnectDlg(bool autoconnect, QWidget *parent) ui.connectIcon->setPixmap(BarIcon("network-disconnect")); ui.secureConnection->setPixmap(SmallIcon("document-encrypt")); + if(Quassel::runMode() != Quassel::Monolithic) { + ui.useInternalCore->hide(); + } + // make it look more native under Mac OS X: setWindowFlags(Qt::Sheet); @@ -216,13 +221,6 @@ void CoreConnectDlg::on_accountButtonBox_accepted() { } void CoreConnectDlg::on_useInternalCore_clicked() { -// // FIXME: this needs to be a qobject_cast - therefore MonolithicApplication needs to be a proper QObject... :/ -// MonolithicApplication *monoApp = qobject_cast(QApplication::instance()); -// if(monoApp) { -// qDebug() << "starting core..."; -// monoApp->startInternalCore(); -// monoApp->connectClientSyncer(clientSyncer); -// } clientSyncer->useInternalCore(); startSync(); } @@ -466,7 +464,6 @@ CoreAccountEditDlg::CoreAccountEditDlg(AccountId id, const QVariantMap &acct, co existing.removeAll(acct["AccountName"].toString()); ui.host->setText(acct["Host"].toString()); ui.port->setValue(acct["Port"].toUInt()); - ui.useInternal->setChecked(acct["UseInternal"].toBool()); ui.accountName->setText(acct["AccountName"].toString()); #ifdef HAVE_SSL ui.useSsl->setChecked(acct["useSsl"].toBool()); @@ -487,21 +484,12 @@ 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() { account["AccountName"] = ui.accountName->text().trimmed(); account["Host"] = ui.host->text().trimmed(); account["Port"] = ui.port->value(); - account["UseInternal"] = ui.useInternal->isChecked(); account["useSsl"] = ui.useSsl->isChecked(); account["useProxy"] = ui.useProxy->isChecked(); account["proxyHost"] = ui.proxyHost->text().trimmed(); @@ -513,7 +501,7 @@ QVariantMap CoreAccountEditDlg::accountData() { } void CoreAccountEditDlg::setWidgetStates() { - bool ok = !ui.accountName->text().trimmed().isEmpty() && !existing.contains(ui.accountName->text()) && (ui.useInternal->isChecked() || !ui.host->text().isEmpty()); + bool ok = !ui.accountName->text().trimmed().isEmpty() && !existing.contains(ui.accountName->text()) && !ui.host->text().isEmpty(); ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(ok); } @@ -526,8 +514,3 @@ void CoreAccountEditDlg::on_accountName_textChanged(const QString &text) { Q_UNUSED(text); setWidgetStates(); } - -void CoreAccountEditDlg::on_useRemote_toggled(bool state) { - Q_UNUSED(state); - setWidgetStates(); -} diff --git a/src/qtui/coreconnectdlg.h b/src/qtui/coreconnectdlg.h index ae3d5b76..7abaac9c 100644 --- a/src/qtui/coreconnectdlg.h +++ b/src/qtui/coreconnectdlg.h @@ -112,7 +112,6 @@ public: private slots: void on_host_textChanged(const QString &); void on_accountName_textChanged(const QString &); - void on_useRemote_toggled(bool); void setWidgetStates(); diff --git a/src/qtui/ui/coreaccounteditdlg.ui b/src/qtui/ui/coreaccounteditdlg.ui index 7c67ef68..be88b7a8 100644 --- a/src/qtui/ui/coreaccounteditdlg.ui +++ b/src/qtui/ui/coreaccounteditdlg.ui @@ -5,8 +5,8 @@ 0 0 - 514 - 534 + 509 + 458 @@ -42,63 +42,27 @@ - - - false - - - - - - - - - - false - - - Use built-in Quassel Core - - - useInternal - - - - - - - - - - true - - - - Hostname: - - useRemote - - + Port: - + localhost - + 1 @@ -111,13 +75,13 @@ - + Use secure connection (SSL) - + :/16x16/actions/oxygen/16x16/actions/document-encrypt.png:/16x16/actions/oxygen/16x16/actions/document-encrypt.png @@ -280,53 +244,5 @@ - - useInternal - toggled(bool) - host - setDisabled(bool) - - - 63 - 100 - - - 92 - 143 - - - - - useInternal - toggled(bool) - port - setDisabled(bool) - - - 63 - 100 - - - 400 - 144 - - - - - useRemote - clicked(bool) - host - setFocus() - - - 59 - 126 - - - 184 - 146 - - -