[Galago-commits] r2881 - in trunk/notification-daemon: . src

galago-commits at freedesktop.org galago-commits at freedesktop.org
Sat Jul 29 02:46:28 PDT 2006


Author: chipx86
Date: 2006-07-29 02:46:22 -0700 (Sat, 29 Jul 2006)
New Revision: 2881

Modified:
   trunk/notification-daemon/ChangeLog
   trunk/notification-daemon/NEWS
   trunk/notification-daemon/src/daemon.c
Log:
Patch by Ed Catmur to fix type validation for the icon data on D-BUS v0.61. This closes tickets #75 and #67.


Modified: trunk/notification-daemon/ChangeLog
===================================================================
--- trunk/notification-daemon/ChangeLog	2006-07-27 06:49:30 UTC (rev 2880)
+++ trunk/notification-daemon/ChangeLog	2006-07-29 09:46:22 UTC (rev 2881)
@@ -1,3 +1,9 @@
+Sat Jul 29 02:43:25 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
+
+	* src/daemon.c:
+	  - Patch by Ed Catmur to fix type validation for the icon data on
+	    D-BUS v0.61. This closes tickets #75 and #67.
+
 Wed Jul 26 23:44:24 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
 
 	* NEWS:

Modified: trunk/notification-daemon/NEWS
===================================================================
--- trunk/notification-daemon/NEWS	2006-07-27 06:49:30 UTC (rev 2880)
+++ trunk/notification-daemon/NEWS	2006-07-29 09:46:22 UTC (rev 2881)
@@ -1,4 +1,5 @@
 version 0.3.6:
+	* Fixed compatibility problems with D-BUS v0.61. (Bugs #67, #75)
 	* A notification's timeout will now pause while the mouse is hovering over
 	  the notification. This allows users to respond to notifications without
 	  it suddenly disappearing before the user clicks. (Ticket #73)

Modified: trunk/notification-daemon/src/daemon.c
===================================================================
--- trunk/notification-daemon/src/daemon.c	2006-07-27 06:49:30 UTC (rev 2880)
+++ trunk/notification-daemon/src/daemon.c	2006-07-29 09:46:22 UTC (rev 2881)
@@ -457,13 +457,27 @@
 	GValueArray *image_struct;
 	GValue *value;
 	GArray *tmp_array;
+#if CHECK_DBUS_VERSION(0, 61)
+	GType struct_type;
 
-	if (!G_VALUE_HOLDS(icon_data, G_TYPE_VALUE_ARRAY))
+	struct_type = dbus_g_type_get_struct(
+		"GValueArray",
+		G_TYPE_INT,
+		G_TYPE_INT,
+		G_TYPE_INT,
+		G_TYPE_BOOLEAN,
+		G_TYPE_INT,
+		G_TYPE_INT,
+		dbus_g_type_get_collection("GArray", G_TYPE_UCHAR),
+		G_TYPE_INVALID);
+
+	if (!G_VALUE_HOLDS(icon_data, struct_type))
 	{
 		g_warning("_notify_daemon_process_icon_data expected a "
 				  "GValue of type GValueArray");
 		return FALSE;
 	}
+#endif /* D-BUS >= 0.61 */
 
 	image_struct = (GValueArray *)g_value_get_boxed(icon_data);
 	value = g_value_array_get_nth(image_struct, 0);



More information about the galago-commits mailing list