rpms/libnotify/devel libnotify-closed-reason.patch, NONE, 1.1 libnotify.spec, 1.36, 1.37

Matthias Clasen mclasen at fedoraproject.org
Sun Aug 24 01:30:48 UTC 2008


Author: mclasen

Update of /cvs/extras/rpms/libnotify/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5547

Modified Files:
	libnotify.spec 
Added Files:
	libnotify-closed-reason.patch 
Log Message:
Handled extra parameter of closed signal


libnotify-closed-reason.patch:

--- NEW FILE libnotify-closed-reason.patch ---
diff -U0 libnotify-0.4.4/ChangeLog.closed-reason libnotify-0.4.4/ChangeLog
--- libnotify-0.4.4/ChangeLog.closed-reason	2007-02-28 05:11:47.000000000 +0000
+++ libnotify-0.4.4/ChangeLog	2008-08-14 15:35:07.000000000 +0100
@@ -0,0 +1,10 @@
+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.
+
diff -up libnotify-0.4.4/libnotify/notification.c.closed-reason libnotify-0.4.4/libnotify/notification.c
--- libnotify-0.4.4/libnotify/notification.c.closed-reason	2008-08-14 15:34:40.000000000 +0100
+++ libnotify-0.4.4/libnotify/notification.c	2008-08-14 15:35:07.000000000 +0100
@@ -47,7 +47,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 @@ notify_notification_class_init(NotifyNot
 					 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_SUMMARY,
 		g_param_spec_string("summary", "Summary",
@@ -678,13 +678,13 @@ notify_notification_set_geometry_hints(N
 }
 
 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));
 	}
diff -up libnotify-0.4.4/libnotify/notification.h.closed-reason libnotify-0.4.4/libnotify/notification.h
--- libnotify-0.4.4/libnotify/notification.h.closed-reason	2008-08-14 15:34:40.000000000 +0100
+++ libnotify-0.4.4/libnotify/notification.h	2008-08-14 15:35:07.000000000 +0100
@@ -63,7 +63,7 @@ struct _NotifyNotificationClass
 	GObjectClass parent_class;
 
 	/* Signals */
-	void (*closed)(NotifyNotification *notification);
+	void (*closed)(NotifyNotification *notification, gint reason);
 };
 
 /*
diff -up libnotify-0.4.4/libnotify/notify.c.closed-reason libnotify-0.4.4/libnotify/notify.c
--- libnotify-0.4.4/libnotify/notify.c.closed-reason	2007-02-15 10:28:46.000000000 +0000
+++ libnotify-0.4.4/libnotify/notify.c	2008-08-14 15:35:07.000000000 +0100
@@ -72,13 +72,19 @@ notify_init(const char *app_name)
 									   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);
diff -up libnotify-0.4.4/libnotify/notify-marshal.list.closed-reason libnotify-0.4.4/libnotify/notify-marshal.list
--- libnotify-0.4.4/libnotify/notify-marshal.list.closed-reason	2006-01-11 07:49:04.000000000 +0000
+++ libnotify-0.4.4/libnotify/notify-marshal.list	2008-08-14 15:35:07.000000000 +0100
@@ -1 +1,2 @@
+VOID:UINT,UINT
 VOID:UINT,STRING
diff -up libnotify-0.4.4/NEWS.closed-reason libnotify-0.4.4/NEWS
--- libnotify-0.4.4/NEWS.closed-reason	2007-02-28 05:07:27.000000000 +0000
+++ libnotify-0.4.4/NEWS	2008-08-14 15:35:07.000000000 +0100
@@ -1,6 +1,8 @@
 version 0.4.4 (27-February-2007):
 	* Fixed a bug where a notification's ID could be reset when a different
 	  notification was closed. Patch by jylefort. (Bug #94)
+	* Added support for sending the closed reason in the "closed" signal
+	  handler. (Ticket #139)
 	* Fixed a crash when the D-BUS proxy was not being freed on notify_uninit,
 	  which was problematic when used in a loadable module. (Bug #92)
 	* Fixed a crash when a signal handler for the notification's closed signal


Index: libnotify.spec
===================================================================
RCS file: /cvs/extras/rpms/libnotify/devel/libnotify.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- libnotify.spec	10 Jun 2008 16:48:25 -0000	1.36
+++ libnotify.spec	24 Aug 2008 01:30:18 -0000	1.37
@@ -8,11 +8,13 @@
 Summary: libnotify notification library 
 Name: libnotify 
 Version: 0.4.4
-Release: 11%{?dist}
+Release: 12%{?dist}
 URL: http://www.galago-project.org/specs/notification/ 
 Source0: http://www.galago-project.org/files/releases/source/%{name}/%{name}-%{version}.tar.bz2 
 # Sent upstream via email
 Patch0: libnotify-send-xid-2.patch
+# From upstream, changeset 3005
+Patch1: libnotify-closed-reason.patch
 License: LGPLv2+
 Group: System Environment/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
@@ -47,6 +49,7 @@
 %prep
 %setup -q
 %patch0 -p0 -b .send-xid
+%patch1 -p1 -b .closed-reason
 
 %build
 
@@ -87,6 +90,9 @@
 %{_datadir}/gtk-doc/html/libnotify/*
 
 %changelog
+* Sat Aug 23 2008 Matthias Clasen <mclasen at redhat.com> - 0.4.4-12
+- Handle extra parameter of the closed signal
+
 * Tue Jun 10 2008 Colin Walters <walters at redhat.com> - 0.4.4-11
 - Add patch neccessary for reliable notification positioning
 




More information about the fedora-extras-commits mailing list