Use macros for interface names
authorMike Gorse <mgorse@boston.site>
Mon, 16 Jun 2008 13:20:27 +0000 (09:20 -0400)
committerMike Gorse <mgorse@boston.site>
Mon, 16 Jun 2008 13:20:27 +0000 (09:20 -0400)
UpdateTree -> updateTreet o match spec
Check for text interface on all objects, not just objects that aren't EditableText

16 files changed:
atk-adaptor/accessible.c
atk-adaptor/action.c
atk-adaptor/application.c
atk-adaptor/bridge.c
atk-adaptor/component.c
atk-adaptor/document.c
atk-adaptor/editabletext.c
atk-adaptor/hyperlink.c
atk-adaptor/hypertext.c
atk-adaptor/image.c
atk-adaptor/introspectable.c
atk-adaptor/selection.c
atk-adaptor/table.c
atk-adaptor/text.c
atk-adaptor/tree.c
atk-adaptor/value.c

index 1fa809e..2051e22 100644 (file)
@@ -704,7 +704,7 @@ static DRouteProperty properties[] = {
 void
 spi_initialize_accessible (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.Accessible",
+  droute_add_interface (data, SPI_DBUS_INTERFACE_ACCESSIBLE,
                        methods, properties,
                        (DRouteGetDatumFunction) get_object_from_path, NULL);
 };
index 93a2695..9a09c2d 100644 (file)
@@ -116,7 +116,7 @@ DRouteMethod methods[] =
 void
 spi_initialize_action (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.Action",
+  droute_add_interface (data, SPI_DBUS_INTERFACE_ACTION,
                        methods, NULL,
                        (DRouteGetDatumFunction) get_action_from_path,
                        NULL);
index f43a000..5ae7196 100644 (file)
@@ -110,7 +110,7 @@ obj_is_root (const char *path, void *user_data)
 void
 spi_initialize_application (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.Application",
+  droute_add_interface (data, SPI_DBUS_INTERFACE_APPLICATION,
                        methods, properties,
                        (DRouteGetDatumFunction) obj_is_root, NULL);
 };
index 1374b99..6daccc6 100644 (file)
@@ -664,7 +664,7 @@ static void emit(AtkObject *object, const char *name, const char *detail, dbus_i
   {
     g_warning("Unknown type %d in property change signal", type);
   }
-  sig = dbus_message_new_signal(path, "org.freedesktop.atspi.Accessible", name);
+  sig = dbus_message_new_signal(path, SPI_DBUS_INTERFACE_ACCESSIBLE, name);
   dbus_message_iter_init_append(sig, &iter);
   if (!detail) detail = "";
   dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &detail);
@@ -698,7 +698,7 @@ static void emit_rect(AtkObject *object, const char *name, const char *detail, A
   y = rect->y;
   width = rect->width;
   height = rect->height;
-  sig = dbus_message_new_signal(path, "org.freedesktop.atspi.Accessible", name);
+  sig = dbus_message_new_signal(path, SPI_DBUS_INTERFACE_ACCESSIBLE, name);
   if (!detail) detail = "";
   if (sig)
     {
@@ -916,7 +916,7 @@ spi_init_keystroke_from_atk_key_event (Accessibility_DeviceEvent  *keystroke,
 
 static gboolean Accessibility_DeviceEventController_notifyListenersSync(const Accessibility_DeviceEvent *key_event)
 {
-  DBusMessage *message = dbus_message_new_method_call(SPI_DBUS_NAME_REGISTRY, SPI_DBUS_PATH_REGISTRY, "org.freedesktop.atspi.DeviceEventController", "notifyListenersSync");
+  DBusMessage *message = dbus_message_new_method_call(SPI_DBUS_NAME_REGISTRY, SPI_DBUS_PATH_REGISTRY, SPI_DBUS_INTERFACE_DEC);
   DBusError error;
   dbus_bool_t consumed = FALSE;
 
index 53cb3df..7cf0e23 100644 (file)
@@ -309,7 +309,7 @@ static DRouteMethod methods[] = {
 void
 spi_initialize_component (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.Component",
+  droute_add_interface (data, SPI_DBUS_INTERFACE_COMPONENT,
                        methods, NULL,
                        (DRouteGetDatumFunction) get_component_from_path,
                        NULL);
index f4fd592..e576e51 100644 (file)
@@ -143,7 +143,7 @@ static DRouteMethod methods[] = {
 void
 spi_initialize_document (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.Document",
+  droute_add_interface (data, SPI_DBUS_INTERFACE_DOCUMENT,
                        methods, NULL,
                        (DRouteGetDatumFunction) get_document_from_path,
                        NULL);
index e0b5ffb..4de77cb 100644 (file)
@@ -259,7 +259,7 @@ static DRouteMethod methods[] = {
 void
 spi_initialize_editabletext (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.EditableText",
+  droute_add_interface (data, SPI_DBUS_INTERFACE_EDITABLE_TEXT,
                        methods, NULL,
                        (DRouteGetDatumFunction) get_editable_from_path,
                        NULL);
index 95a70b3..1e6bb7b 100644 (file)
@@ -160,7 +160,7 @@ static DRouteProperty properties[] = {
 void
 spi_initialize_hyperlink (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.Hyperlink",
+  droute_add_interface (data, SPI_DBUS_INTERFACE_HYPERLINK,
                        methods, properties,
                        (DRouteGetDatumFunction) get_hyperlink_from_path,
                        NULL);
index 332b772..d8f8330 100644 (file)
@@ -119,7 +119,7 @@ static DRouteMethod methods[] = {
 void
 spi_initialize_hypertext (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.Hypertext",
+  droute_add_interface (data, SPI_DBUS_INTERFACE_HYPERTEXT,
                        methods, NULL,
                        (DRouteGetDatumFunction) get_hypertext_from_path,
                        NULL);
index 598ed3b..88a7e43 100644 (file)
@@ -155,7 +155,7 @@ static DRouteProperty properties[] = {
 void
 spi_initialize_image (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.Image", methods,
+  droute_add_interface (data, SPI_DBUS_INTERFACE_IMAGE, methods,
                        properties,
                        (DRouteGetDatumFunction) get_image_from_path, NULL);
 };
index 780ea7f..4781979 100644 (file)
@@ -53,33 +53,34 @@ impl_introspect (DBusConnection *bus, DBusMessage *message,
   
   g_string_append_printf(output, spi_introspection_node_element, path);
 
-  spi_append_interface(output, "org.freedesktop.atspi.Accessible");
+  spi_append_interface(output, SPI_DBUS_INTERFACE_ACCESSIBLE);
 
   if (ATK_IS_ACTION (object))
-      spi_append_interface(output, "org.freedesktop.atspi.Action");
+      spi_append_interface(output, SPI_DBUS_INTERFACE_ACTION);
 
   if (ATK_IS_COMPONENT (object))
-      spi_append_interface(output, "org.freedesktop.atspi.Component");
+      spi_append_interface(output, SPI_DBUS_INTERFACE_COMPONENT);
 
   if (ATK_IS_EDITABLE_TEXT (object))
-      spi_append_interface(output, "org.freedesktop.atspi.EditableText");
-  else if (ATK_IS_TEXT (object))
-      spi_append_interface(output, "org.freedesktop.atspi.Text");
+      spi_append_interface(output, SPI_DBUS_INTERFACE_EDITABLE_TEXT);
+
+  if (ATK_IS_TEXT (object))
+      spi_append_interface(output, SPI_DBUS_INTERFACE_TEXT);
 
   if (ATK_IS_HYPERTEXT (object))
-      spi_append_interface(output, "org.freedesktop.atspi.Hypertext");
+      spi_append_interface(output, SPI_DBUS_INTERFACE_HYPERTEXT);
 
   if (ATK_IS_IMAGE (object))
-      spi_append_interface(output, "org.freedesktop.atspi.Image");
+      spi_append_interface(output, SPI_DBUS_INTERFACE_IMAGE);
 
   if (ATK_IS_SELECTION (object))
-      spi_append_interface(output, "org.freedesktop.atspi.Selection");
+      spi_append_interface(output, SPI_DBUS_INTERFACE_SELECTION);
 
   if (ATK_IS_TABLE (object))
-      spi_append_interface(output, "org.freedesktop.atspi.Table");
+      spi_append_interface(output, SPI_DBUS_INTERFACE_TABLE);
 
   if (ATK_IS_VALUE (object))
-      spi_append_interface(output, "org.freedesktop.atspi.Value");
+      spi_append_interface(output, SPI_DBUS_INTERFACE_VALUE);
 
   if (ATK_IS_STREAMABLE_CONTENT (object))
       spi_append_interface(output, "org.freedesktop.atspi.StreamableContent");
@@ -87,11 +88,11 @@ impl_introspect (DBusConnection *bus, DBusMessage *message,
   if (ATK_IS_DOCUMENT (object))
     {
       spi_append_interface(output, "org.freedesktop.atspi.Collection");
-      spi_append_interface(output, "org.freedesktop.atspi.Document");
+      spi_append_interface(output, SPI_DBUS_INTERFACE_DOCUMENT);
     }
 
   if (ATK_IS_HYPERLINK_IMPL (object))
-      spi_append_interface(output, "org.freedesktop.atspi.Hyperlink");
+      spi_append_interface(output, SPI_DBUS_INTERFACE_HYPERLINK);
 
   g_string_append(output, spi_introspection_footer);
   final = g_string_free(output, FALSE);
index 3110c6e..aa84a4d 100644 (file)
@@ -269,7 +269,7 @@ static DRouteProperty properties[] = {
 void
 spi_initialize_selection (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.Selection",
+  droute_add_interface (data, SPI_DBUS_INTERFACE_SELECTION,
                        methods, properties,
                        (DRouteGetDatumFunction) get_selection_from_path,
                        NULL);
index 958fb93..83de354 100644 (file)
@@ -705,7 +705,7 @@ static DRouteProperty properties[] = {
 void
 spi_initialize_table (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.Table", methods,
+  droute_add_interface (data, SPI_DBUS_INTERFACE_TABLE, methods,
                        properties,
                        (DRouteGetDatumFunction) get_table_from_path, NULL);
 };
index 00ad9a9..72ee95a 100644 (file)
@@ -889,7 +889,7 @@ static DRouteProperty properties[] = {
 void
 spi_initialize_text (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.Text", methods,
+  droute_add_interface (data, SPI_DBUS_INTERFACE_TEXT, methods,
                        properties,
                        (DRouteGetDatumFunction) get_text_from_path, NULL);
 };
index 5c12747..a4a155d 100644 (file)
@@ -303,7 +303,7 @@ gboolean spi_dbus_update_cache(DRouteData *data)
 
   if (update_pending == 0) return FALSE;
 //printf("Sending cache\n");
-  message = dbus_message_new_signal("/org/freedesktop/atspi/tree", "org.freedesktop.atspi.Tree", "UpdateTree");
+  message = dbus_message_new_signal (SPI_DBUS_INTERFACE_TREE, "org.freedesktop.atspi.Tree", "updateTree");
   if (!message) goto done;
   dbus_message_iter_init_append (message, &iter);
   dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "(ooaoassus)",
index b022b59..5ace1a2 100644 (file)
@@ -256,7 +256,7 @@ static DRouteProperty properties[] = {
 void
 spi_initialize_value (DRouteData * data)
 {
-  droute_add_interface (data, "org.freedesktop.atspi.Value", NULL,
+  droute_add_interface (data, SPI_DBUS_INTERFACE_VALUE, NULL,
                        properties,
                        (DRouteGetDatumFunction) get_value_from_path, NULL);
 };