X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fextension%2Fdbus%2Fdbus-init.cpp;h=2ae606940d6736c4a3c9d9416f698a17ab4cd449;hb=9e3c85629496fe7ebe4296acb751b5b900c10e5b;hp=a30bb8fda0fed56d426af22ca9b063559fca78f0;hpb=c596be6d145df956e779f427dde5aabc8559dd6c;p=inkscape.git diff --git a/src/extension/dbus/dbus-init.cpp b/src/extension/dbus/dbus-init.cpp index a30bb8fda..2ae606940 100644 --- a/src/extension/dbus/dbus-init.cpp +++ b/src/extension/dbus/dbus-init.cpp @@ -1,4 +1,18 @@ - +/* + * This is where Inkscape connects to the DBus when it starts and + * registers the main interface. + * + * Also where new interfaces are registered when a new document is created. + * (Not called directly by application-interface but called indirectly.) + * + * Authors: + * Soren Berg + * + * Copyright (C) 2009 Soren Berg + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + #include #include "dbus-init.h" @@ -92,10 +106,10 @@ init_document (void) { DBusGProxy *proxy; SPDocument *doc; - doc = sp_document_new(NULL, 1, TRUE); + doc = SPDocument::createNewDoc(NULL, 1, TRUE); std::string name("/org/inkscape/"); - name.append(doc->name); + name.append(doc->getName()); std::replace(name.begin(), name.end(), ' ', '_'); connection = dbus_get_connection(); @@ -115,6 +129,9 @@ dbus_init_desktop_interface (SPDesktop * dt) DBusGConnection *connection; DBusGProxy *proxy; DocumentInterface *obj; + dbus_g_error_domain_register (INKSCAPE_ERROR, + NULL, + INKSCAPE_TYPE_ERROR); std::string name("/org/inkscape/desktop_"); std::stringstream out;