summaryrefslogtreecommitdiffstats
path: root/src/extension/dbus/application-interface.cpp
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-09-18 05:22:47 +0000
committerJohn Smith <john.smith7545@yahoo.com>2012-09-18 05:22:47 +0000
commit9c19df4215cc73bf82049f7527cb2e85fc15d881 (patch)
treeeb3c4735ff8b48992a44d55e160eb4e1a19c4335 /src/extension/dbus/application-interface.cpp
parentFix for 1051434 : occasional crash when selecting disjoint path with markers (diff)
downloadinkscape-9c19df4215cc73bf82049f7527cb2e85fc15d881.tar.gz
inkscape-9c19df4215cc73bf82049f7527cb2e85fc15d881.zip
Fix for 818628 : DBUS Metadata for error domain warning when using File>New
(bzr r11674)
Diffstat (limited to '')
-rw-r--r--src/extension/dbus/application-interface.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/extension/dbus/application-interface.cpp b/src/extension/dbus/application-interface.cpp
index a652b7c96..8ee7bd12f 100644
--- a/src/extension/dbus/application-interface.cpp
+++ b/src/extension/dbus/application-interface.cpp
@@ -39,6 +39,9 @@ application_interface_class_init (ApplicationInterfaceClass *klass)
static void
application_interface_init (ApplicationInterface *object)
{
+ dbus_g_error_domain_register (INKSCAPE_ERROR,
+ NULL,
+ INKSCAPE_TYPE_ERROR);
}
@@ -48,6 +51,44 @@ application_interface_new (void)
return (ApplicationInterface*)g_object_new (TYPE_APPLICATION_INTERFACE, NULL);
}
+/*
+ * Error stuff...
+ *
+ * To add a new error type, edit here and in the .h InkscapeError enum.
+ */
+GQuark
+inkscape_error_quark (void)
+{
+ static GQuark quark = 0;
+ if (!quark)
+ quark = g_quark_from_static_string ("inkscape_error");
+
+ return quark;
+}
+
+#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
+
+GType inkscape_error_get_type(void)
+{
+ static GType etype = 0;
+
+ if (etype == 0) {
+ static const GEnumValue values[] =
+ {
+
+ ENUM_ENTRY(INKSCAPE_ERROR_SELECTION, "Incompatible_Selection"),
+ ENUM_ENTRY(INKSCAPE_ERROR_OBJECT, "Incompatible_Object"),
+ ENUM_ENTRY(INKSCAPE_ERROR_VERB, "Failed_Verb"),
+ ENUM_ENTRY(INKSCAPE_ERROR_OTHER, "Generic_Error"),
+ { 0, 0, 0 }
+ };
+
+ etype = g_enum_register_static("InkscapeError", values);
+ }
+
+ return etype;
+}
+
/****************************************************************************
DESKTOP FUNCTIONS
****************************************************************************/