[glib/wip/gapplication] Switch to Gtk namespace



commit 08ca9ad736b07e066de34ee5b5aa913e8250487d
Author: Colin Walters <walters verbum org>
Date:   Thu May 27 16:41:07 2010 -0400

    Switch to Gtk namespace

 gio/gunixapplication.c |   14 +++++++-------
 gio/tests/testapps.c   |   22 +++++++++++-----------
 2 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/gio/gunixapplication.c b/gio/gunixapplication.c
index 7b56949..14b6171 100644
--- a/gio/gunixapplication.c
+++ b/gio/gunixapplication.c
@@ -88,7 +88,7 @@ application_dbus_method_call (GDBusConnection       *connection,
       if (!action)
         {
           char *errmsg  = g_strdup_printf ("Invalid action: %s", action_name);
-          g_dbus_method_invocation_return_dbus_error (invocation, "org.freedesktop.DBus.Application.InvalidAction", errmsg);
+          g_dbus_method_invocation_return_dbus_error (invocation, "org.gtk.Application.InvalidAction", errmsg);
           g_free (errmsg);
           return;
         }
@@ -204,7 +204,7 @@ static const GDBusSignalInfo * const application_dbus_signal_info_p[] = {
 static const GDBusInterfaceInfo application_dbus_interface_info =
 {
   -1,
-  "org.freedesktop.Application",
+  "org.gtk.Application",
   (GDBusMethodInfo **) application_dbus_method_info_p,
   (GDBusSignalInfo **) application_dbus_signal_info_p,
   NULL,
@@ -238,7 +238,7 @@ _g_application_platform_init (GApplication *app)
       return;
     }
     
-  registration_id = g_dbus_connection_register_object (priv->session_bus, "/org/freedesktop/Application",
+  registration_id = g_dbus_connection_register_object (priv->session_bus, "/org/gtk/Application",
                                                        &application_dbus_interface_info,
                                                        &application_dbus_vtable,
                                                        app, NULL,
@@ -294,8 +294,8 @@ static void
 _g_application_platform_on_actions_changed (GApplication *app)
 {
   g_dbus_connection_emit_signal (app->priv->session_bus, NULL,
-                                 "/org/freedesktop/Application",
-                                 "org.freedesktop.Application",
+                                 "/org/gtk/Application",
+                                 "org.gtk.Application",
                                  "ActionsChanged", NULL, NULL);
 }
 
@@ -307,8 +307,8 @@ _g_application_platform_remote_invoke_action (GApplication  *app,
   GVariant *result;
   result = g_dbus_connection_call_sync (app->priv->session_bus,
                                         app->priv->appid,
-                                        "/org/freedesktop/Application",
-                                        "org.freedesktop.Application",
+                                        "/org/gtk/Application",
+                                        "org.gtk.Application",
                                         "InvokeAction",
                                         g_variant_new ("(su)",
                                                        action,
diff --git a/gio/tests/testapps.c b/gio/tests/testapps.c
index 4ec31ee..89d21b0 100644
--- a/gio/tests/testapps.c
+++ b/gio/tests/testapps.c
@@ -129,8 +129,8 @@ quit_app (gpointer data)
   connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
   res = g_dbus_connection_call_sync (connection,
                                      "org.gtk.test.app",
-                                     "/org/freedesktop/Application",
-                                     "org.freedesktop.Application",
+                                     "/org/gtk/Application",
+                                     "org.gtk.Application",
                                      "Quit",
                                      g_variant_new ("(u)", 0),
                                      G_DBUS_CALL_FLAGS_NONE,
@@ -234,8 +234,8 @@ list_actions (void)
   connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
   res = g_dbus_connection_call_sync (connection,
                                      "org.gtk.test.app",
-                                     "/org/freedesktop/Application",
-                                     "org.freedesktop.Application",
+                                     "/org/gtk/Application",
+                                     "org.gtk.Application",
                                      "ListActions",
                                      NULL,
                                      G_DBUS_CALL_FLAGS_NONE,
@@ -293,8 +293,8 @@ test_list_actions (void)
   actions = list_actions ();
 
   g_assert (g_strv_length  (actions) == 2);
-  g_assert (_g_strv_has_string (actions, "action1"));
-  g_assert (_g_strv_has_string (actions, "action2"));
+  g_assert (_g_strv_has_string ((const char *const *)actions, "action1"));
+  g_assert (_g_strv_has_string ((const char *const *)actions, "action2"));
 
   g_strfreev (actions);
 
@@ -313,8 +313,8 @@ invoke_action (gpointer data)
   connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
   res = g_dbus_connection_call_sync (connection,
                                      "org.gtk.test.app",
-                                     "/org/freedesktop/Application",
-                                     "org.freedesktop.Application",
+                                     "/org/gtk/Application",
+                                     "org.gtk.Application",
                                      "InvokeAction",
                                      g_variant_new ("(su)",
                                                     action,
@@ -449,7 +449,7 @@ actions_changed (GDBusConnection *connection,
 {
   GMainLoop *loop = user_data;
 
-  g_assert_cmpstr (interface_name, ==, "org.freedesktop.Application");
+  g_assert_cmpstr (interface_name, ==, "org.gtk.Application");
   g_assert_cmpstr (signal_name, ==, "ActionsChanged");
 
   changed++;
@@ -490,9 +490,9 @@ test_change_action (void)
   connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
   id = g_dbus_connection_signal_subscribe (connection,
                                            NULL,
-                                           "org.freedesktop.Application",
+                                           "org.gtk.Application",
                                            "ActionsChanged",
-                                           "/org/freedesktop/Application",
+                                           "/org/gtk/Application",
                                            NULL,
                                            actions_changed,
                                            loop,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]