--- libnotify-0.4.5.orig/debian/rules +++ libnotify-0.4.5/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk +include /usr/share/cdbs/1/class/gnome.mk +include /usr/share/gnome-pkg-tools/1/rules/clean-la.mk + +LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed + +DEB_DH_MAKESHLIBS_ARGS_libnotify1 := -V "libnotify1 (>= 0.4.5), libnotify1-gtk2.10" + --- libnotify-0.4.5.orig/debian/libnotify-bin.install +++ libnotify-0.4.5/debian/libnotify-bin.install @@ -0,0 +1 @@ +debian/tmp/usr/bin/notify-send --- libnotify-0.4.5.orig/debian/changelog +++ libnotify-0.4.5/debian/changelog @@ -0,0 +1,254 @@ +libnotify (0.4.5-1ubuntu3) lucid; urgency=low + + * debian/patches/03_lazy_init.patch: Fix return values in the failure cases, + and add upstream bug link. + + -- Martin Pitt Tue, 23 Feb 2010 22:13:50 +0100 + +libnotify (0.4.5-1ubuntu2) lucid; urgency=low + + * Add 03_lazy_init.patch: Do not spawn the D-Bus notification backend right + away, but initialize it lazily. This avoids needlessly spawning the daemon + at session start already. + + -- Martin Pitt Tue, 23 Feb 2010 15:58:52 +0100 + +libnotify (0.4.5-1ubuntu1) karmic; urgency=low + + * Add support for v0.10 of the notification spec. (lp: #408940) + + -- Aurélien Gâteau Tue, 04 Aug 2009 17:56:34 +0200 + +libnotify (0.4.5-1) unstable; urgency=low + + [ Loic Minier ] + * Include clean-la.mk; build-dep on gnome-pkg-tools >= 0.7. + + [ Sebastian Dröge ] + * debian/control: + + Add myself to uploaders. + + Update Standards-Version to 3.8.0. + + Use ${binary:Version} instead of ${Source-Version} to make the + package binNMU save. + * New upstream release (Closes: #510931): + + Fixes include of non-toplevel header of GTK (Closes: #508329). + + debian/rules: + - Update shlibs to >= 0.4.5 for new API. + + debian/control: + - Build-depend on dbus-glib >= 0.76. + * debian/patches/01_hurd-path-max.patch: + + Fix FTBFS on hurd-i386, thanks to Michael Banck for the patch. + (Closes: #483157). + * debian/patches/99_ltmain_as-needed.patch: + + Remove some unneeded dependencies from the library by using + --as-needed for linking. + + -- Sebastian Dröge Thu, 05 Mar 2009 08:11:37 +0100 + +libnotify (0.4.4-3) unstable; urgency=low + + * Drop GNOME team from uploaders and uploaders.mk include; add myself to + uploaders. + * Merge never uploaded 0.4.3-3 changelog entry into 0.4.4-1. + * Set LDFLAGS directly instead of via DEB_CONFIGURE_SCRIPT_ENV; build-dep on + cdbs >= 0.4.41. + * Add ${misc:Depends}. + * Wrap build-deps and deps. + * Prepend -z defs to LDFLAGS to be safe with --as-needed. + + -- Loic Minier Mon, 16 Apr 2007 10:15:43 +0200 + +libnotify (0.4.4-2) experimental; urgency=low + + * Built against libgtk2.0-0 > 2.10. + + -- Riccardo Setti Sat, 24 Mar 2007 15:31:52 +0100 + +libnotify (0.4.4-1) unstable; urgency=low + + [ Loic Minier ] + * Fix the 0.4.2-2 changelog entry to reflect the real 0.4.2-2 upload to + experimental and its changes; move the changes which were listed in this + changelog entry to 0.4.3-1 where these happened. + + [ Riccardo Setti ] + * New upstream release. + + -- Riccardo Setti Sat, 24 Mar 2007 15:30:06 +0100 + +libnotify (0.4.3-2) experimental; urgency=low + + [ Riccardo Setti ] + * Build against libgtk2.0-dev >= 2.10; let libnotify-dev provide + libnotify-dev-gtk2.10 for the Gtk 2.10 specific API; let libnotify1 + provide libnotify1-gtk2.10 for the Gtk 2.10 specific ABI; set libnotify1's + shlibs to "libnotify1 (>= 0.4.3), libnotify1-gtk2.10". + + [ Loic Minier ] + * Fix the above changelog entry. + * Merge 0.4.3-1. + + -- Loic Minier Thu, 30 Nov 2006 22:01:28 +0100 + +libnotify (0.4.3-1) unstable; urgency=low + + [ Riccardo Setti ] + * New upstream release + + [ Loic Minier ] + * Bump up libgtk2.0-dev and libglib2.0-dev build-deps to >= 2.6; bump up the + dependency of libnotify-dev on libgtk2.0-dev as well; add a libglib2.0-dev + dependency to libnotify-dev. + + [ Marco Cabizza ] + * libnotify-dev depends on libgtk2.0-dev, thanks to Christophe Mutricy + (Closes: #388521) + + -- Loic Minier Thu, 30 Nov 2006 21:54:53 +0100 + +libnotify (0.4.2-2) experimental; urgency=low + + * Built it against libgtk2.0-dev (>= 2.10) + * Uploaded to experimental + + -- Riccardo Setti Wed, 13 Sep 2006 21:24:59 +0200 + +libnotify (0.4.2-1) unstable; urgency=low + + * New Upstream release. (closes: #375182) + * Improved notify-send manpage. (closes: #379175) + * Added libnotify-doc package. + + -- Gustavo Franco Fri, 25 Aug 2006 15:40:39 -0300 + +libnotify (0.4.0-2) UNRELEASED; urgency=low + + * Re-add empty patch system. + + -- Loic Minier Sun, 21 May 2006 12:42:59 +0200 + +libnotify (0.4.0-1) unstable; urgency=low + + * New upstream release. + * debian/patches/notify-send_ppc.patch: removed + (bug fixed by upstream) + * debian/rules: simple-patchsys include removed, + there are no patches left. + * debian/control: + + Bump up Standards Version to 3.7.2 + + Fix lintian warning replacing > by >= + - obsolete-relation-form depends: libdbus-glib-1-dev (> 0.35) + + -- Gustavo Franco Tue, 16 May 2006 10:33:01 -0300 + +libnotify (0.3.2-4) unstable; urgency=low + + * Apply patch from Heikki Henriksen (heikkih): + + rebuild without references to libXcursor.la & libXrender.la + (Closes: #363966) + + debian/control[.in]: Add dep on libdbus-glib-1-dev for libnotify-dev + (Closes: #359316, #359710) + + debian/watch: Added + + -- Jose Carlos Garcia Sogo Fri, 21 Apr 2006 14:14:17 +0200 + +libnotify (0.3.2-3) unstable; urgency=low + + * Improved notify-send.1 manpage. (closes: #353681) + - thanks goes to Paul van Tilburg for providing + a patch. + - -t switch specifies the timeout in millisecond and not in + second. (closes: #353683) + + -- Riccardo Setti Tue, 21 Feb 2006 21:06:55 +0100 + +libnotify (0.3.2-2) unstable; urgency=low + + * Added notify-send_ppc.patch which fix a bug in notify-send (libnotify-bin) on + ppc. Thank to to Sjoerd Simons who provides a patch. (closes: #352514) + + -- Riccardo Setti Sat, 18 Feb 2006 19:34:05 +0100 + +libnotify (0.3.2-1) unstable; urgency=low + + Riccardo Setti (giskard): + * New upstream (closes: #343437) + * notifynotification.h doesn't exist anymore and config.h is + defined in an if condition (closes: #348799) + * removed eary_init.diff patch because the problem was corrected by upstream + in the new tarball. + + Gustavo Noronha (kov): + * Renamed library package to libnotify1 to match soname change + + -- Gustavo Noronha Silva Sun, 29 Jan 2006 09:08:10 -0200 + +libnotify (0.3.0-1) unstable; urgency=low + + * New upstream release + * debian/patches/early_init.diff: + - patch grabbed from Ubuntu's package: + "- call dbus_g_bus_get() on init to initialize the dbus<->glib type + system and fix a crash on certain use" + * debian/control.in: + - updated build-depends: libgtk2.0-dev >= 2.2.2, and + libdbus-glib-1-dev >= 0.35 + + -- Gustavo Noronha Silva Fri, 13 Jan 2006 00:10:33 -0200 + +libnotify (0.2.2-1) experimental; urgency=low + + * First upload to Debian + + Andre Filipe de Assuncao e Brito: + * New upstream release Closes: #335590 + * debian/copyright: + - Updated URL Project to: + http://www.galago-project.org/files/releases/source/ + * Remove debian/patches/01_malloc_int_overflow.patch: + - Applied Upstream + * Added notify-send manpage. + + Gustavo Noronha Silva: + * debian/control.in, debian/rules: + - correctly Build-Deps for cdbs, debhelper, and GNOME Team + Upload stuff + * debian/copyright: + - added missing information about notify-send being GPL'ed + + -- Gustavo Noronha Silva Sun, 13 Nov 2005 20:47:46 -0200 + +libnotify (0.2.1-0ubuntu4) breezy; urgency=low + + * debian/patches/01_malloc_int_overflow.patch: Fix copy&paste bug in the + second hunk, we allocate a char* array (not a size_t array) there. + + -- Martin Pitt Wed, 10 Aug 2005 13:41:26 +0200 + +libnotify (0.2.1-0ubuntu3) breezy; urgency=low + + * debian/control: Recommend notification-daemon and point out the + requirement to install it in the long description. + + -- Martin Pitt Wed, 10 Aug 2005 10:53:26 +0200 + +libnotify (0.2.1-0ubuntu2) breezy; urgency=low + + * Add debian/patches/01_malloc_int_overflow.patch: + - Check for integer overflow in icon frame allocation, just to be + cautious. + + -- Martin Pitt Tue, 9 Aug 2005 19:57:27 +0200 + +libnotify (0.2.1-0ubuntu1) breezy; urgency=low + + * New upstream version. + + -- Sebastien Bacher Thu, 28 Jul 2005 20:45:16 +0200 + +libnotify (0.2.0-0ubuntu1) breezy; urgency=low + + * Initial package. + + -- Sebastien Bacher Thu, 28 Jul 2005 15:26:46 +0200 + --- libnotify-0.4.5.orig/debian/notify-send.1 +++ libnotify-0.4.5/debian/notify-send.1 @@ -0,0 +1,38 @@ +.TH USAGE: "1" "November 2005" "notify-send 0.2.2" "User Commands" +.SH NAME +notify-send - a program to send desktop notifications +.SH SYNOPSIS +.B notify-send +[\fIOPTIONS\fR]\fI \fR[\fIbody\fR] +.SH DESCRIPTION +With \fInotify-send\fR you can sends desktop notifications to the user via +a notification daemon from the command line. These notifications can be +used to inform the user about an event or display some form of information +without getting in the user's way. +.SH OPTIONS +\fB\-u, \-\-urgency=LEVEL\fR +Specifies the urgency level (low, normal, critical). +.TP +\fB\-t, \-\-expire-time=TIME\fR +Specifies the timeout in milliseconds at which to expire the notification. +.TP +\fB\-i, \-\-icon=ICON[,ICON...]\fR +Specifies an icon filename or stock icon to display. +.TP +\fB\-c, \-\-category=TYPE[,TYPE...]\fR +Specifies the notification category. +.TP +.SS "Help options:" +.TP +\-?, \fB\-\-help\fR +Show this help message +.TP +\fB\-h, \-\-hint=TYPE:NAME:VALUE\fR +Specifies basic extra data to pass. Valid types are int, double, string and byte. +.TP +.SH SEE ALSO +The Desktop Notification Spec on http://www.galago-project.org/specs/notification/. +.SH AUTHOR +This manual page was written by Andre Filipe de Assuncao e Brito and +Paul van Tilburg and Riccardo Setti +for the Debian project (but may be used by others). --- libnotify-0.4.5.orig/debian/watch +++ libnotify-0.4.5/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://www.galago-project.org/files/releases/source/libnotify/libnotify-(.*)\.tar\.gz debian uupdate --- libnotify-0.4.5.orig/debian/libnotify-bin.manpages +++ libnotify-0.4.5/debian/libnotify-bin.manpages @@ -0,0 +1 @@ +debian/notify-send.1 --- libnotify-0.4.5.orig/debian/copyright +++ libnotify-0.4.5/debian/copyright @@ -0,0 +1,51 @@ +This package was debianized by Sebastien Bacher on +Thu, 28 Jul 2005 15:26:46 +0200. + +It was downloaded from http://www.galago-project.org/files/releases/source/ + +The libnotify library is under the following conditions: + +Copyright Holder: Christian Hammond + Mike Hearn + +License: + + This package is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU Lesser General +Public License can be found in `/usr/share/common-licenses/LGPL'. + +The notify-send binary, built from the source at tools/notify-send.c is +the following conditions: + +Copyright Holder: 2004, Christian Hammond + +License: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. --- libnotify-0.4.5.orig/debian/libnotify-dev.install +++ libnotify-0.4.5/debian/libnotify-dev.install @@ -0,0 +1,5 @@ +debian/tmp/usr/include/* +debian/tmp/usr/lib/lib*.a +debian/tmp/usr/lib/lib*.so +debian/tmp/usr/lib/pkgconfig/* +debian/tmp/usr/lib/*.la --- libnotify-0.4.5.orig/debian/compat +++ libnotify-0.4.5/debian/compat @@ -0,0 +1 @@ +5 --- libnotify-0.4.5.orig/debian/libnotify-doc.install +++ libnotify-0.4.5/debian/libnotify-doc.install @@ -0,0 +1 @@ +debian/tmp/usr/share/gtk-doc/html/libnotify --- libnotify-0.4.5.orig/debian/libnotify1.install +++ libnotify-0.4.5/debian/libnotify1.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/lib*.so.* --- libnotify-0.4.5.orig/debian/control +++ libnotify-0.4.5/debian/control @@ -0,0 +1,76 @@ +Source: libnotify +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Andre Filipe de Assuncao e Brito +Build-Depends: gnome-pkg-tools (>= 0.7), + cdbs (>= 0.4.41), + debhelper (>= 5), + libgtk2.0-dev (>= 2.10), + libglib2.0-dev (>= 2.6), + libdbus-glib-1-dev (>= 0.76), + libpopt-dev +Uploaders: Loic Minier , Riccardo Setti , Sebastian Dröge +Standards-Version: 3.8.0 +Section: libs + +Package: libnotify-dev +Section: libdevel +Architecture: any +Depends: ${misc:Depends}, + libnotify1 (= ${binary:Version}), + libdbus-glib-1-dev (>= 0.35), + libgtk2.0-dev (>= 2.10), + libglib2.0-dev (>= 2.6) +Provides: libnotify-dev-gtk2.10 +Description: sends desktop notifications to a notification daemon + A library that sends desktop notifications to a notification daemon, as + defined in the Desktop Notifications spec. These notifications can be + used to inform the user about an event or display some form of + information without getting in the user's way. + . + This package contains the include files and static library. + +Package: libnotify1 +Section: libs +Architecture: any +Depends: ${misc:Depends}, + ${shlibs:Depends} +Provides: libnotify1-gtk2.10 +Recommends: notification-daemon +Description: sends desktop notifications to a notification daemon + A library that sends desktop notifications to a notification daemon, as + defined in the Desktop Notifications spec. These notifications can be + used to inform the user about an event or display some form of + information without getting in the user's way. + . + This package contains the shared library. To actually display the + notifications, you need to install the package notification-daemon. + +Package: libnotify-bin +Section: utils +Architecture: any +Depends: ${misc:Depends}, + ${shlibs:Depends} +Description: sends desktop notifications to a notification daemon + A library that sends desktop notifications to a notification daemon, as + defined in the Desktop Notifications spec. These notifications can be + used to inform the user about an event or display some form of + information without getting in the user's way. + . + This package contains the binary which sends the notification. + +Package: libnotify-doc +Section: doc +Architecture: all +Depends: ${misc:Depends}, + ${shlibs:Depends} +Suggests: devhelp +Description: sends desktop notifications to a notification daemon + A library that sends desktop notifications to a notification daemon, as + defined in the Desktop Notifications spec. These notifications can be + used to inform the user about an event or display some form of + information without getting in the user's way. + . + This package contains the documentation for libnotify1 in + /usr/share/gtk-doc/html/libnotify . + --- libnotify-0.4.5.orig/debian/patches/03_lazy_init.patch +++ libnotify-0.4.5/debian/patches/03_lazy_init.patch @@ -0,0 +1,114 @@ +Description: Do not spawn the D-Bus notification backend right away, but initialize it lazily. This avoids needlessly spawning the daemon at session start already. +Author: Martin Pitt +Origin: Ubuntu +Bug: http://trac.galago-project.org/ticket/199 +diff -Nur -x '*.orig' -x '*~' libnotify-0.4.5/libnotify/notify.c libnotify-0.4.5.new/libnotify/notify.c +--- libnotify-0.4.5/libnotify/notify.c 2010-02-23 22:12:47.330758764 +0100 ++++ libnotify-0.4.5.new/libnotify/notify.c 2010-02-23 22:13:07.968806550 +0100 +@@ -68,9 +68,6 @@ + gboolean + notify_init(const char *app_name) + { +- GError *error = NULL; +- DBusGConnection *bus = NULL; +- + g_return_val_if_fail(app_name != NULL, FALSE); + g_return_val_if_fail(*app_name != '\0', FALSE); + +@@ -81,44 +78,6 @@ + + g_type_init(); + +- bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error); +- +- if (error != NULL) +- { +- g_message("Unable to get session bus: %s", error->message); +- g_error_free(error); +- return FALSE; +- } +- +- _proxy = dbus_g_proxy_new_for_name(bus, +- NOTIFY_DBUS_NAME, +- NOTIFY_DBUS_CORE_OBJECT, +- 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_UINT, +- G_TYPE_INVALID); +- dbus_g_proxy_add_signal(_proxy, "ActionInvoked", +- G_TYPE_UINT, G_TYPE_STRING, +- G_TYPE_INVALID); +- +- if (!_notify_update_spec_version()) +- { +- g_message("Error getting spec version"); +- return FALSE; +- } +- + _initted = TRUE; + + return TRUE; +@@ -197,6 +156,51 @@ + DBusGProxy * + _notify_get_g_proxy(void) + { ++ GError *error = NULL; ++ DBusGConnection *bus = NULL; ++ ++ if (_proxy != NULL) ++ return _proxy; ++ ++ /* lazily initialize D-Bus connection */ ++ bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error); ++ ++ if (error != NULL) ++ { ++ g_message("Unable to get session bus: %s", error->message); ++ g_error_free(error); ++ return NULL; ++ } ++ ++ _proxy = dbus_g_proxy_new_for_name(bus, ++ NOTIFY_DBUS_NAME, ++ NOTIFY_DBUS_CORE_OBJECT, ++ 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_UINT, ++ G_TYPE_INVALID); ++ dbus_g_proxy_add_signal(_proxy, "ActionInvoked", ++ G_TYPE_UINT, G_TYPE_STRING, ++ G_TYPE_INVALID); ++ ++ if (!_notify_update_spec_version()) ++ { ++ g_message("Error getting spec version"); ++ return NULL; ++ } ++ + return _proxy; + } + --- libnotify-0.4.5.orig/debian/patches/99_ltmain_as-needed.patch +++ libnotify-0.4.5/debian/patches/99_ltmain_as-needed.patch @@ -0,0 +1,30 @@ +--- ltmain.sh.old 2007-10-09 07:38:25.000000000 +0200 ++++ ltmain.sh 2007-10-09 07:39:25.000000000 +0200 +@@ -1794,6 +1794,11 @@ + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + ++ -Wl,--as-needed) ++ deplibs="$deplibs $arg" ++ continue ++ ;; ++ + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= +@@ -2137,6 +2142,15 @@ + lib= + found=no + case $deplib in ++ -Wl,--as-needed) ++ if test "$linkmode,$pass" = "prog,link"; then ++ compile_deplibs="$deplib $compile_deplibs" ++ finalize_deplibs="$deplib $finalize_deplibs" ++ else ++ deplibs="$deplib $deplibs" ++ fi ++ continue ++ ;; + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" --- libnotify-0.4.5.orig/debian/patches/01_hurd-path-max.patch +++ libnotify-0.4.5/debian/patches/01_hurd-path-max.patch @@ -0,0 +1,24 @@ +--- libnotify-0.4.4.orig/tests/test-image.c ++++ libnotify-0.4.4/tests/test-image.c +@@ -45,7 +45,7 @@ + int + main(int argc, char *argv[]) + { +- char file[PATH_MAX]; ++ gchar *file; + int size; + char *uri; + GdkPixbuf *icon; +@@ -68,10 +68,10 @@ + + g_object_unref(G_OBJECT(n)); + +- size = readlink("/proc/self/cwd", file, PATH_MAX - 1); +- file[size] = '\0'; ++ file = g_get_current_dir(); + uri = g_strdup_printf("file://%s/%s", file, "applet-critical.png"); + ++ g_free(file); + printf("sending %s\n", uri); + + /* URIs */ --- libnotify-0.4.5.orig/debian/patches/02_support-for-notification-spec-0.10.patch +++ libnotify-0.4.5/debian/patches/02_support-for-notification-spec-0.10.patch @@ -0,0 +1,90 @@ +From c6f46e8a757e40773f7767ec2d645032b9442569 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Aur=C3=A9lien=20G=C3=A2teau?= +Date: Mon, 22 Jun 2009 10:57:31 +0200 +Subject: [PATCH] Support for image_data hint + +--- + libnotify/internal.h | 1 + + libnotify/notification.c | 4 +++- + libnotify/notify.c | 30 ++++++++++++++++++++++++++++++ + 3 files changed, 34 insertions(+), 1 deletions(-) + +diff --git a/libnotify/internal.h b/libnotify/internal.h +index 697f64a..e0a689d 100644 +--- a/libnotify/internal.h ++++ b/libnotify/internal.h +@@ -46,6 +46,7 @@ void _notify_cache_remove_notification(NotifyNotification *n); + gint _notify_notification_get_timeout(const NotifyNotification *n); + gboolean _notify_notification_has_nondefault_actions( + const NotifyNotification *n); ++gboolean _notify_check_spec_version(int major, int minor); + + G_END_DECLS + +diff --git a/libnotify/notification.c b/libnotify/notification.c +index 0a5051d..9341941 100644 +--- a/libnotify/notification.c ++++ b/libnotify/notification.c +@@ -1011,8 +1011,10 @@ notify_notification_set_icon_from_pixbuf(NotifyNotification *notification, + g_value_init(value, G_TYPE_VALUE_ARRAY); + g_value_set_boxed_take_ownership(value, image_struct); + ++ char *hint_name = _notify_check_spec_version(0, 10) ++ ? "image_data" : "icon_data"; + g_hash_table_insert(notification->priv->hints, +- g_strdup("icon_data"), value); ++ g_strdup(hint_name), value); + #else /* D-BUS < 0.60 */ + g_warning("Raw images and pixbufs require D-BUS >= 0.60"); + #endif +diff --git a/libnotify/notify.c b/libnotify/notify.c +index c0c7b21..7dd74d5 100644 +--- a/libnotify/notify.c ++++ b/libnotify/notify.c +@@ -32,6 +32,30 @@ static gchar *_app_name = NULL; + static DBusGProxy *_proxy = NULL; + static DBusGConnection *_dbus_gconn = NULL; + static GList *_active_notifications = NULL; ++static int _spec_version_major = 0; ++static int _spec_version_minor = 0; ++ ++gboolean ++_notify_check_spec_version(int major, int minor) ++{ ++ if (_spec_version_major > major) ++ return TRUE; ++ if (_spec_version_major < major) ++ return FALSE; ++ return _spec_version_minor >= minor; ++} ++ ++static gboolean ++_notify_update_spec_version(void) ++{ ++ char* spec_version; ++ if (!notify_get_server_info(NULL, NULL, NULL, &spec_version)) ++ return FALSE; ++ ++ sscanf(spec_version, "%d.%d", &_spec_version_major, &_spec_version_minor); ++ g_free(spec_version); ++ return TRUE; ++} + + /** + * notify_init: +@@ -89,6 +113,12 @@ notify_init(const char *app_name) + G_TYPE_UINT, G_TYPE_STRING, + G_TYPE_INVALID); + ++ if (!_notify_update_spec_version()) ++ { ++ g_message("Error getting spec version"); ++ return FALSE; ++ } ++ + _initted = TRUE; + + return TRUE; +-- +1.6.0.4 +