Added the baseclass for the upcoming storage backends.
[quassel.git] / main / main_mono.cpp
index 268f3c1..e12ad2e 100644 (file)
@@ -27,6 +27,8 @@
 #include "global.h"
 #include "guiproxy.h"
 #include "coreproxy.h"
+#include "settings.h"
+#include "chatwidget.h"
 
 #include "mainwin.h"
 
@@ -39,25 +41,30 @@ 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();
 
+  Settings::init();
   Style::init();
 
-  MainWin mainWin;
-  mainWin.show();
+  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());
-  coreBackLog = core->getBackLog();
+  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...
 }
@@ -67,7 +74,7 @@ void CoreProxy::sendToGUI(CoreSignal sig, QVariant arg1, QVariant arg2, QVariant
 }
 
 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) {