[nautilus] freedesktop-dbus: use #defines for string literals



commit d78e3b35ab71d50f4934bdfb6ef165bbde79fb2e
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Jan 2 18:26:04 2013 +0100

    freedesktop-dbus: use #defines for string literals
    
    So that we can re-use these later.

 src/nautilus-freedesktop-dbus.c |    6 +++---
 src/nautilus-freedesktop-dbus.h |    4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-freedesktop-dbus.c b/src/nautilus-freedesktop-dbus.c
index 6754885..0fb5eb4 100644
--- a/src/nautilus-freedesktop-dbus.c
+++ b/src/nautilus-freedesktop-dbus.c
@@ -146,7 +146,7 @@ bus_acquired_cb (GDBusConnection *conn,
 
 	DEBUG ("Bus acquired at %s", name);
 
-	fdb->object_manager = g_dbus_object_manager_server_new ("/org/freedesktop/FileManager1");
+	fdb->object_manager = g_dbus_object_manager_server_new (NAUTILUS_FDO_DBUS_PATH);
 
 	fdb->skeleton = nautilus_freedesktop_file_manager1_skeleton_new ();
 
@@ -157,7 +157,7 @@ bus_acquired_cb (GDBusConnection *conn,
 	g_signal_connect (fdb->skeleton, "handle-show-item-properties",
 			  G_CALLBACK (skeleton_handle_show_item_properties_cb), fdb);
 
-	g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (fdb->skeleton), conn, "/org/freedesktop/FileManager1", NULL);
+	g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (fdb->skeleton), conn, NAUTILUS_FDO_DBUS_PATH, NULL);
 
 	g_dbus_object_manager_server_set_connection (fdb->object_manager, conn);
 }
@@ -211,7 +211,7 @@ static void
 nautilus_freedesktop_dbus_init (NautilusFreedesktopDBus *fdb)
 {
 	fdb->owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
-					"org.freedesktop.FileManager1",
+					NAUTILUS_FDO_DBUS_NAME,
 					G_BUS_NAME_OWNER_FLAGS_NONE,
 					bus_acquired_cb,
 					name_acquired_cb,
diff --git a/src/nautilus-freedesktop-dbus.h b/src/nautilus-freedesktop-dbus.h
index 14e8eb2..b415368 100644
--- a/src/nautilus-freedesktop-dbus.h
+++ b/src/nautilus-freedesktop-dbus.h
@@ -25,6 +25,10 @@
 
 #include <glib-object.h>
 
+#define NAUTILUS_FDO_DBUS_IFACE "org.freedesktop.FileManager1"
+#define NAUTILUS_FDO_DBUS_NAME  "org.freedesktop.FileManager1"
+#define NAUTILUS_FDO_DBUS_PATH  "/org/freedesktop/FileManager1"
+
 typedef struct _NautilusFreedesktopDBus NautilusFreedesktopDBus;
 typedef struct _NautilusFreedesktopDBusClass NautilusFreedesktopDBusClass;
 



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