mainwindow.cpp
changeset 781 6cbf3c9cbd21
parent 777 8acac4fade1b
child 782 ffb02a9bb508
     1.1 --- a/mainwindow.cpp	Tue Jul 07 11:21:27 2009 +0000
     1.2 +++ b/mainwindow.cpp	Wed Jul 22 11:48:23 2009 +0000
     1.3 @@ -1,6 +1,5 @@
     1.4  #include "mainwindow.h"
     1.5  
     1.6 -#include <QtDBus/QtDBus>
     1.7  #include <QtGui>
     1.8  
     1.9  #include <iostream>
    1.10 @@ -38,6 +37,7 @@
    1.11  
    1.12  extern TextEditor *textEditor;
    1.13  extern Main *mainWindow;
    1.14 +extern QDBusConnection dbusConnection;
    1.15  extern QString tmpVymDir;
    1.16  extern QString clipboardDir;
    1.17  extern QString clipboardFile;
    1.18 @@ -229,6 +229,14 @@
    1.19  
    1.20  	updateGeometry();
    1.21  
    1.22 +	//Initialize DBUS
    1.23 +	new Adaptor (this);
    1.24 +    dbusConnection = QDBusConnection::sessionBus();
    1.25 +    dbusConnection.registerObject("/MainWindow", this);
    1.26 +    dbusConnection.registerService("org.insilmaril.vym");
    1.27 +
    1.28 +
    1.29 +
    1.30  }
    1.31  
    1.32  Main::~Main()