[Galago-commits] r3005 - in trunk/libnotify: . libnotify

galago-commits at freedesktop.org galago-commits at freedesktop.org
Tue Mar 18 21:53:31 PDT 2008


Author: chipx86
Date: 2008-03-18 21:53:30 -0700 (Tue, 18 Mar 2008)
New Revision: 3005

Modified:
   trunk/libnotify/ChangeLog
   trunk/libnotify/NEWS
   trunk/libnotify/libnotify/notification.c
   trunk/libnotify/libnotify/notification.h
   trunk/libnotify/libnotify/notify-marshal.list
   trunk/libnotify/libnotify/notify.c
Log:
Add support for sending the closed reason in the signal handler. Closes ticket #139.


Modified: trunk/libnotify/ChangeLog
===================================================================
--- trunk/libnotify/ChangeLog	2008-03-19 04:50:35 UTC (rev 3004)
+++ trunk/libnotify/ChangeLog	2008-03-19 04:53:30 UTC (rev 3005)
@@ -1,3 +1,13 @@
+Tue Mar 18 21:51:32 PDT 2008  Christian Hammond <chipx86 at chipx86.com>
+
+	* libnotify/notification.c:
+	* libnotify/notification.h:
+	* libnotify/notify.c:
+	* libnotify/notify-marshal.list:
+	* NEWS:
+	  - Add support for sending the closed reason in the signal handler.
+	    Closes ticket #139.
+
 Sat Aug 25 18:08:01 PDT 2007  Christian Hammond <chipx86 at chipx86.com>
 
 	* tools/notify-send.c:

Modified: trunk/libnotify/NEWS
===================================================================
--- trunk/libnotify/NEWS	2008-03-19 04:50:35 UTC (rev 3004)
+++ trunk/libnotify/NEWS	2008-03-19 04:53:30 UTC (rev 3005)
@@ -1,6 +1,8 @@
 version 0.4.5:
 	* Added GObject property accessors for notification IDs. Patch by Lucas
 	  Rocha.
+	* Added support for sending the closed reason in the "closed" signal
+	  handler. (Ticket #139)
 
 version 0.4.4 (27-February-2007):
 	* Fixed a bug where a notification's ID could be reset when a different

Modified: trunk/libnotify/libnotify/notification.c
===================================================================
--- trunk/libnotify/libnotify/notification.c	2008-03-19 04:50:35 UTC (rev 3004)
+++ trunk/libnotify/libnotify/notification.c	2008-03-19 04:53:30 UTC (rev 3005)
@@ -46,7 +46,7 @@
 static void notify_notification_class_init(NotifyNotificationClass *klass);
 static void notify_notification_init(NotifyNotification *sp);
 static void notify_notification_finalize(GObject *object);
-static void _close_signal_handler(DBusGProxy *proxy, guint32 id,
+static void _close_signal_handler(DBusGProxy *proxy, guint32 id, guint32 reason,
 								  NotifyNotification *notification);
 
 static void _action_signal_handler(DBusGProxy *proxy, guint32 id,
@@ -155,7 +155,7 @@
 					 G_SIGNAL_RUN_FIRST,
 					 G_STRUCT_OFFSET(NotifyNotificationClass, closed),
 					 NULL, NULL,
-					 g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+					 g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_INT);
 
 	g_object_class_install_property(object_class, PROP_ID,
 		g_param_spec_int("id", "ID",
@@ -691,13 +691,13 @@
 }
 
 static void
-_close_signal_handler(DBusGProxy *proxy, guint32 id,
+_close_signal_handler(DBusGProxy *proxy, guint32 id, guint32 reason,
 					  NotifyNotification *notification)
 {
 	if (id == notification->priv->id)
 	{
 		g_object_ref(G_OBJECT(notification));
-		g_signal_emit(notification, signals[SIGNAL_CLOSED], 0);
+		g_signal_emit(notification, signals[SIGNAL_CLOSED], 0, reason);
 		notification->priv->id = 0;
 		g_object_unref(G_OBJECT(notification));
 	}

Modified: trunk/libnotify/libnotify/notification.h
===================================================================
--- trunk/libnotify/libnotify/notification.h	2008-03-19 04:50:35 UTC (rev 3004)
+++ trunk/libnotify/libnotify/notification.h	2008-03-19 04:53:30 UTC (rev 3005)
@@ -63,7 +63,7 @@
 	GObjectClass parent_class;
 
 	/* Signals */
-	void (*closed)(NotifyNotification *notification);
+	void (*closed)(NotifyNotification *notification, gint reason);
 };
 
 /*

Modified: trunk/libnotify/libnotify/notify-marshal.list
===================================================================
--- trunk/libnotify/libnotify/notify-marshal.list	2008-03-19 04:50:35 UTC (rev 3004)
+++ trunk/libnotify/libnotify/notify-marshal.list	2008-03-19 04:53:30 UTC (rev 3005)
@@ -1 +1,2 @@
+VOID:UINT,UINT
 VOID:UINT,STRING

Modified: trunk/libnotify/libnotify/notify.c
===================================================================
--- trunk/libnotify/libnotify/notify.c	2008-03-19 04:50:35 UTC (rev 3004)
+++ trunk/libnotify/libnotify/notify.c	2008-03-19 04:53:30 UTC (rev 3005)
@@ -72,13 +72,19 @@
 									   NOTIFY_DBUS_CORE_INTERFACE);
 	dbus_g_connection_unref(bus);
 
+	dbus_g_object_register_marshaller(notify_marshal_VOID__UINT_UINT,
+									  G_TYPE_NONE,
+									  G_TYPE_UINT,
+									  G_TYPE_UINT, G_TYPE_INVALID);
+
 	dbus_g_object_register_marshaller(notify_marshal_VOID__UINT_STRING,
 									  G_TYPE_NONE,
 									  G_TYPE_UINT,
 									  G_TYPE_STRING, G_TYPE_INVALID);
 
 	dbus_g_proxy_add_signal(_proxy, "NotificationClosed",
-							G_TYPE_UINT, G_TYPE_INVALID);
+							G_TYPE_UINT, G_TYPE_UINT, 
+							G_TYPE_INVALID);
 	dbus_g_proxy_add_signal(_proxy, "ActionInvoked",
 							G_TYPE_UINT, G_TYPE_STRING,
 							G_TYPE_INVALID);



More information about the galago-commits mailing list