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

galago-commits at freedesktop.org galago-commits at freedesktop.org
Mon Jun 20 00:37:28 PDT 2005


Author: chipx86
Date: 2005-06-20 00:37:24 -0700 (Mon, 20 Jun 2005)
New Revision: 1961

Modified:
   trunk/notification-daemon/ChangeLog
   trunk/notification-daemon/src/main.cpp
Log:
Make actions work for D-BUS 0.2x again.


Modified: trunk/notification-daemon/ChangeLog
===================================================================
--- trunk/notification-daemon/ChangeLog	2005-06-20 07:27:50 UTC (rev 1960)
+++ trunk/notification-daemon/ChangeLog	2005-06-20 07:37:24 UTC (rev 1961)
@@ -1,3 +1,8 @@
+Mon Jun 20 00:36:02 PDT 2005  Christian Hammond <chipx86 at chipx86.com>
+
+	* src/main.cpp:
+	  - Make actions work for D-BUS 0.2x again.
+
 Mon Jun 20 04:03:11 PDT 2005  Christian Hammond <chipx86 at gnupdate.org>
 
 	* src/main.cpp:

Modified: trunk/notification-daemon/src/main.cpp
===================================================================
--- trunk/notification-daemon/src/main.cpp	2005-06-20 07:27:50 UTC (rev 1960)
+++ trunk/notification-daemon/src/main.cpp	2005-06-20 07:37:24 UTC (rev 1961)
@@ -252,13 +252,11 @@
 	dbus_message_iter_init_dict_iterator(&iter, &action_iter);
 #endif
 
-	while (dbus_message_iter_get_arg_type(&action_iter) ==
 #if NOTIFYD_CHECK_DBUS_VERSION(0, 30)
-		   DBUS_TYPE_DICT_ENTRY
+	while (dbus_message_iter_get_arg_type(&action_iter) == DBUS_TYPE_DICT_ENTRY)
 #else
-		   DBUS_TYPE_DICT
+	do
 #endif
-			   )
 	{
 		/*
 		 * Confusingly on the wire, the dict maps action text to ID,
@@ -275,7 +273,6 @@
 		dbus_message_iter_get_basic(&entry_iter, &actionid);
 #else
 		key = dbus_message_iter_get_dict_key(&action_iter);
-		dbus_message_iter_next(&action_iter);
 		actionid = dbus_message_iter_get_uint32(&action_iter);
 #endif
 
@@ -285,10 +282,13 @@
 
 #if !NOTIFYD_CHECK_DBUS_VERSION(0, 30)
 		dbus_free(key);
+#else
+		dbus_message_iter_next(&action_iter);
 #endif
-
-		dbus_message_iter_next(&action_iter);
 	}
+#if !NOTIFYD_CHECK_DBUS_VERSION(0, 30)
+	while (dbus_message_iter_next(&action_iter));
+#endif
 
     dbus_message_iter_next(&iter);
 



More information about the galago-commits mailing list