X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=main%2Fmain_mono.cpp;h=d9c682f4322c58298b9da5816358909b12b11e57;hb=0d5499deed248902ce2341208cbc33acd8cace19;hp=7700b27f57284be5a1475f15847120434bf05582;hpb=117a8a4d7ced61a3e374f20c74bea1834386a1d7;p=quassel.git diff --git a/main/main_mono.cpp b/main/main_mono.cpp index 7700b27f..d9c682f4 100644 --- a/main/main_mono.cpp +++ b/main/main_mono.cpp @@ -1,7 +1,7 @@ /*************************************************************************** - * Copyright (C) 2005 by The Quassel Team * + * Copyright (C) 2005-07 by The Quassel IRC Development Team * * devel@quassel-irc.org * - * * + * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * @@ -23,47 +23,70 @@ #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" int main(int argc, char **argv) { QApplication app(argc, argv); - QApplication::setOrganizationDomain("quassel-irc.org"); - QApplication::setApplicationName("Quassel IRC"); - QApplication::setOrganizationName("The Quassel Team"); + QCoreApplication::setOrganizationDomain("quassel-irc.org"); + QCoreApplication::setApplicationName("Quassel IRC"); + QCoreApplication::setOrganizationName("Quassel IRC Development Team"); Global::runMode = Global::Monolithic; Global::quasselDir = QDir::homePath() + "/.quassel"; - global = new Global(); + //settings = new Settings(); + //global = new Global(); guiProxy = new GUIProxy(); - coreProxy = new CoreProxy(); - core = new Core(); + //coreProxy = new CoreProxy(); + QObject::connect(Core::guiSession(), SIGNAL(proxySignal(CoreSignal, QVariant, QVariant, QVariant)), guiProxy, SLOT(recv(CoreSignal, QVariant, QVariant, QVariant))); + QObject::connect(guiProxy, SIGNAL(send(GUISignal, QVariant, QVariant, QVariant)), Core::guiSession(), SLOT(processSignal(GUISignal, QVariant, QVariant, QVariant))); + + Settings::init(); + Style::init(); - MainWin mainWin; - mainWin.show(); + MainWin *mainWin = new MainWin(); + mainWin->show(); + mainWin->init(); int exitCode = app.exec(); - delete core; + //delete core; + Core::destroy(); delete guiProxy; - delete coreProxy; - delete global; + //delete coreProxy; + //delete global; + delete mainWin; + //delete settings; return exitCode; } +void MainWin::syncToCore() { + //Q_ASSERT(Global::data("CoreReady").toBool()); + coreBuffers = Core::guiSession()->buffers(); + // 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) { coreProxy->recv(sig, arg1, arg2, arg3); } +*/ // Dummy function definitions // These are not needed, since we don't have a network connection to the core.