X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=main%2Fmain_mono.cpp;h=e12ad2e9e5dcfceb0469c138bea588a6fe43bf15;hp=7700b27f57284be5a1475f15847120434bf05582;hb=7a2708fff6cff5329002a3a16da266be51f1a3a1;hpb=117a8a4d7ced61a3e374f20c74bea1834386a1d7 diff --git a/main/main_mono.cpp b/main/main_mono.cpp index 7700b27f..e12ad2e9 100644 --- a/main/main_mono.cpp +++ b/main/main_mono.cpp @@ -23,9 +23,12 @@ #include #include "core.h" +#include "style.h" #include "global.h" #include "guiproxy.h" #include "coreproxy.h" +#include "settings.h" +#include "chatwidget.h" #include "mainwin.h" @@ -38,27 +41,40 @@ int main(int argc, char **argv) { Global::runMode = Global::Monolithic; Global::quasselDir = QDir::homePath() + "/.quassel"; + //settings = new Settings(); global = new Global(); guiProxy = new GUIProxy(); coreProxy = new CoreProxy(); - core = new Core(); - MainWin mainWin; - mainWin.show(); + Settings::init(); + Style::init(); + + MainWin *mainWin = new MainWin(); + mainWin->show(); + mainWin->init(); int exitCode = app.exec(); delete core; delete guiProxy; delete coreProxy; delete global; + delete mainWin; + //delete settings; return exitCode; } +void MainWin::syncToCore() { + Q_ASSERT(global->getData("CoreReady").toBool()); + coreBuffers = core->getBuffers(); + // NOTE: We don't need to request server states, because in the monolithic version there can't be + // any servers connected at this stage... +} + void CoreProxy::sendToGUI(CoreSignal sig, QVariant arg1, QVariant arg2, QVariant arg3) { guiProxy->recv(sig, arg1, arg2, arg3); } GUIProxy::GUIProxy() { - if(guiProxy) qFatal("Trying to instantiate more than one CoreProxy object!"); + if(guiProxy) qFatal("Trying to instantiate more than one GUIProxy object!"); } void GUIProxy::send(GUISignal sig, QVariant arg1, QVariant arg2, QVariant arg3) {