index a30bb8fda0fed56d426af22ca9b063559fca78f0..2ae606940d6736c4a3c9d9416f698a17ab4cd449 100644 (file)
-
+/*
+ * 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 <Glimmer07@gmail.com>
+ *
+ * Copyright (C) 2009 Soren Berg
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
#include <dbus/dbus-glib.h>
#include "dbus-init.h"
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();
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;