--- notification-daemon-0.4.0.orig/debian/control +++ notification-daemon-0.4.0/debian/control @@ -0,0 +1,43 @@ +Source: notification-daemon +Section: x11 +Priority: optional +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Andre Filipe de Assuncao e Brito +Uploaders: Riccardo Setti , + Sebastian Dröge +Build-Depends: cdbs (>= 0.4.23-1.1), + debhelper (>= 5), + libglib2.0-dev (>= 2.10), + libgtk2.0-dev (>= 2.10), + libdbus-1-dev (>= 0.36), + libdbus-glib-1-dev (>= 0.60), + libwnck-dev, + libpopt-dev, + intltool, + libsexy-dev (>= 0.1.3), + libgconf2-dev, + libnotify-dev, + libgconf2-dev, + libglade2-dev, + libgstreamer0.10-dev, + intltool, + autoconf, + automake1.9 +Standards-Version: 3.8.3 + +Package: notification-daemon +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends} +Conflicts: notify-daemon +Replaces: notify-daemon +Description: a daemon that displays passive pop-up notifications + The Desktop Notifications framework provides a standard way of doing + passive pop-up notifications on the Linux desktop. These are + designed to notify the user of something without interrupting their + work with a dialog box that they must close. Passive popups can + automatically disappear after a short period of time. as per the + Desktop Notifications spec + . + http://www.galago-project.org/specs/notification/index.php. + --- notification-daemon-0.4.0.orig/debian/rules +++ notification-daemon-0.4.0/debian/rules @@ -0,0 +1,29 @@ +#!/usr/bin/make -f + +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 + +LDFLAGS += -Wl,-z,defs -Wl,-O1 + +# 01_ubuntu_theme.patch requires regeneration of autoconf and automake files. +# +# It would be nice if we could just say: +# DEB_AUTO_UPDATE_AUTOMAKE := 1.9 +# DEB_AUTO_UPDATE_AUTOCONF := 2.61 +# but cdbs is currently hardwired to always run aclocal if running automake. +# So, we copy the rules from autotools-files.mk, and prune appropriately. + +common-configure-arch common-configure-indep:: debian/stamp-autotools-files +debian/stamp-autotools-files: + cd $(DEB_SRCDIR) && autoconf + cd $(DEB_SRCDIR) && automake-1.9 + cd $(DEB_SRCDIR) && touch aclocal.m4 # Avoid remaking by package's Makefile + touch debian/stamp-autotools-files + +clean:: + rm -f debian/stamp-autotools-files + +binary-install/notification-daemon:: + rm debian/notification-daemon/usr/lib/notification-daemon-1.0/engines/*.a + rm debian/notification-daemon/usr/lib/notification-daemon-1.0/engines/*.la --- notification-daemon-0.4.0.orig/debian/compat +++ notification-daemon-0.4.0/debian/compat @@ -0,0 +1 @@ +5 --- notification-daemon-0.4.0.orig/debian/notification-daemon.postinst +++ notification-daemon-0.4.0/debian/notification-daemon.postinst @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +case "$1" in + configure) + killall notification-daemon || true + ;; +esac + +#DEBHELPER# --- notification-daemon-0.4.0.orig/debian/copyright +++ notification-daemon-0.4.0/debian/copyright @@ -0,0 +1,48 @@ +This package was debianized by Sebastien Bacher on +Thu, 28 Jul 2005 16:15:45 +0200. + +It was downloaded from http://www.galago-project.org/downloads.php + +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 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,Boston, MA + 02110-1301, USA. + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The src/dbus-compat.h, sexy-url-label.h, and sexy-url-label.c files +are licensed under the following conditions: + + This library 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 library 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 library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + On Debian systems, the LGPL version 2 license can be found at + /usr/share/common-licenses/LGPL-2. --- notification-daemon-0.4.0.orig/debian/changelog +++ notification-daemon-0.4.0/debian/changelog @@ -0,0 +1,623 @@ +notification-daemon (0.4.0-2ubuntu2) lucid; urgency=low + + * really drop debian/patches/08_hide_properties_desktop.patch + + -- Michael Vogt Wed, 25 Nov 2009 16:51:14 +0100 + +notification-daemon (0.4.0-2ubuntu1) lucid; urgency=low + + * Merge from debian testing, remaining changes: + * build without "-Wl,--as-needed" to avoid crash on theme switching + * debian/patches/01_ubuntu_theme.patch: + - add ubuntu theme + * debian/patches/02_make_ubuntu_theme_default.patch: + - default to the ubuntu theme + * debian/patches/09_change_themes_crash_rev1.patch: + - fix crash on theme switching + * Dropped, now in debian: + * debian/patches/08_hide_properties_desktop.patch + + -- Michael Vogt Wed, 25 Nov 2009 16:31:10 +0100 + +notification-daemon (0.4.0-2) unstable; urgency=low + + * debian/patches/01_hide-capplet.patch: + + Hide the notification-daemon capplet (Closes: #522877). + * debian/control: + + Update Standards-Version to 3.8.3. + + -- Sebastian Dröge Thu, 08 Oct 2009 12:38:58 +0200 + +notification-daemon (0.4.0-1ubuntu3) karmic; urgency=low + + [ Max Bowsher ] + * Restore autotoolization accidentally dropped in -1ubuntu1 resulting in + 01_ubuntu_theme.patch not taking effect. + + [ Didier Roche ] + * Readd wrongly removed debian/control.in + + -- Didier Roche Tue, 25 Aug 2009 10:53:25 +0200 + +notification-daemon (0.4.0-1ubuntu2) karmic; urgency=low + + * Add support for v0.10 of the notification spec. (lp: #408941) + + -- Aurélien Gâteau Tue, 04 Aug 2009 18:05:50 +0200 + +notification-daemon (0.4.0-1ubuntu1) karmic; urgency=low + + * Merge from debian unstable, remaining changes: + - build without "-Wl,--as-needed" to avoid crash on theme switching + * debian/patches/01_ubuntu_theme.patch: + - add ubuntu theme + * debian/patches/02_make_ubuntu_theme_default.patch: + - default to the ubuntu theme + * debian/patches/09_change_themes_crash_rev1.patch: + - fix crash on theme switching + * debian/patches/08_hide_properties_desktop.patch: + - do not show notification-properties in the menu + + -- Michael Vogt Tue, 05 May 2009 16:41:29 +0200 + +notification-daemon (0.4.0-1) unstable; urgency=low + + * New upstream release (Closes: #510930, #344883): + + Fixes size requests so that all text is shown (Closes: #474236, #509346). + + Fixes xinerama issues (Closes: #474235). + + Properly escapes text (Closes: #496261). + + debian/patches/03_fix_xinerama_theme_c.patch: + - Dropped, fixed upstream. + + debian/control: + - Update build dependencies from configure.ac. + * debian/control: + + Remove GNOME team and add myself to Uploaders. + + Update Standards-Version to 3.8.0. + + Line-wrap dependencies, etc. + * debian/control, + debian/compat: + + Update to debhelper compat level 5. + * debian/patches/99_ltmain_as-needed.patch: + + Remove some unneeded dependencies. + * debian/patches/05_notification_spacing.patch: + + Add a small space between two notifications, + patch taken from the Ubuntu package (Closes: #450823). + * debian/patches/07_memleak_daemon.patch: + + Fix a small memory leak in the daemon, + patch taken from the Ubuntu package. + * debian/patches/04_dont_crash_on_critical_warnings.patch: + + Don't crash on critical warnings (Closes: #474234). + + -- Sebastian Dröge Thu, 05 Mar 2009 13:28:12 +0100 + +notification-daemon (0.4.0-0ubuntu4) jaunty-proposed; urgency=low + + * debian/patches/09_change_themes_crash_rev1.patch resolve (LP: #131227) + - fix crash when changing themes (based on the patch from + Antonio Litterio, many thanks) + * debian/rules: + - build without "-Wl,--as-needed" to avoid another crash releated + to loading/unloading libsexy from the themes (LP: #131227) + + -- Michael Vogt Wed, 22 Apr 2009 13:19:20 +0200 + +notification-daemon (0.4.0-0ubuntu3) jaunty; urgency=low + + * Add 08_hide_properties_desktop.patch: Do not display + notification-properties in the menu by default; it's not worth spending a + menu item for this small thing, users can reenable it with alacarte, and + it doesn't work for notify-osd at all. (LP: #301766, #332014) + + -- Martin Pitt Wed, 04 Mar 2009 09:05:13 +0100 + +notification-daemon (0.4.0-0ubuntu2) jaunty; urgency=low + + * fix FTBFS by adding missing libglade2-dev and libnotify-dev + build dependencies + + -- Michael Vogt Mon, 24 Nov 2008 10:24:14 +0100 + +notification-daemon (0.4.0-0ubuntu1) jaunty; urgency=low + + * New upstream release + * drop 06_fix_default_theme_size (taken upstream) + * drop 95_force_intltooliz.patch + + -- Michael Vogt Fri, 21 Nov 2008 10:22:23 +0100 + +notification-daemon (0.3.7-1ubuntu15) intrepid; urgency=low + + * Added 99_libtool_fix.patch to resolve FTBFS (LP: #262079) + * Bumped standards version to 3.8.0 + + -- Michael Casadevall Wed, 27 Aug 2008 22:10:39 -0400 + +notification-daemon (0.3.7-1ubuntu14) intrepid; urgency=low + + * 06_fix_default_theme_size.patch + - remove a unneeded gtk_widget_set_size_request() + + -- Michael Vogt Tue, 29 Jul 2008 17:32:49 +0200 + +notification-daemon (0.3.7-1ubuntu13) intrepid; urgency=low + + * debian/patches/01_ubuntu_theme.patch: + - fix memory leaks (thanks to Cody Somerville) + * debian/patches/07_memleak_daemon.patch: + - fix leak in the daemon (thanks to seb128) + + -- Michael Vogt Tue, 03 Jun 2008 10:43:28 +0200 + +notification-daemon (0.3.7-1ubuntu12) intrepid; urgency=low + + * debian/patches/01_ubuntu_theme.patch: + - Fixed memory leak reported in lp: #67129 + - Testing has shown significant improvement but there are + inconclusive indicators that another much smaller leak may exist. + * debian/copyright: Updated to make lintian happy. + + -- Cody A.W. Somerville Fri, 23 May 2008 14:43:59 +0200 + +notification-daemon (0.3.7-1ubuntu11) hardy; urgency=low + + * 06_fix_default_theme_size.patch: + - Fix the display of certain long lines. (LP: #40379). + The patch is by BobMauchin, taken from + http://trac.galago-project.org/ticket/162 + * 01_ubuntu_theme.patch + - Patch adapted and applied to the ubuntu theme as well. + + -- James Westby Fri, 04 Apr 2008 13:03:42 +0100 + +notification-daemon (0.3.7-1ubuntu10) hardy; urgency=low + + [ Alex Jones ] + * 01_ubuntu_theme.patch: + - Fixed the summary text label to escape summary text. It's not + Pango markup by specification. + + [ Michael Vogt ] + * 01_ubuntu_theme.patch: + - copy the style of the tooltip instead of just using it, this + should fix a common but hard to reproduce crash (#127904) + + -- Michael Vogt Wed, 19 Dec 2007 16:14:49 +0100 + +notification-daemon (0.3.7-1ubuntu9) hardy; urgency=low + + * 01_ubuntu_theme.patch: + - fix text color under dark themes (thanks to Vincent Untz for + the bugreport) + * 95_force_intltooliz.patch: + - run intltoolize --force + * debian/control: + - added XS-Vcs-Bzr header + + -- Michael Vogt Thu, 01 Nov 2007 11:19:56 -0400 + +notification-daemon (0.3.7-1ubuntu8) gutsy; urgency=low + + * 01_ubuntu_theme.patch: + - improve shaping (LP: #136660) + * 05_notification_spacing.patch: + - add a small spacing between two notifications (LP: #137095) + (Thanks to Alex Jones) + + -- Michael Vogt Thu, 06 Sep 2007 18:43:01 +0200 + +notification-daemon (0.3.7-1ubuntu7) gutsy; urgency=low + + * 01_ubuntu_theme.patch: + - improve the pie chart (LP: #132512), thanks to + Alex Jones (for real this time) + + -- Michael Vogt Thu, 16 Aug 2007 22:54:48 +0200 + +notification-daemon (0.3.7-1ubuntu6) gutsy; urgency=low + + * 01_ubuntu_theme.patch: + - improve the pie chart (LP: #132512), thanks to + Alex Jones + + -- Michael Vogt Wed, 15 Aug 2007 13:37:03 +0200 + +notification-daemon (0.3.7-1ubuntu5) gutsy; urgency=low + + * 01_ubuntu_theme.patch: + - Fix countdown notifications too. Closes LP: #129120. + - Use gtk_widget_ensure_style instead of gtk_widget_realize. + * Refreshed intltool. Unbreak the build! + * Removed 05_dont_crash_on_critical_warnings.patch + + -- Scott Robinson Tue, 07 Aug 2007 22:11:21 -0700 + +notification-daemon (0.3.7-1ubuntu4) gutsy; urgency=low + + * debian/patches/01_ubuntu_theme.patch: + - make the notification background match the tooltip color + + -- Michael Vogt Tue, 07 Aug 2007 11:24:55 +0200 + +notification-daemon (0.3.7-1ubuntu3) gutsy; urgency=low + + * fix crash in ubuntu theme (caused by gtk+ changes + in the way tooltips are handled). Closes LP: #127925 + + -- Michael Vogt Tue, 31 Jul 2007 15:20:36 +0200 + +notification-daemon (0.3.7-1ubuntu2) gutsy; urgency=low + + * No-change rebuild for libwnck transition. + + -- Steve Kowalik Fri, 22 Jun 2007 00:11:11 +1000 + +notification-daemon (0.3.7-1ubuntu1) gutsy; urgency=low + + * Merge from debian unstable, remaining changes: + + 01_ubuntu_theme.patch. + + 02_make_ubuntu_theme_default.patch. + + 03_fix_xinerama_stack.patch. + + updated maintainer field + * Dropped: + + 05_dont_crash_on_critical_warnings.patch + + 06_fix_prefix_for_dbus_binding_tool.patch + + 04_fix_xinerama_in_theme_c.patch + + -- Michael Vogt Fri, 25 May 2007 13:56:34 +0200 + +notification-daemon (0.3.7-1) unstable; urgency=low + + * New upstream release. + * 03_fix_xinerama_theme_c.patch + + -- Riccardo Setti Sat, 24 Mar 2007 16:11:28 +0100 + +notification-daemon (0.3.6-1) unstable; urgency=low + + * New upstream release. + * Removed: + - 05_dont_crash_on_0_sized_icons.patch + - 06_fix_assertion_with_newer_gtk.patch + - 70_relibtoolize.patch + no more necessary or applied upstream. + * Updated 04_dont_crash_on_critical_warnings.patch. + * Splitted 03_xinerama.patch in: + - 03_fix_xinerama_stack_c.patch + - 03_fix_xinerama_theme_c.patch + + -- Riccardo Setti Sat, 18 Nov 2006 14:37:12 +0100 + +notification-daemon (0.3.6-0ubuntu3) feisty; urgency=low + + * debian/patches/01_ubuntu_theme.patch: + + fix incorrect background color of timeout pie chart (LP: #58114) + + -- Michael Hofmann Wed, 4 Apr 2007 15:44:43 +0200 + +notification-daemon (0.3.6-0ubuntu2) feisty; urgency=low + + * Rebuild for changes in the amd64 toolchain. + * Set Ubuntu maintainer address. + + -- Matthias Klose Mon, 5 Mar 2007 01:23:18 +0000 + +notification-daemon (0.3.6-0ubuntu1) feisty; urgency=low + + * New upstream release: + + 06_fix_prefix_for_dbus_binding_tool.patch: + o fix the dbus-binding-tool usage to be compatible with dbus-glib 0.72 + (Upstream SVN rev #2938) + * Merged from debian sid: + + Bumped standards version. + * Remaining ubuntu changes: + + 01_ubuntu_theme.patch. + + 02_make_ubuntu_theme_default.patch. + + 03_fix_xinerama.patch. + + 04_fix_xinerama_in_theme_c.patch. + + 05_dont_crash_on_critical_warnings.patch. + + 99_autoreconf.patch + + -- Sivan Greenberg Tue, 21 Nov 2006 00:41:53 +0200 + +notification-daemon (0.3.5-2) unstable; urgency=low + + * added patches: + 01_removed-daemon-meamleak.patch + 03_xinerama.patch + 04_dont_crash_on_critical_warnings.patch + 05_dont_crash_on_0_sized_icons.patch + 06_fix_assertion_with_newer_gtk.patch + + -- Riccardo Setti Thu, 21 Sep 2006 19:44:10 +0200 + +notification-daemon (0.3.5-1) unstable; urgency=low + + * New Upstream release. + + -- Riccardo Setti Sun, 23 Jul 2006 12:35:37 +0200 + +notification-daemon (0.3.5-0ubuntu7) edgy; urgency=low + + * debian/patches/09_nonexisting-notification-id-crash.patch: + + Don't crash when trying replacing a non-existing (for example already + closed) notification id but return a new one. + Patch from upstream SVN (r2883) + * debian/patches/10_standard-theme-memleak.patch: + + Close a memleak in the standard theme occuring whenever a notification + is closed. Patch from upstream SVN (r2902) + * debian/patches/01_ubuntu_theme.patch: + + Close the same memleak here. + + -- Sebastian Dröge Wed, 27 Sep 2006 18:00:28 +0200 + +notification-daemon (0.3.5-0ubuntu6) edgy; urgency=low + + * debian/patches/01_ubuntu_theme.patch: + - fix incorect sizing (too wide, too narrow sometimes) + - fix incorrect shape when the arrow points downwards + - code cleanup + + -- Michael Vogt Wed, 30 Aug 2006 23:13:29 +0200 + +notification-daemon (0.3.5-0ubuntu5) edgy; urgency=low + + * Rebuild against dbus 0.90 + + -- Sebastian Dröge Tue, 29 Aug 2006 18:40:49 +0200 + +notification-daemon (0.3.5-0ubuntu4) edgy; urgency=low + + * debian/patches/08_dont_close_on_mouse_over.patch: + + Don't close a notification after the timeout when the mouse cursor is + over it. (Ubuntu: #50219) + Patch from upstream SVN (r2876) + + -- Sebastian Dröge Tue, 29 Aug 2006 18:06:04 +0200 + +notification-daemon (0.3.5-0ubuntu3) edgy; urgency=low + + * debian/patches/05_dont_crash_on_0_sized_icons.patch: + + Don't crash if the base size of an icon is 0 which could happen for some + themes. Patch from upstream SVN (r2879) + * debian/patches/06_fix_assertion_with_newer_gtk.patch: + + Fix assertion failure when destroying a notification. Patch from + upstream SVN (r2880) + * debian/patches/07_dbus_0.61.patch: + + Fix type validation for dbus >= 0.61. (Ubuntu: #58114) + Patch from upstream SVN (r2881) + + -- Sebastian Dröge Tue, 29 Aug 2006 17:49:15 +0200 + +notification-daemon (0.3.5-0ubuntu2) edgy; urgency=low + + * debian/patches/04_dont_crash_on_critial_warnings.patch: + - don't crash on g_fail_if() + + -- Michael Vogt Tue, 15 Aug 2006 12:33:20 +0200 + +notification-daemon (0.3.5-0ubuntu1) edgy; urgency=low + + * New upstream release. + * Merged with Debian. + * debian/patches/04_from_upstream_cvs_no_crop.diff: + - Dropped, it's now merged upstream. + * debian/patches/70_relibtoolize.patch: + - From Debian, dropped. + * debian/patches/01_ubuntu_theme.patch: + - New patch to make the Ubuntu theme work with upstream version. + - Added new functions that are required by the new theme API. + - Added include for config.h to get consts required by the new functions. + - Merged patching of themes/Makefile.am with upstream changes. + * debian/patches/99_autoreconf.patch: + - Updated. + + -- Sivan Greenberg Tue, 11 Jul 2006 22:26:54 +0300 + +notification-daemon (0.3.4-4) unstable; urgency=low + + * removed a bashism in debian/rules. (closes: #353498) + - Brace expansion is no more used in debian/rules. + + -- Riccardo Setti Sun, 19 Feb 2006 18:23:19 +0100 + +notification-daemon (0.3.4-3) unstable; urgency=low + + * Fixed notification-daemon.postinst (closes: #353251) + - now the postinst script will not die if notification-daemons is not + running. Thank to Nicolas François for providing the patch. + + -- Riccardo Setti Sat, 18 Feb 2006 19:23:35 +0100 + +notification-daemon (0.3.4-2) unstable; urgency=low + + * Added myself to the uploaders + * removed .la .a files from notification-daemon + * added debian/notification-daemon.postinst + - notification-daemon is restarted when a new package is installed + + -- Riccardo Setti Tue, 14 Feb 2006 20:24:59 +0100 + +notification-daemon (0.3.4-1) unstable; urgency=low + + * New upstream release. + - Bump up libgtk2.0-dev build-dep to >= 2.4.0. + - Add libglib2.0-dev (>= 2.4) build-dep. + - Add libdbus-1-dev (>= 0.36) build-dep. + - Relibtoolize. + * Update download URL. + * Add --as-needed to linker flags to optimize deps. + + -- Loic Minier Sun, 12 Feb 2006 19:32:35 +0100 + +notification-daemon (0.3.3-1) unstable; urgency=low + + * New upstream release + - upstream unmade the renaming; gah + - added intltool, libsexy-dev, and libgconf2-dev for they are + needed + + Riccardo Setti: + * changed long description (closes: #349449) + * added libpopt-dev to Build-Depends + + -- Gustavo Noronha Silva Sun, 29 Jan 2006 09:35:12 -0200 + +notify-daemon (0.3.1-1) unstable; urgency=low + + * New upstream release + - renamed from notification-daemon + * debian/control.in: + - updated build-deps to require libdbus-glib-1-dev >= 0.60 and + libpopt-dev + - renamed source and binary packages to reflect upstream's + name change + - added Conflicts on notification-daemon to notify-daemon + * debian/patches: + - 04_smarter_arrow_placement.patch, 05_incorrect_draw_arrow.patch + 06_right_padding.patch, 07_no_notification_on_screensaver.patch + no longer apply: this upstream release is a complete revamp in + the code, removed; + + -- Gustavo Noronha Silva Fri, 13 Jan 2006 15:51:18 -0200 + +notification-daemon (0.2.2-1) experimental; urgency=low + + * First upload to Debian + + Andre Filipe de Assuncao e Brito: + * New upstream release Closes: #335591 + * debian/copyright: + - Updated URL Project to: + http://www.galago-project.org/files/releases/source/ + * Remove debian/patches: + -01_dbus_datatypes.patch + -02_fix_64bit_typecast.patch + -03_fix_workspace_query.patch + - Applied Upstream + * debian/control: + - Updated Specs URL to: + http://www.galago-project.org/specs/notification/index.php + + Gustavo Noronha Silva: + * debian/patches/07_no_notification_on_screensaver.patch: + - removed all the patching about autom4te.cache + * debian/copyright: + - mention that src/dbus-compat.h, sexy-url-label.h, and + sexy-url-label.c are not GPL, but LGPL + + -- Gustavo Noronha Silva Sun, 13 Nov 2005 21:16:03 -0200 + +notification-daemon (0.2.1-0ubuntu13) breezy; urgency=low + + * debian/patches/07_no_notification_on_screensaver.patch: + - make sure that the window-list is up-to-date in wnck + + -- Michael Vogt Mon, 26 Sep 2005 15:20:06 +0200 + +notification-daemon (0.2.1-0ubuntu12) breezy; urgency=low + + * debian/patches/07_no_notification_on_screensaver.patch: + - don't show the notification if another window is in fullscreen-mode + (e.g. screensaver, media-player) (ubuntu #14944, #15783) + * debian/control: + - depend on libwnck-dev + + -- Michael Vogt Mon, 19 Sep 2005 14:10:19 +0200 + +notification-daemon (0.2.1-0ubuntu11) breezy; urgency=low + + * debian/patches/04_smarter_arrow_placement.patch: + - fix another corner case in the drawing code (ubuntu: #14169) + * 06_right_padding.patch: + - make sure to padd the right side of the action labels (ubuntu: #14169) + + -- Michael Vogt Mon, 5 Sep 2005 18:24:37 +0200 + +notification-daemon (0.2.1-0ubuntu10) breezy; urgency=low + + * debian/patches/04_smarter_arrow_placement.patch: + - draw a arrow pointing down correctly (ubuntu #14169) + + -- Michael Vogt Fri, 2 Sep 2005 17:08:40 +0200 + +notification-daemon (0.2.1-0ubuntu9) breezy; urgency=low + + * debian/patches/05_incorrect_draw_arrow.diff: + - fix the "window is incorrectly drawn on first run" bug (#14006) + + -- Michael Vogt Mon, 29 Aug 2005 15:49:26 +0200 + +notification-daemon (0.2.1-0ubuntu8) breezy; urgency=low + + * Rebuild with the new cairo version + + -- Sebastien Bacher Thu, 18 Aug 2005 17:22:28 +0000 + +notification-daemon (0.2.1-0ubuntu7) breezy; urgency=low + + * fixed FTBFS + + -- Michael Vogt Thu, 11 Aug 2005 09:59:04 +0200 + +notification-daemon (0.2.1-0ubuntu6) breezy; urgency=low + + * debian/patches/04_smarter_arrow_placement.patch: + - improve the patch (last version fails in some cases) + - fix typo + + -- Michael Vogt Thu, 11 Aug 2005 00:09:26 +0200 + +notification-daemon (0.2.1-0ubuntu5) breezy; urgency=low + + * debian/patches/04_smarter_arrow_placement.patch: + - make the arrows usefull for coordinates close to the right + screen border + + -- Michael Vogt Wed, 10 Aug 2005 19:20:51 +0200 + +notification-daemon (0.2.1-0ubuntu4) breezy; urgency=low + + * debian/patches/01_dbus_datatypes.patch: + - Fix dbus data type usage harder to work on 64 bit platforms. + * Add debian/patches/03_fix_workspace_query.patch: + - Properly initialize workspace origin if get_work_area() fails. + - get_work_area(): Cast returned array from XGetWindowProperty() to long* + instead of guint32 to adhere to XGetWindowProperty specification and + get correct numbers on 64 platforms. + * Now this package works on all supported platforms. + + -- Martin Pitt Wed, 10 Aug 2005 01:28:33 +0200 + +notification-daemon (0.2.1-0ubuntu3) breezy; urgency=low + + * Add debian/patches/02_fix_64bit_typecast.patch: + - Replace direct void* -> int32 typecast with a void* -> int64 -> int32 + cast to stop compiler barfing and make the package build again on 64 bit + archs. + + -- Martin Pitt Tue, 9 Aug 2005 20:43:12 +0200 + +notification-daemon (0.2.1-0ubuntu2) breezy; urgency=low + + * Add debian/patches/01_dbus_datatypes.patch: + - src/main.cc: Use the correct dbus data types to read timeout values from + dbus. This makes timeouts work on powerpc. + + -- Martin Pitt Tue, 9 Aug 2005 19:41:30 +0200 + +notification-daemon (0.2.1-0ubuntu1) breezy; urgency=low + + * New upstream version. + * debian/patches/01_buildfix.patch: + - fixed with the new version. + + -- Sebastien Bacher Thu, 28 Jul 2005 20:51:07 +0200 + +notification-daemon (0.2.0-0ubuntu1) breezy; urgency=low + + * Initial package. + * debian/patches/01_buildfix.patch: + - fix a build issue. + + -- Sebastien Bacher Thu, 28 Jul 2005 16:15:45 +0200 + --- notification-daemon-0.4.0.orig/debian/patches/01_hide-capplet.patch +++ notification-daemon-0.4.0/debian/patches/01_hide-capplet.patch @@ -0,0 +1,7 @@ +--- src/capplet/notification-properties.desktop.in.old 2009-10-08 12:37:36.000000000 +0200 ++++ src/capplet/notification-properties.desktop.in 2009-10-08 12:37:48.000000000 +0200 +@@ -9,3 +9,4 @@ + StartupNotify=true + Categories=GNOME;GTK;Settings; + OnlyShowIn=GNOME; ++NoDisplay=true --- notification-daemon-0.4.0.orig/debian/patches/02_make_ubuntu_theme_default.patch +++ notification-daemon-0.4.0/debian/patches/02_make_ubuntu_theme_default.patch @@ -0,0 +1,12 @@ +diff -Nur notification-daemon-0.3.4/data/notification-daemon.schemas.in notification-daemon-0.3.4.new/data/notification-daemon.schemas.in +--- notification-daemon-0.3.4/data/notification-daemon.schemas.in 2006-01-16 00:04:22.000000000 +0000 ++++ notification-daemon-0.3.4.new/data/notification-daemon.schemas.in 2006-03-10 14:55:07.000000000 +0000 +@@ -6,7 +6,7 @@ + /apps/notification-daemon/theme + notification-daemon + string +- standard ++ ubuntu + + Current theme + The theme used when displaying notifications. --- notification-daemon-0.4.0.orig/debian/patches/05_notification_spacing.patch +++ notification-daemon-0.4.0/debian/patches/05_notification_spacing.patch @@ -0,0 +1,29 @@ +--- src/daemon/stack.c 2007-02-15 11:05:17.000000000 +0000 ++++ /home/alex/Desktop/stack.c 2007-09-03 19:23:19.000000000 +0100 +@@ -28,6 +28,8 @@ + #include + #include + ++#define NOTIFY_STACK_SPACING 2 ++ + struct _NotifyStack + { + NotifyDaemon *daemon; +@@ -229,7 +231,7 @@ notify_stack_shift_notifications(NotifyS + gtk_widget_size_request(GTK_WIDGET(nw2), &req); + + translate_coordinates(stack->location, &workarea, &x, &y, +- &shiftx, &shifty, req.width, req.height, ++ &shiftx, &shifty, req.width + NOTIFY_STACK_SPACING, req.height + NOTIFY_STACK_SPACING, + index++); + theme_move_notification(nw2, x, y); + } +@@ -250,7 +252,7 @@ notify_stack_add_window(NotifyStack *sta + + gtk_widget_size_request(GTK_WIDGET(nw), &req); + notify_stack_shift_notifications(stack, nw, NULL, +- req.width, req.height, &x, &y); ++ req.width + NOTIFY_STACK_SPACING, req.height + NOTIFY_STACK_SPACING, &x, &y); + theme_move_notification(nw, x, y); + + if (new_notification) --- notification-daemon-0.4.0.orig/debian/patches/09_change_themes_crash_rev1.patch +++ notification-daemon-0.4.0/debian/patches/09_change_themes_crash_rev1.patch @@ -0,0 +1,54 @@ +# +# Ubuntu: https://bugs.launchpad.net/ubuntu/+source/notification-daemon/+bug/1312277 +# +# Description: When you change theme with notification-properties and press preview button, +# the notification-daemon crashes and notification-properties gets an error message. +# The problem depends on closing unproperly the module (engine->module) because it is closing when it is still +# in use. The patch concerns a correct way to close G_Modules and destroy engine. +# First it destroys widget notification, then it decreases "engine->ref_count" and if requested (engine->ref_count == 0), +# it destroys engine. These steps will be made by the function theme_destroy_widget, that will have to be called every-time +# you want to destroy notification widget (daemon.c). +# +#Practically the daemon destroys engine, in particular "engine->module", when it is already used by the notification pop-up. +#The correct way to destroy engine is this: +# -) Destroy notification pop-up by calling "gtk_distroy_widget". +# -) Decrease value of "engine->ref_count" and if it is equal to zero, unload engine->module and destroy engine. +# +#Currently the daemon works in this modality: +# -) It calls the invokes the destruction of a notification pop-up by calling "gtk_destroy_widget", but with this event is also called "theme_engine_unref". +# -) It decreases value of "engine->ref_count" and if it is equal to zero, it unloads "engine->module" and destroys "engine". +# -) It ends the destruction of a notification pop-up. +# +#The daemon unloads engine->module when it is still in use by gtk_widget. +diff -Nur -x '*.orig' -x '*~' notification-daemon-0.4.0/src/daemon/daemon.c notification-daemon-0.4.0.new/src/daemon/daemon.c +--- notification-daemon-0.4.0/src/daemon/daemon.c 2009-03-19 11:22:39.000000000 +0100 ++++ notification-daemon-0.4.0.new/src/daemon/daemon.c 2009-03-19 11:25:22.000000000 +0100 +@@ -147,7 +147,7 @@ + static void + _notify_timeout_destroy(NotifyTimeout *nt) + { +- gtk_widget_destroy(GTK_WIDGET(nt->nw)); ++ theme_destroy_notification(GTK_WIDGET(nt->nw)); + g_free(nt); + } + +diff -Nur -x '*.orig' -x '*~' notification-daemon-0.4.0/src/daemon/engines.c notification-daemon-0.4.0.new/src/daemon/engines.c +--- notification-daemon-0.4.0/src/daemon/engines.c 2008-11-20 11:45:16.000000000 +0100 ++++ notification-daemon-0.4.0.new/src/daemon/engines.c 2009-03-19 11:25:15.000000000 +0100 +@@ -182,7 +182,7 @@ + ThemeEngine *engine = get_theme_engine(); + GtkWindow *nw = engine->create_notification(url_clicked_cb); + g_object_set_data_full(G_OBJECT(nw), "_theme_engine", engine, +- (GDestroyNotify)theme_engine_unref); ++ NULL); + engine->ref_count++; + return nw; + } +@@ -196,6 +196,7 @@ + engine->destroy_notification(nw); + else + gtk_widget_destroy(GTK_WIDGET(nw)); ++ theme_engine_unref(engine); + } + + void --- notification-daemon-0.4.0.orig/debian/patches/03_fix_xinerama_stack_c.patch +++ notification-daemon-0.4.0/debian/patches/03_fix_xinerama_stack_c.patch @@ -0,0 +1,64 @@ +diff -urNad notification-daemon-0.3.6.orig/src/stack.c notification-daemon-0.3.6/src/stack.c +--- notification-daemon-0.3.7.orig/src/daemon/stack.c 2006-07-30 23:19:57.000000000 +0200 ++++ notification-daemon-0.3.7/src/daemon/stack.c 2006-11-18 14:20:04.000000000 +0100 +@@ -40,51 +40,18 @@ + static gboolean + get_work_area(GtkWidget *nw, GdkRectangle *rect) + { +- Atom workarea = XInternAtom(GDK_DISPLAY(), "_NET_WORKAREA", True); +- Atom type; +- Window win; +- int format; +- gulong num, leftovers; +- gulong max_len = 4 * 32; +- guchar *ret_workarea; +- long *workareas; +- int result; +- GdkScreen *screen; +- int disp_screen; ++ GdkScreen *screen; + ++ /* It would be best to allow the user to configure this, but the first ++ * monitor is a good default for now (the first monitor is likely the ++ * primary monitor). */ ++ ++ guint monitor = 0; ++ + gtk_widget_realize(nw); + screen = gdk_drawable_get_screen(GDK_DRAWABLE(nw->window)); +- disp_screen = GDK_SCREEN_XNUMBER(screen); +- +- /* Defaults in case of error */ +- rect->x = 0; +- rect->y = 0; +- rect->width = gdk_screen_get_width(screen); +- rect->height = gdk_screen_get_height(screen); +- +- if (workarea == None) +- return FALSE; +- +- win = XRootWindow(GDK_DISPLAY(), disp_screen); +- result = XGetWindowProperty(GDK_DISPLAY(), win, workarea, 0, +- max_len, False, AnyPropertyType, +- &type, &format, &num, &leftovers, +- &ret_workarea); +- +- if (result != Success || type == None || format == 0 || leftovers || +- num % 4) +- { +- return FALSE; +- } +- +- workareas = (long *)ret_workarea; +- rect->x = workareas[disp_screen * 4]; +- rect->y = workareas[disp_screen * 4 + 1]; +- rect->width = workareas[disp_screen * 4 + 2]; +- rect->height = workareas[disp_screen * 4 + 3]; +- +- XFree(ret_workarea); +- ++ ++ gdk_screen_get_monitor_geometry(screen, monitor, rect); + return TRUE; + } + --- notification-daemon-0.4.0.orig/debian/patches/99_ltmain_as-needed.patch +++ notification-daemon-0.4.0/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" --- notification-daemon-0.4.0.orig/debian/patches/10_support-for-notification-spec-0.10.patch +++ notification-daemon-0.4.0/debian/patches/10_support-for-notification-spec-0.10.patch @@ -0,0 +1,354 @@ +From ae7c09dcfbbf04c45eeda51fcf2c3db2599df111 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Aur=C3=A9lien=20G=C3=A2teau?= +Date: Mon, 22 Jun 2009 11:20:00 +0200 +Subject: [PATCH] Support for image_data and image_path hints + +--- + src/daemon/daemon.c | 190 +++++++++++++++++++++++++++----------------------- + 1 files changed, 103 insertions(+), 87 deletions(-) + +diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c +index 56f4239..59b3dcb 100644 +--- a/src/daemon/daemon.c ++++ b/src/daemon/daemon.c +@@ -591,9 +591,8 @@ _store_notification(NotifyDaemon *daemon, GtkWindow *nw, int timeout) + return nt; + } + +-static gboolean +-_notify_daemon_process_icon_data(NotifyDaemon *daemon, GtkWindow *nw, +- GValue *icon_data) ++static GdkPixbuf* ++_notify_daemon_pixbuf_from_data_hint(GValue *icon_data) + { + const guchar *data = NULL; + gboolean has_alpha; +@@ -623,9 +622,9 @@ _notify_daemon_process_icon_data(NotifyDaemon *daemon, GtkWindow *nw, + + if (!G_VALUE_HOLDS(icon_data, struct_type)) + { +- g_warning("_notify_daemon_process_icon_data expected a " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected a " + "GValue of type GValueArray"); +- return FALSE; ++ return NULL; + } + #endif /* D-BUS >= 0.61 */ + +@@ -634,16 +633,16 @@ _notify_daemon_process_icon_data(NotifyDaemon *daemon, GtkWindow *nw, + + if (value == NULL) + { +- g_warning("_notify_daemon_process_icon_data expected position " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected position " + "0 of the GValueArray to exist"); +- return FALSE; ++ return NULL; + } + + if (!G_VALUE_HOLDS(value, G_TYPE_INT)) + { +- g_warning("_notify_daemon_process_icon_data expected " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected " + "position 0 of the GValueArray to be of type int"); +- return FALSE; ++ return NULL; + } + + width = g_value_get_int(value); +@@ -651,16 +650,16 @@ _notify_daemon_process_icon_data(NotifyDaemon *daemon, GtkWindow *nw, + + if (value == NULL) + { +- g_warning("_notify_daemon_process_icon_data expected " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected " + "position 1 of the GValueArray to exist"); +- return FALSE; ++ return NULL; + } + + if (!G_VALUE_HOLDS(value, G_TYPE_INT)) + { +- g_warning("_notify_daemon_process_icon_data expected " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected " + "position 1 of the GValueArray to be of type int"); +- return FALSE; ++ return NULL; + } + + height = g_value_get_int(value); +@@ -668,16 +667,16 @@ _notify_daemon_process_icon_data(NotifyDaemon *daemon, GtkWindow *nw, + + if (value == NULL) + { +- g_warning("_notify_daemon_process_icon_data expected " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected " + "position 2 of the GValueArray to exist"); +- return FALSE; ++ return NULL; + } + + if (!G_VALUE_HOLDS(value, G_TYPE_INT)) + { +- g_warning("_notify_daemon_process_icon_data expected " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected " + "position 2 of the GValueArray to be of type int"); +- return FALSE; ++ return NULL; + } + + rowstride = g_value_get_int(value); +@@ -685,16 +684,16 @@ _notify_daemon_process_icon_data(NotifyDaemon *daemon, GtkWindow *nw, + + if (value == NULL) + { +- g_warning("_notify_daemon_process_icon_data expected " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected " + "position 3 of the GValueArray to exist"); +- return FALSE; ++ return NULL; + } + + if (!G_VALUE_HOLDS(value, G_TYPE_BOOLEAN)) + { +- g_warning("_notify_daemon_process_icon_data expected " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected " + "position 3 of the GValueArray to be of type gboolean"); +- return FALSE; ++ return NULL; + } + + has_alpha = g_value_get_boolean(value); +@@ -702,16 +701,16 @@ _notify_daemon_process_icon_data(NotifyDaemon *daemon, GtkWindow *nw, + + if (value == NULL) + { +- g_warning("_notify_daemon_process_icon_data expected " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected " + "position 4 of the GValueArray to exist"); +- return FALSE; ++ return NULL; + } + + if (!G_VALUE_HOLDS(value, G_TYPE_INT)) + { +- g_warning("_notify_daemon_process_icon_data expected " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected " + "position 4 of the GValueArray to be of type int"); +- return FALSE; ++ return NULL; + } + + bits_per_sample = g_value_get_int(value); +@@ -719,16 +718,16 @@ _notify_daemon_process_icon_data(NotifyDaemon *daemon, GtkWindow *nw, + + if (value == NULL) + { +- g_warning("_notify_daemon_process_icon_data expected " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected " + "position 5 of the GValueArray to exist"); +- return FALSE; ++ return NULL; + } + + if (!G_VALUE_HOLDS(value, G_TYPE_INT)) + { +- g_warning("_notify_daemon_process_icon_data expected " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected " + "position 5 of the GValueArray to be of type int"); +- return FALSE; ++ return NULL; + } + + n_channels = g_value_get_int(value); +@@ -736,17 +735,17 @@ _notify_daemon_process_icon_data(NotifyDaemon *daemon, GtkWindow *nw, + + if (value == NULL) + { +- g_warning("_notify_daemon_process_icon_data expected " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected " + "position 6 of the GValueArray to exist"); +- return FALSE; ++ return NULL; + } + + if (!G_VALUE_HOLDS(value, + dbus_g_type_get_collection("GArray", G_TYPE_UCHAR))) + { +- g_warning("_notify_daemon_process_icon_data expected " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected " + "position 6 of the GValueArray to be of type GArray"); +- return FALSE; ++ return NULL; + } + + tmp_array = (GArray *)g_value_get_boxed(value); +@@ -755,11 +754,11 @@ _notify_daemon_process_icon_data(NotifyDaemon *daemon, GtkWindow *nw, + + if (expected_len != tmp_array->len) + { +- g_warning("_notify_daemon_process_icon_data expected image " ++ g_warning("_notify_daemon_pixbuf_from_data_hint expected image " + "data to be of length %" G_GSIZE_FORMAT " but got a " + "length of %u", + expected_len, tmp_array->len); +- return FALSE; ++ return NULL; + } + + data = (guchar *)g_memdup(tmp_array->data, tmp_array->len); +@@ -768,10 +767,53 @@ _notify_daemon_process_icon_data(NotifyDaemon *daemon, GtkWindow *nw, + rowstride, + (GdkPixbufDestroyNotify)g_free, + NULL); +- theme_set_notification_icon(nw, pixbuf); +- g_object_unref(G_OBJECT(pixbuf)); + +- return TRUE; ++ return pixbuf; ++} ++ ++static GdkPixbuf* ++_notify_daemon_pixbuf_from_path(const char* path) ++{ ++ GdkPixbuf *pixbuf = NULL; ++ ++ if (!strncmp(path, "file://", 7) || *path == '/') ++ { ++ if (!strncmp(path, "file://", 7)) ++ path += 7; ++ ++ /* Load file */ ++ pixbuf = gdk_pixbuf_new_from_file(path, NULL); ++ } ++ else ++ { ++ /* Load icon theme icon */ ++ GtkIconTheme *theme = gtk_icon_theme_get_default(); ++ GtkIconInfo *icon_info = ++ gtk_icon_theme_lookup_icon(theme, path, IMAGE_SIZE, ++ GTK_ICON_LOOKUP_USE_BUILTIN); ++ ++ if (icon_info != NULL) ++ { ++ gint icon_size = MIN(IMAGE_SIZE, ++ gtk_icon_info_get_base_size(icon_info)); ++ ++ if (icon_size == 0) ++ icon_size = IMAGE_SIZE; ++ ++ pixbuf = gtk_icon_theme_load_icon(theme, path, icon_size, ++ GTK_ICON_LOOKUP_USE_BUILTIN, ++ NULL); ++ ++ gtk_icon_info_free(icon_info); ++ } ++ ++ if (pixbuf == NULL) ++ { ++ /* Well... maybe this is a file afterall. */ ++ pixbuf = gdk_pixbuf_new_from_file(path, NULL); ++ } ++ } ++ return pixbuf; + } + + static void +@@ -1212,63 +1254,37 @@ notify_daemon_notify_handler(NotifyDaemon *daemon, + } + } + +- /* check for icon_data if icon == "" */ +- if (*icon == '\0') ++ GdkPixbuf* pixbuf = NULL; ++ if ((data = (GValue *)g_hash_table_lookup(hints, "image_data"))) + { +- data = (GValue *)g_hash_table_lookup(hints, "icon_data"); +- +- if (data) +- _notify_daemon_process_icon_data(daemon, nw, data); ++ pixbuf = _notify_daemon_pixbuf_from_data_hint(data); + } +- else ++ else if ((data = (GValue *)g_hash_table_lookup(hints, "image_path"))) + { +- GdkPixbuf *pixbuf = NULL; +- +- if (!strncmp(icon, "file://", 7) || *icon == '/') ++ if (G_VALUE_HOLDS_STRING(data)) + { +- if (!strncmp(icon, "file://", 7)) +- icon += 7; +- +- /* Load file */ +- pixbuf = gdk_pixbuf_new_from_file(icon, NULL); ++ const char* path = g_value_get_string(data); ++ pixbuf = _notify_daemon_pixbuf_from_path(path); + } + else + { +- /* Load icon theme icon */ +- GtkIconTheme *theme = gtk_icon_theme_get_default(); +- GtkIconInfo *icon_info = +- gtk_icon_theme_lookup_icon(theme, icon, IMAGE_SIZE, +- GTK_ICON_LOOKUP_USE_BUILTIN); +- +- if (icon_info != NULL) +- { +- gint icon_size = MIN(IMAGE_SIZE, +- gtk_icon_info_get_base_size(icon_info)); +- +- if (icon_size == 0) +- icon_size = IMAGE_SIZE; +- +- pixbuf = gtk_icon_theme_load_icon(theme, icon, icon_size, +- GTK_ICON_LOOKUP_USE_BUILTIN, +- NULL); +- +- gtk_icon_info_free(icon_info); +- } +- +- if (pixbuf == NULL) +- { +- /* Well... maybe this is a file afterall. */ +- pixbuf = gdk_pixbuf_new_from_file(icon, NULL); +- } +- } +- +- if (pixbuf != NULL) +- { +- theme_set_notification_icon(nw, pixbuf); +- g_object_unref(G_OBJECT(pixbuf)); ++ g_warning("notify_daemon_notify_handler expected " ++ "image_path hint to be of type string"); + } + } +- ++ else if (*icon != '\0') ++ { ++ pixbuf = _notify_daemon_pixbuf_from_path(icon); ++ } ++ else if ((data = (GValue *)g_hash_table_lookup(hints, "icon_data"))) ++ { ++ pixbuf = _notify_daemon_pixbuf_from_data_hint(data); ++ } ++ if (pixbuf != NULL) ++ { ++ theme_set_notification_icon(nw, pixbuf); ++ g_object_unref(G_OBJECT(pixbuf)); ++ } + + if (window_xid != None) + { +@@ -1392,7 +1408,7 @@ notify_daemon_get_server_information(NotifyDaemon *daemon, + *out_name = g_strdup("Notification Daemon"); + *out_vendor = g_strdup("Galago Project"); + *out_version = g_strdup(VERSION); +- *out_spec_ver = g_strdup("1.0"); ++ *out_spec_ver = g_strdup("0.10"); + + return TRUE; + } +-- +1.6.0.4 + --- notification-daemon-0.4.0.orig/debian/patches/01_ubuntu_theme.patch +++ notification-daemon-0.4.0/debian/patches/01_ubuntu_theme.patch @@ -0,0 +1,905 @@ +diff -Nur -x '*.orig' -x '*~' ubuntu/configure.ac ubuntu.new/configure.ac +--- ubuntu/configure.ac 2007-02-28 06:16:16.000000000 +0100 ++++ ubuntu.new/configure.ac 2008-06-03 10:32:23.000000000 +0200 +@@ -174,6 +174,7 @@ + src/themes/Makefile + src/themes/bubble/Makefile + src/themes/standard/Makefile ++src/themes/ubuntu/Makefile + ]) + + AC_OUTPUT +diff -Nur -x '*.orig' -x '*~' ubuntu/src/themes/Makefile.am ubuntu.new/src/themes/Makefile.am +--- ubuntu/src/themes/Makefile.am 2006-10-08 23:04:02.000000000 +0200 ++++ ubuntu.new/src/themes/Makefile.am 2008-06-03 10:32:23.000000000 +0200 +@@ -1,2 +1,2 @@ +-SUBDIRS = standard +-DIST_SUBDIRS = $(SUBDIRS) bubble ++SUBDIRS = standard ubuntu ++DIST_SUBDIRS = $(SUBDIRS) bubble ubuntu +diff -Nur -x '*.orig' -x '*~' ubuntu/src/themes/ubuntu/Makefile.am ubuntu.new/src/themes/ubuntu/Makefile.am +--- ubuntu/src/themes/ubuntu/Makefile.am 1970-01-01 01:00:00.000000000 +0100 ++++ ubuntu.new/src/themes/ubuntu/Makefile.am 2008-06-03 10:32:23.000000000 +0200 +@@ -0,0 +1,9 @@ ++enginedir = $(libdir)/notification-daemon-1.0/engines ++ ++engine_LTLIBRARIES = libubuntu.la ++ ++libubuntu_la_SOURCES = theme.c ++libubuntu_la_LDFLAGS = -module -avoid-version ++libubuntu_la_LIBADD = $(NOTIFICATION_DAEMON_LIBS) ++ ++INCLUDES = $(NOTIFICATION_DAEMON_CFLAGS) +diff -Nur -x '*.orig' -x '*~' ubuntu/src/themes/ubuntu/theme.c ubuntu.new/src/themes/ubuntu/theme.c +--- ubuntu/src/themes/ubuntu/theme.c 1970-01-01 01:00:00.000000000 +0100 ++++ ubuntu.new/src/themes/ubuntu/theme.c 2008-06-03 10:32:46.000000000 +0200 +@@ -0,0 +1,869 @@ ++#include "config.h" ++ ++#include ++#include ++ ++typedef void (*ActionInvokedCb)(GtkWindow *nw, const char *key); ++typedef void (*UrlClickedCb)(GtkWindow *nw, const char *url); ++ ++typedef struct ++{ ++ GtkWidget *win; ++ GtkWidget *top_spacer; ++ GtkWidget *bottom_spacer; ++ GtkWidget *main_hbox; ++ GtkWidget *iconbox; ++ GtkWidget *icon; ++ GtkWidget *content_hbox; ++ GtkWidget *summary_label; ++ GtkWidget *body_label; ++ GtkWidget *actions_box; ++ GtkWidget *last_sep; ++ GtkWidget *pie_countdown; ++ GtkWidget *close_button; ++ ++ /* do we have a arrow and where do we point to */ ++ gboolean has_arrow; ++ ++ gboolean enable_transparency; ++ ++ int point_x; ++ int point_y; ++ ++ int drawn_arrow_begin_x; ++ int drawn_arrow_begin_y; ++ int drawn_arrow_middle_x; ++ int drawn_arrow_middle_y; ++ int drawn_arrow_end_x; ++ int drawn_arrow_end_y; ++ GtkArrowType arrow_type; ++ ++ GdkGC *gc; ++ GdkRegion *window_region; ++ ++ guchar urgency; ++ glong timeout; ++ glong remaining; ++ ++ UrlClickedCb url_clicked; ++ ++} WindowData; ++ ++enum ++{ ++ URGENCY_LOW, ++ URGENCY_NORMAL, ++ URGENCY_CRITICAL ++}; ++ ++#define WIDTH 300 ++#define IMAGE_SIZE 32 ++#define IMAGE_PADDING 10 ++#define STRIPE_WIDTH 30 ++ ++#define PIE_RADIUS 14 ++#define PIE_WIDTH (2 * PIE_RADIUS) ++#define PIE_HEIGHT (2 * PIE_RADIUS) ++#define PIE_INSIDE_BORDER 2 ++ ++#define BODY_X_OFFSET (IMAGE_SIZE + 8) ++#define DEFAULT_ARROW_OFFSET (STRIPE_WIDTH + 2) ++#define DEFAULT_ARROW_HEIGHT 12 ++#define DEFAULT_ARROW_WIDTH 8 ++#define ARROW_DISTANCE 6 ++ ++static GtkStyle * ++get_tooltip_style() ++{ ++ /* This is a hack to let us copy the style of tooltips for this theme. */ ++ GtkWidget *fake = gtk_window_new(GTK_WINDOW_POPUP); ++ gtk_widget_set_name(fake, "gtk-tooltip"); ++ gtk_widget_realize(fake); ++ // we copy the style to ensure that its available ++ GtkStyle *style = gtk_style_copy(gtk_widget_get_style(fake)); ++ gtk_widget_destroy(fake); ++ // having no style is a fatal error ++ g_assert(style != NULL); ++ return style; ++} ++ ++static void ++fill_background(GtkWidget *widget, WindowData *windata, cairo_t *cr) ++{ ++ GtkStyle *style = get_tooltip_style(); ++ gdk_cairo_set_source_color(cr, &style->bg[GTK_STATE_NORMAL]); ++ cairo_rectangle(cr, 0, 0, ++ widget->allocation.width, ++ widget->allocation.height); ++ cairo_fill(cr); ++ g_object_unref(G_OBJECT(style)); ++} ++ ++static void ++draw_stripe(GtkWidget *win, cairo_t *cr, WindowData *windata) ++{ ++ GtkStyle *style = gtk_widget_get_style(windata->win); ++ ++ switch (windata->urgency) ++ { ++ case URGENCY_LOW: ++ cairo_set_source_rgb(cr, ++ 242.0/255.0, ++ 242.0/255.0, ++ 190.0/255.0); ++ break; ++ case URGENCY_NORMAL: ++ cairo_set_source_rgb(cr, ++ 220.0/255.0, ++ 220.0/255.0, ++ 160.0/255.0); ++ break; ++ case URGENCY_CRITICAL: ++ ++ cairo_set_source_rgb(cr, ++ style->bg[GTK_STATE_SELECTED].red/65535.0, ++ style->bg[GTK_STATE_SELECTED].green/65535.0, ++ style->bg[GTK_STATE_SELECTED].blue/65535.0); ++ ++ break; ++ } ++ cairo_rectangle(cr, ++ windata->main_hbox->allocation.x, ++ windata->main_hbox->allocation.y, ++ STRIPE_WIDTH, ++ // FIXME: its unclear why we need the padding ++ // here ++ windata->win->allocation.height+IMAGE_PADDING); ++ cairo_fill(cr); ++ return; ++} ++ ++void draw_rounded_window(cairo_t *mask_cr, float x, float y, ++ float w, float h, WindowData *windata) ++{ ++ if(windata->has_arrow) ++ { ++ // fix the border ++ if(windata->arrow_type == GTK_ARROW_UP) { ++ y += DEFAULT_ARROW_HEIGHT; ++ h -= DEFAULT_ARROW_HEIGHT; ++ } else { ++ h -= (DEFAULT_ARROW_HEIGHT+ARROW_DISTANCE); ++ } ++ } ++ ++ int radius = 6; ++ int bx, by, mx, my, ex, ey; ++ ++ bx = windata->drawn_arrow_begin_x; ++ by = windata->drawn_arrow_begin_y; ++ mx = windata->drawn_arrow_middle_x; ++ my = windata->drawn_arrow_middle_y; ++ ex = windata->drawn_arrow_end_x; ++ ey = windata->drawn_arrow_end_y; ++ ++ cairo_move_to(mask_cr, x+radius, y); ++ ++ // the arrow is on top, so we need to draw it here ++ if(windata->has_arrow && windata->arrow_type == GTK_ARROW_UP) { ++ if (mx < w/2 ) { ++ cairo_line_to(mask_cr, bx-10, by); ++ cairo_curve_to(mask_cr, mx-3, by, mx-3, by, mx, my+ARROW_DISTANCE); ++ cairo_curve_to(mask_cr, mx+8, ey, mx+8, ey, ex+16, ey); ++ } else { ++ cairo_line_to(mask_cr, bx-16, by); ++ cairo_curve_to(mask_cr, mx-8, by, mx-8, by, mx, my+ARROW_DISTANCE); ++ cairo_curve_to(mask_cr, mx+3, ey, mx+5, ey, ex+10, ey); ++ } ++ } ++ ++ cairo_arc(mask_cr, x+w-radius, y+radius, radius, G_PI * 1.5, G_PI * 2); ++ cairo_arc(mask_cr, x+w-radius, y+h-radius, radius, 0, G_PI * 0.5); ++ ++ // the arrow is at the bottom, so it needs to be drawn here ++ if(windata->has_arrow && windata->arrow_type == GTK_ARROW_DOWN) { ++ if (mx > w/2 ) { ++ cairo_line_to(mask_cr, bx+10, by); ++ ++ cairo_curve_to(mask_cr, mx+3, by, mx+3, by, mx, my-ARROW_DISTANCE); ++ cairo_curve_to(mask_cr, mx-8, ey, mx-8, ey, ex-16, ey); ++ } else { ++ cairo_line_to(mask_cr, bx+16, by); ++ ++ cairo_curve_to(mask_cr, mx+8, by, mx+8, by, mx, my-ARROW_DISTANCE); ++ cairo_curve_to(mask_cr, mx-3, ey, mx-5, ey, ex-10, ey); ++ } ++ } ++ ++ cairo_arc(mask_cr, x+radius, y+h-radius, radius, G_PI * 0.5, G_PI); ++ cairo_arc(mask_cr, x+radius, y+radius, radius, G_PI, G_PI *1.5); ++} ++ ++static gboolean ++mouse_over(GtkWidget *win, GdkEventExpose *event, WindowData *windata) ++{ ++ gtk_widget_set_state(GTK_WIDGET((WindowData*)windata->close_button), GTK_STATE_PRELIGHT); ++ return FALSE; ++} ++ ++static gboolean ++mouse_over_end(GtkWidget *win, GdkEventExpose *event, WindowData *windata) ++{ ++ gtk_widget_set_state(GTK_WIDGET((WindowData*)windata->close_button), GTK_STATE_NORMAL); ++ return FALSE; ++} ++ ++ ++static gboolean ++draw_border(GtkWidget *win, GdkEventExpose *event, WindowData *windata) ++{ ++ int w, h; ++ ++ gdk_drawable_get_size(win->window, &w, &h); ++ ++ // calculate a shape for it ++ GdkPixmap *mask; ++ cairo_t *mask_cr; ++ ++ mask = gdk_pixmap_new (NULL, w, h, 1); ++ mask_cr = gdk_cairo_create ((GdkDrawable *) mask); ++ ++ // draw border ++ cairo_t *cr = gdk_cairo_create((GdkDrawable*) win->window); ++ ++ GtkStyle *style = get_tooltip_style(); ++ GdkColor bg_color = style->bg[GTK_STATE_NORMAL]; ++ ++ cairo_set_source_rgb(cr, ++ bg_color.red/65535.0, ++ bg_color.green/65535.0, ++ bg_color.blue/65535.0); ++ ++ cairo_paint (cr); ++ ++ // draw a stripe ++ draw_stripe(win, cr, windata); ++ ++ // then a redish one ++ cairo_set_source_rgb(cr, ++ 218.0/255.0, ++ 178.0/255.0, ++ 85.0/255.0); ++ draw_rounded_window (cr, 0, 0, w, h, windata); ++ // Stroke the border 2 pixels wide so we get a 1 pixel stroke inside our ++ // path (we'll mask the outside half of it later). ++ cairo_set_line_width (cr, 2); ++ cairo_stroke (cr); ++ ++ // Clear the shape mask ++ cairo_set_operator (mask_cr, CAIRO_OPERATOR_CLEAR); ++ cairo_paint (mask_cr); ++ ++ // Draw the window shape to the input mask ++ cairo_set_source_rgba(mask_cr, 1, 1, 1, 1); ++ cairo_set_operator (mask_cr, CAIRO_OPERATOR_OVER); ++ draw_rounded_window(mask_cr, 0, 0, w, h, windata); ++ cairo_fill(mask_cr); ++ ++ if (windata->enable_transparency) { ++ // If transparency is enabled, we can mask the drawing itself and just ++ // use the shape mask as an input mask. ++ cairo_set_operator (cr, CAIRO_OPERATOR_DEST_IN); ++ cairo_set_source_rgb (cr, 0, 0, 0); ++ draw_rounded_window (cr, 0, 0, w, h, windata); ++ cairo_fill (cr); ++ gdk_window_input_shape_combine_mask (win->window, (GdkBitmap *) mask, 0, 0); ++ } else { ++ // Otherwise, use the shape mask for bilevel visual shaping as well. ++ gdk_window_shape_combine_mask (win->window, (GdkBitmap *) mask, 0, 0); ++ } ++ g_object_unref(G_OBJECT(style)); ++ cairo_destroy(mask_cr); ++ cairo_destroy(cr); ++ ++ return FALSE; ++} ++ ++ ++ ++static void ++destroy_windata(WindowData *windata) ++{ ++ if (windata->gc != NULL) ++ g_object_unref(G_OBJECT(windata->gc)); ++ ++ if (windata->window_region != NULL) ++ gdk_region_destroy(windata->window_region); ++} ++ ++static void ++update_content_hbox_visibility(WindowData *windata) ++{ ++ /* ++ * This is all a hack, but until we have a libview-style ContentBox, ++ * it'll just have to do. ++ */ ++ if (GTK_WIDGET_VISIBLE(windata->icon) || ++ GTK_WIDGET_VISIBLE(windata->body_label) || ++ GTK_WIDGET_VISIBLE(windata->actions_box)) ++ { ++ gtk_widget_show(windata->content_hbox); ++ } ++ else ++ { ++ gtk_widget_hide(windata->content_hbox); ++ } ++} ++ ++GtkWindow * ++create_notification(UrlClickedCb url_clicked) ++{ ++ GtkWidget *spacer; ++ GtkWidget *win; ++ GtkWidget *main_vbox; ++ GtkWidget *hbox; ++ GtkWidget *vbox; ++ GtkWidget *close_button; ++ GtkWidget *image; ++ GtkWidget *alignment; ++ WindowData *windata; ++ GdkColormap *colormap; ++ GdkScreen *screen; ++ ++ windata = g_new0(WindowData, 1); ++ windata->urgency = URGENCY_NORMAL; ++ windata->url_clicked = url_clicked; ++ ++ win = gtk_window_new(GTK_WINDOW_POPUP); ++ windata->win = win; ++ ++ windata->enable_transparency = FALSE; ++ screen = gtk_window_get_screen(GTK_WINDOW(win)); ++ colormap = gdk_screen_get_rgba_colormap(screen); ++ ++ if (colormap != NULL && gdk_screen_is_composited(screen)) ++ { ++ gtk_widget_set_colormap(win, colormap); ++ windata->enable_transparency = TRUE; ++ } ++ ++ ++ gtk_widget_add_events(win, GDK_BUTTON_RELEASE_MASK); ++ gtk_widget_realize(win); ++ g_object_set_data_full(G_OBJECT(win), "windata", windata, ++ (GDestroyNotify)destroy_windata); ++ gtk_widget_set_app_paintable(win, TRUE); ++ ++ g_signal_connect(G_OBJECT(win), "expose-event", ++ G_CALLBACK(draw_border), windata); ++ g_signal_connect(G_OBJECT(win), "motion-notify-event", ++ G_CALLBACK(mouse_over), windata); ++ g_signal_connect(G_OBJECT(win), "leave-notify-event", ++ G_CALLBACK(mouse_over_end), windata); ++ ++ main_vbox = gtk_vbox_new(FALSE, 0); ++ gtk_widget_show(main_vbox); ++ gtk_container_add(GTK_CONTAINER(win), main_vbox); ++ gtk_container_set_border_width(GTK_CONTAINER(main_vbox), 1); ++ ++ windata->top_spacer = gtk_image_new(); ++ gtk_box_pack_start(GTK_BOX(main_vbox), windata->top_spacer, ++ FALSE, FALSE, 0); ++ gtk_widget_set_size_request(windata->top_spacer, -1, DEFAULT_ARROW_HEIGHT); ++ ++ windata->main_hbox = gtk_hbox_new(FALSE, 0); ++ gtk_widget_show(windata->main_hbox); ++ gtk_box_pack_start(GTK_BOX(main_vbox), windata->main_hbox, ++ FALSE, FALSE, 0); ++ ++ windata->bottom_spacer = gtk_image_new(); ++ gtk_box_pack_start(GTK_BOX(main_vbox), windata->bottom_spacer, ++ FALSE, FALSE, 0); ++ gtk_widget_set_size_request(windata->bottom_spacer, -1, ++ DEFAULT_ARROW_HEIGHT+ARROW_DISTANCE); ++ ++ vbox = gtk_vbox_new(FALSE, 0); ++ gtk_widget_show(vbox); ++ gtk_box_pack_start(GTK_BOX(windata->main_hbox), vbox, TRUE, TRUE, 0); ++ gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); ++ ++ hbox = gtk_hbox_new(FALSE, 6); ++ gtk_widget_show(hbox); ++ gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); ++ ++ spacer = gtk_image_new(); ++ gtk_widget_show(spacer); ++ gtk_box_pack_start(GTK_BOX(hbox), spacer, FALSE, FALSE, 0); ++ gtk_widget_set_size_request(spacer, STRIPE_WIDTH, -1); ++ ++ windata->summary_label = gtk_label_new(NULL); ++ gtk_widget_show(windata->summary_label); ++ GtkStyle *style = get_tooltip_style(); ++ gtk_widget_set_style(windata->summary_label, style); ++ ++ gtk_box_pack_start(GTK_BOX(hbox), windata->summary_label, TRUE, TRUE, 0); ++ gtk_misc_set_alignment(GTK_MISC(windata->summary_label), 0, 0); ++ gtk_label_set_line_wrap(GTK_LABEL(windata->summary_label), TRUE); ++ ++ /* Add the close button */ ++ windata->close_button = close_button = gtk_button_new(); ++ gtk_widget_show(close_button); ++ gtk_box_pack_start(GTK_BOX(hbox), close_button, FALSE, FALSE, 0); ++ gtk_button_set_relief(GTK_BUTTON(close_button), GTK_RELIEF_NONE); ++ gtk_container_set_border_width(GTK_CONTAINER(close_button), 0); ++ gtk_widget_set_size_request(close_button, 20, 20); ++ g_signal_connect_swapped(G_OBJECT(close_button), "clicked", ++ G_CALLBACK(gtk_widget_destroy), win); ++ ++ image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU); ++ gtk_widget_show(image); ++ gtk_container_add(GTK_CONTAINER(close_button), image); ++ ++ windata->content_hbox = gtk_hbox_new(FALSE, 6); ++ gtk_box_pack_start(GTK_BOX(vbox), windata->content_hbox, FALSE, FALSE, 0); ++ ++ windata->iconbox = gtk_hbox_new(FALSE, 0); ++ gtk_widget_show(windata->iconbox); ++ gtk_box_pack_start(GTK_BOX(windata->content_hbox), windata->iconbox, ++ FALSE, FALSE, 0); ++ gtk_widget_set_size_request(windata->iconbox, BODY_X_OFFSET, -1); ++ ++ windata->icon = gtk_image_new(); ++ gtk_box_pack_start(GTK_BOX(windata->iconbox), windata->icon, ++ TRUE, TRUE, 0); ++ gtk_misc_set_alignment(GTK_MISC(windata->icon), 0.5, 0.0); ++ ++ vbox = gtk_vbox_new(FALSE, 6); ++ gtk_widget_show(vbox); ++ gtk_box_pack_start(GTK_BOX(windata->content_hbox), vbox, TRUE, TRUE, 0); ++ ++ windata->body_label = sexy_url_label_new(); ++ gtk_box_pack_start(GTK_BOX(vbox), windata->body_label, TRUE, TRUE, 0); ++ gtk_misc_set_alignment(GTK_MISC(windata->body_label), 0, 0); ++ gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE); ++ g_signal_connect_swapped(G_OBJECT(windata->body_label), "url_activated", ++ G_CALLBACK(windata->url_clicked), win); ++ gtk_widget_set_style(windata->body_label, style); ++ ++ alignment = gtk_alignment_new(1, 0.5, 0, 0); ++ gtk_widget_show(alignment); ++ gtk_box_pack_start(GTK_BOX(vbox), alignment, FALSE, TRUE, 0); ++ ++ windata->actions_box = gtk_hbox_new(FALSE, 6); ++ gtk_container_add(GTK_CONTAINER(alignment), windata->actions_box); ++ g_object_unref(G_OBJECT(style)); ++ ++ return GTK_WINDOW(win); ++} ++ ++void ++set_notification_hints(GtkWindow *nw, GHashTable *hints) ++{ ++ WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata"); ++ GValue *value; ++ ++ g_assert(windata != NULL); ++ ++ value = (GValue *)g_hash_table_lookup(hints, "urgency"); ++ ++ if (value) ++ windata->urgency = g_value_get_uchar(value); ++} ++ ++void ++set_notification_timeout(GtkWindow *nw, glong timeout) ++{ ++ WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata"); ++ g_assert(windata != NULL); ++ ++ windata->timeout = timeout; ++} ++ ++void ++notification_tick(GtkWindow *nw, glong remaining) ++{ ++ WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata"); ++ windata->remaining = remaining; ++ ++ if (windata->pie_countdown != NULL) ++ { ++ gtk_widget_queue_draw_area(windata->pie_countdown, 0, 0, ++ PIE_WIDTH, PIE_HEIGHT); ++ } ++} ++ ++void ++set_notification_text(GtkWindow *nw, const char *summary, const char *body) ++{ ++ char *str; ++ WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata"); ++ g_assert(windata != NULL); ++ ++ str = g_markup_printf_escaped("%s", summary); ++ gtk_label_set_markup(GTK_LABEL(windata->summary_label), str); ++ g_free(str); ++ ++ sexy_url_label_set_markup(SEXY_URL_LABEL(windata->body_label), body); ++ ++ if (body == NULL || *body == '\0') ++ gtk_widget_hide(windata->body_label); ++ else ++ gtk_widget_show(windata->body_label); ++ ++ update_content_hbox_visibility(windata); ++ ++ gtk_widget_set_size_request(((body != NULL && *body != '\0') ? ++ windata->body_label : windata->summary_label), ++ WIDTH - (IMAGE_SIZE + IMAGE_PADDING) - 10, ++ -1); ++} ++ ++void ++set_notification_icon(GtkWindow *nw, GdkPixbuf *pixbuf) ++{ ++ WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata"); ++ g_assert(windata != NULL); ++ ++ gtk_image_set_from_pixbuf(GTK_IMAGE(windata->icon), pixbuf); ++ ++ if (pixbuf != NULL) ++ { ++ int pixbuf_width = gdk_pixbuf_get_width(pixbuf); ++ ++ gtk_widget_show(windata->icon); ++ gtk_widget_set_size_request(windata->iconbox, ++ MAX(BODY_X_OFFSET, pixbuf_width), -1); ++ } ++ else ++ { ++ gtk_widget_hide(windata->icon); ++ gtk_widget_set_size_request(windata->iconbox, BODY_X_OFFSET, -1); ++ } ++ ++ update_content_hbox_visibility(windata); ++} ++ ++void ++set_notification_arrow(GtkWindow *nw, gboolean visible, int x, int y) ++{ ++ WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata"); ++ g_assert(windata != NULL); ++ ++ windata->has_arrow = visible; ++ windata->point_x = x; ++ windata->point_y = y; ++ ++ if (!visible) ++ { ++ gtk_widget_hide(windata->top_spacer); ++ gtk_widget_hide(windata->bottom_spacer); ++ } ++} ++ ++static gboolean ++countdown_expose_cb(GtkWidget *pie, GdkEventExpose *event, ++ WindowData *windata) ++{ ++ GtkStyle *style = gtk_widget_get_style(windata->win); ++ ++ cairo_t *context; ++ cairo_surface_t *surface; ++ cairo_t *cr; ++ context = gdk_cairo_create(GDK_DRAWABLE(windata->pie_countdown->window)); ++ cairo_set_operator(context, CAIRO_OPERATOR_SOURCE); ++ surface = cairo_surface_create_similar( ++ cairo_get_target(context), ++ CAIRO_CONTENT_COLOR_ALPHA, ++ pie->allocation.width, ++ pie->allocation.height); ++ cr = cairo_create(surface); ++ ++ fill_background(pie, windata, cr); ++ ++ gdk_cairo_set_source_color(cr, &style->base[GTK_STATE_NORMAL]); ++ ++ cairo_arc(cr, PIE_RADIUS, PIE_RADIUS, PIE_RADIUS, 0, 2 * G_PI); ++ cairo_close_path(cr); ++ ++ cairo_fill(cr); ++ ++ if (windata->timeout > 0) ++ { ++ gdouble pct = (gdouble)windata->remaining / (gdouble)windata->timeout; ++ ++ gdk_cairo_set_source_color(cr, &style->base[GTK_STATE_SELECTED]); ++ ++ cairo_move_to(cr, PIE_RADIUS, PIE_RADIUS); ++ cairo_arc_negative(cr, PIE_RADIUS, PIE_RADIUS, PIE_RADIUS - PIE_INSIDE_BORDER, ++ -G_PI_2, -(pct * G_PI * 2) - G_PI_2); ++ cairo_line_to(cr, PIE_RADIUS, PIE_RADIUS); ++ cairo_fill(cr); ++ } ++ ++ cairo_destroy(cr); ++ cairo_set_source_surface(context, surface, 0, 0); ++ cairo_paint(context); ++ cairo_surface_destroy(surface); ++ cairo_destroy(context); ++ ++ return TRUE; ++} ++ ++static void ++action_clicked_cb(GtkWidget *w, GdkEventButton *event, ++ ActionInvokedCb action_cb) ++{ ++ GtkWindow *nw = g_object_get_data(G_OBJECT(w), "_nw"); ++ const char *key = g_object_get_data(G_OBJECT(w), "_action_key"); ++ ++ action_cb(nw, key); ++} ++ ++void ++add_notification_action(GtkWindow *nw, const char *text, const char *key, ++ ActionInvokedCb cb) ++{ ++ WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata"); ++ GtkWidget *label; ++ GtkWidget *button; ++ GtkWidget *hbox; ++ GdkPixbuf *pixbuf; ++ char *buf; ++ ++ g_assert(windata != NULL); ++ ++ if (!GTK_WIDGET_VISIBLE(windata->actions_box)) ++ { ++ GtkWidget *alignment; ++ ++ gtk_widget_show(windata->actions_box); ++ update_content_hbox_visibility(windata); ++ ++ alignment = gtk_alignment_new(1, 0.5, 0, 0); ++ gtk_widget_show(alignment); ++ gtk_box_pack_end(GTK_BOX(windata->actions_box), alignment, ++ FALSE, TRUE, 0); ++ ++ windata->pie_countdown = gtk_drawing_area_new(); ++ gtk_widget_show(windata->pie_countdown); ++ gtk_container_add(GTK_CONTAINER(alignment), windata->pie_countdown); ++ gtk_widget_set_size_request(windata->pie_countdown, ++ PIE_WIDTH, PIE_HEIGHT); ++ g_signal_connect(G_OBJECT(windata->pie_countdown), "expose_event", ++ G_CALLBACK(countdown_expose_cb), windata); ++ } ++ ++ button = gtk_button_new(); ++ gtk_widget_show(button); ++ gtk_box_pack_start(GTK_BOX(windata->actions_box), button, FALSE, FALSE, 0); ++ ++ hbox = gtk_hbox_new(FALSE, 6); ++ gtk_widget_show(hbox); ++ gtk_container_add(GTK_CONTAINER(button), hbox); ++ ++ /* Try to be smart and find a suitable icon. */ ++ buf = g_strdup_printf("stock_%s", key); ++ pixbuf = gtk_icon_theme_load_icon( ++ gtk_icon_theme_get_for_screen( ++ gdk_drawable_get_screen(GTK_WIDGET(nw)->window)), ++ buf, 16, GTK_ICON_LOOKUP_USE_BUILTIN, NULL); ++ g_free(buf); ++ ++ if (pixbuf != NULL) ++ { ++ GtkWidget *image = gtk_image_new_from_pixbuf(pixbuf); ++ gtk_widget_show(image); ++ gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0); ++ gtk_misc_set_alignment(GTK_MISC(image), 0.5, 0.5); ++ } ++ ++ label = gtk_label_new(NULL); ++ /* mvo: hardcode black here, it sucks */ ++ GdkColor black; ++ gdk_color_black(gdk_colormap_get_system(), &black); ++ gtk_widget_modify_fg(label, GTK_STATE_NORMAL, &black); ++ ++ gtk_widget_show(label); ++ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); ++ gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); ++ buf = g_strdup_printf("%s", text); ++ gtk_label_set_markup(GTK_LABEL(label), buf); ++ ++ g_free(buf); ++ ++ g_object_set_data(G_OBJECT(button), "_nw", nw); ++ g_object_set_data_full(G_OBJECT(button), ++ "_action_key", g_strdup(key), g_free); ++ g_signal_connect(G_OBJECT(button), "button-release-event", ++ G_CALLBACK(action_clicked_cb), cb); ++} ++ ++ ++static void ++create_border_with_arrow(GtkWidget *nw, WindowData *windata) ++{ ++ GtkRequisition req; ++ GdkScreen *screen; ++ int monitor_num; ++ GdkRectangle monitor_geom; ++ int monitor_left, monitor_right, monitor_top, monitor_bottom; ++ int arrow_side1_width = DEFAULT_ARROW_WIDTH / 2; ++ int arrow_side2_width = DEFAULT_ARROW_WIDTH / 2; ++ int arrow_offset = DEFAULT_ARROW_OFFSET; ++ ++ gtk_widget_realize(nw); ++ gtk_widget_size_request(nw, &req); ++ ++ screen = gdk_drawable_get_screen(GDK_DRAWABLE(nw->window)); ++ monitor_num = gdk_screen_get_monitor_at_point(screen, ++ windata->point_x, windata->point_y); ++ gdk_screen_get_monitor_geometry(screen, monitor_num, &monitor_geom); ++ ++ monitor_left = monitor_geom.x; ++ monitor_right = monitor_left + monitor_geom.width; ++ monitor_top = monitor_geom.y; ++ monitor_bottom = monitor_top + monitor_geom.height; ++ ++ if (windata->point_y + req.height + DEFAULT_ARROW_HEIGHT >= monitor_bottom) ++ windata->arrow_type = GTK_ARROW_DOWN; ++ else ++ windata->arrow_type = GTK_ARROW_UP; ++ ++ /* Handle the offset and such */ ++ switch (windata->arrow_type) ++ { ++ case GTK_ARROW_NONE: ++ /* nothing to do */ ++ break; ++ case GTK_ARROW_UP: ++ case GTK_ARROW_DOWN: ++ if (windata->point_x < monitor_left + arrow_side1_width) ++ { ++ arrow_side1_width = 0; ++ arrow_offset = 0; ++ } ++ else if (windata->point_x >= monitor_right - arrow_side2_width) ++ { ++ arrow_side2_width = 0; ++ arrow_offset = req.width - arrow_side1_width; ++ } ++ else ++ { ++ if (windata->point_x - arrow_side2_width + req.width >= ++ monitor_right) ++ { ++ arrow_offset = ++ req.width - arrow_side1_width - arrow_side2_width - ++ (monitor_right - MAX(windata->point_x + ++ arrow_side1_width, ++ monitor_right - ++ DEFAULT_ARROW_OFFSET)); ++ } ++ else ++ { ++ arrow_offset = MIN(windata->point_x - arrow_side1_width - monitor_left, ++ DEFAULT_ARROW_OFFSET); ++ } ++ ++ } ++ ++ windata->drawn_arrow_begin_x = arrow_offset; ++ windata->drawn_arrow_middle_x = arrow_offset + arrow_side1_width; ++ windata->drawn_arrow_end_x = arrow_offset + arrow_side1_width + ++ arrow_side2_width; ++ ++ if (windata->arrow_type == GTK_ARROW_UP) ++ { ++ gtk_widget_show(windata->top_spacer); ++ windata->drawn_arrow_begin_y = DEFAULT_ARROW_HEIGHT; ++ windata->drawn_arrow_middle_y = 0; ++ windata->drawn_arrow_end_y = DEFAULT_ARROW_HEIGHT; ++ } ++ else ++ { ++ gtk_widget_show(windata->bottom_spacer); ++ windata->drawn_arrow_begin_y = req.height; ++ windata->drawn_arrow_middle_y = req.height + ++ DEFAULT_ARROW_HEIGHT; ++ windata->drawn_arrow_end_y = req.height; ++ } ++ ++ gtk_window_move(GTK_WINDOW(nw), ++ windata->point_x - arrow_offset - ++ arrow_side1_width, ++ (windata->arrow_type == GTK_ARROW_UP ++ ? windata->point_y ++ : windata->point_y - req.height - ++ DEFAULT_ARROW_HEIGHT)); ++ ++ break; ++ ++ case GTK_ARROW_LEFT: ++ case GTK_ARROW_RIGHT: ++ if (windata->point_y < monitor_top + arrow_side1_width) ++ { ++ arrow_side1_width = 0; ++ arrow_offset = windata->point_y; ++ } ++ else if (windata->point_y >= monitor_bottom - arrow_side2_width) ++ { ++ arrow_side2_width = 0; ++ arrow_offset = windata->point_y - arrow_side1_width; ++ } ++ break; ++ } ++ ++ draw_border(nw, NULL, windata); ++} ++ ++void ++move_notification(GtkWindow *nw, int x, int y) ++{ ++ WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata"); ++ g_assert(windata != NULL); ++ ++ if (windata->has_arrow) ++ { ++ create_border_with_arrow(GTK_WIDGET(nw), windata); ++ } ++ else ++ { ++ gtk_window_move(GTK_WINDOW(nw), x, y); ++ } ++} ++ ++void ++get_theme_info(char **theme_name, ++ char **theme_ver, ++ char **author, ++ char **homepage) ++{ ++ *theme_name = g_strdup("Ubuntu"); ++ *theme_ver = g_strdup_printf("%d.%d.%d", ++ NOTIFICATION_DAEMON_MAJOR_VERSION, ++ NOTIFICATION_DAEMON_MINOR_VERSION, ++ NOTIFICATION_DAEMON_MICRO_VERSION); ++ *author = g_strdup("Michael Vogt"); ++ *homepage = g_strdup("http://www.ubuntu.com/"); ++} ++ ++gboolean ++theme_check_init(unsigned int major_ver, unsigned int minor_ver, ++ unsigned int micro_ver) ++{ ++ return major_ver == NOTIFICATION_DAEMON_MAJOR_VERSION && ++ minor_ver == NOTIFICATION_DAEMON_MINOR_VERSION && ++ micro_ver == NOTIFICATION_DAEMON_MICRO_VERSION; ++} ++ ++void ++clear_notification_actions(GtkWindow *nw) ++{ ++ WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata"); ++ ++ windata->pie_countdown = NULL; ++ ++ gtk_widget_hide(windata->actions_box); ++ gtk_container_foreach(GTK_CONTAINER(windata->actions_box), ++ (GtkCallback)gtk_object_destroy, NULL); ++} --- notification-daemon-0.4.0.orig/debian/patches/07_memleak_daemon.patch +++ notification-daemon-0.4.0/debian/patches/07_memleak_daemon.patch @@ -0,0 +1,13 @@ +diff -Nur -x '*.orig' -x '*~' ubuntu/src/daemon/daemon.c ubuntu.new/src/daemon/daemon.c +--- ubuntu/src/daemon/daemon.c 2008-05-26 10:50:52.000000000 +0200 ++++ ubuntu.new/src/daemon/daemon.c 2008-05-26 10:55:19.000000000 +0200 +@@ -763,8 +763,7 @@ + } + + if (temp_data != NULL) +- free(temp_data); +- ++ XFree(temp_data); + return active; + } + --- notification-daemon-0.4.0.orig/debian/patches/04_dont_crash_on_critical_warnings.patch +++ notification-daemon-0.4.0/debian/patches/04_dont_crash_on_critical_warnings.patch @@ -0,0 +1,12 @@ +diff -urNad notification-daemon-0.3.6.orig/src/daemon.c notification-daemon-0.3.6/src/daemon.c +--- notification-daemon-0.3.6.orig/src/daemon/daemon.c 2006-09-07 19:31:45.000000000 +0200 ++++ notification-daemon-0.3.6/src/daemon/daemon.c 2006-11-18 14:28:44.000000000 +0100 +@@ -1065,7 +1065,7 @@ + GError *error; + guint request_name_result; + +- g_log_set_always_fatal(G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL); ++ //g_log_set_always_fatal(G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL); + + gtk_init(&argc, &argv); + gconf_init(argc, argv, NULL);