X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.cpp;h=522766b7d03acb670285eb03170a073b3119cabd;hp=6871ae013f87aa78f1cb56f2c4d941f87449cc1b;hb=bf86381e85cd97ef04a9dc45c2b1a063035391fa;hpb=aa1d373fe6a71c692586ff5898ce20c75682d5d0 diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index 6871ae01..522766b7 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -55,6 +55,7 @@ #include "clientbufferviewconfig.h" #include "clientbufferviewmanager.h" #include "clientignorelistmanager.h" +#include "coreconnectdlg.h" #include "coreconnection.h" #include "coreconnectionstatuswidget.h" #include "coreinfodlg.h" @@ -212,12 +213,11 @@ void MainWin::init() { // restore locked state of docks QtUi::actionCollection("General")->action("LockLayout")->setChecked(s.value("LockLayout", false).toBool()); - if(Quassel::runMode() != Quassel::Monolithic) { - //showCoreConnectionDlg(true); // autoconnect if appropriate - } else { - startInternalCore(); + CoreConnection *conn = Client::coreConnection(); + if(!conn->connectToCore()) { + // No autoconnect selected (or no accounts) + showCoreConnectionDlg(); } - Client::coreConnection()->start(); } MainWin::~MainWin() { @@ -831,6 +831,15 @@ void MainWin::startInternalCore() { } +void MainWin::showCoreConnectionDlg() { + CoreConnectDlg dlg(this); + if(dlg.exec() == QDialog::Accepted) { + AccountId accId = dlg.selectedAccount(); + if(accId.isValid()) + Client::coreConnection()->connectToCore(accId); + } +} + void MainWin::showChannelList(NetworkId netId) { ChannelListDlg *channelListDlg = new ChannelListDlg();