gnome-power-manager-0.3 doesn't build with dbus-0.60



Hi,
gnome-power-manager-0.3 has the same error that rhythmbox, the
attached patch solves it.

I've opened a bugzilla item [1].

Regards,

[1] http://bugzilla.gnome.org/show_bug.cgi?id=323758

--
Eduard Carreras i Nadal <ecarreras gmail com>
http://iesdecelra.xtec.net/eduard
diff -ruN gnome-power-manager-0.3.0/src/gpm-dbus-common.c gnome-power-manager-0.3.0-patched/src/gpm-dbus-common.c
--- gnome-power-manager-0.3.0/src/gpm-dbus-common.c	2005-10-17 01:45:30.000000000 +0200
+++ gnome-power-manager-0.3.0-patched/src/gpm-dbus-common.c	2005-12-11 00:34:24.000000000 +0100
@@ -73,6 +73,7 @@
 	GError *error = NULL;
 	gboolean ret = TRUE;
 	guint request_name_result;
+	int flags;
 
 	/* assertion checks */
 	g_assert (connection);
@@ -82,10 +83,17 @@
 		DBUS_SERVICE_DBUS,
 		DBUS_PATH_DBUS,
 		DBUS_INTERFACE_DBUS);
-
+	
+#ifndef DBUS_NAME_FLAG_DO_NOT_QUEUE
+	flags = DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT;
+#else
+	flags = DBUS_NAME_FLAG_DO_NOT_QUEUE;
+#endif
+	
 	if (!dbus_g_proxy_call (bus_proxy, "RequestName", &error,
 		G_TYPE_STRING, service,
-		G_TYPE_UINT, DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT,
+		G_TYPE_UINT,
+		flags,
 		G_TYPE_INVALID,
 		G_TYPE_UINT, &request_name_result,
 		G_TYPE_INVALID)) {


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