Package: liferea
Version: 1.6.4-1
Severity: normal
Tags: patch
Justification: Policy 9.3.2
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu maverick ubuntu-patch

Hello,

In Ubuntu we applied the following changes:

- debian/patches/fix_systray_behavior: fix systray mis-behaviour when
  Liferea is visible in another workspace.
- debian/patches/notification-append: add patch to make the notification
  use the append feature of notify-osd. (LP: #457869)
* debian/control: Build-Depend on "libice-dev" for the "libICE" library
* debian/rules: export "LIBS=-lICE" to fix the FTBFS due to
  binutils-gold

and we think you might be interested in applying them too. Attaching the
patch.


diff -pruN 1.6.4-1/debian/control 1.6.4-1ubuntu1/debian/control
--- 1.6.4-1/debian/control	2010-07-19 21:09:44.000000000 +0100
+++ 1.6.4-1ubuntu1/debian/control	2010-11-02 12:58:11.000000000 +0000
@@ -1,15 +1,16 @@
 Source: liferea
 Section: web
 Priority: optional
 Maintainer: Luis Rodrigo Gallardo Cruz <rodr...@debian.org>
 Uploaders: Emilio Pozuelo Monfort <po...@debian.org>
 Build-Depends: autotools-dev, quilt (>=0.40), debhelper (>= 7.0.0),
  libgconf2-dev, libdbus-glib-1-dev, libsm-dev, libsoup2.4-dev (>= 2.26.1),
  liblua5.1-0-dev, libnotify-dev, libxml-parser-perl, libxslt1-dev,
  libsqlite3-dev (>= 3.6.10), libglade2-dev, libgtk2.0-dev (>= 2.16.0),
  libglib2.0-dev (>= 2.16.0), libwebkit-dev (>= 1.1.7),
  libnm-glib-dev [linux-any],
- intltool, libicu-dev
+ intltool, libicu-dev, libice-dev
 Standards-Version: 3.9.0
 Homepage: http://liferea.sourceforge.net/
 Vcs-Browser: http://git.debian.org/?p=collab-maint/liferea.git
diff -pruN 1.6.4-1/debian/patches/fix_systray_behavior 1.6.4-1ubuntu1/debian/patches/fix_systray_behavior
--- 1.6.4-1/debian/patches/fix_systray_behavior	1970-01-01 01:00:00.000000000 +0100
+++ 1.6.4-1ubuntu1/debian/patches/fix_systray_behavior	2010-11-02 12:58:11.000000000 +0000
@@ -0,0 +1,66 @@
+---
+ src/ui/liferea_shell.c |   14 ++++++++++++--
+ src/ui/ui_tray.c       |    5 ++++-
+ 2 files changed, 16 insertions(+), 3 deletions(-)
+
+Index: liferea-1.6.0~rc6/src/ui/ui_tray.c
+===================================================================
+--- liferea-1.6.0~rc6.orig/src/ui/ui_tray.c
++++ liferea-1.6.0~rc6/src/ui/ui_tray.c
+@@ -205,17 +205,20 @@
+ 	g_free (tmp);
+ 	g_free (msg);
+ }
+ 
+ /* a click on the systray icon should show the program window
+    if invisible or hide it if visible */
+ static void
+ tray_icon_pressed (GtkWidget *button, GdkEventButton *event, EggTrayIcon *icon)
+-{	
++{
++	if ((event->type == GDK_2BUTTON_PRESS) || (event->type == GDK_3BUTTON_PRESS))
++		return;  /* ignore double and triple clicks */
++
+ 	switch (event->button) {
+ 		case 1:
+ 			liferea_shell_toggle_visibility ();
+ 			break;
+ 		case 3:
+ 			ui_popup_systray_menu (event->button, event->time);
+ 			break;
+ 	}
+Index: liferea-1.6.0~rc6/src/ui/liferea_shell.c
+===================================================================
+--- liferea-1.6.0~rc6.orig/src/ui/liferea_shell.c
++++ liferea-1.6.0~rc6/src/ui/liferea_shell.c
+@@ -1348,18 +1348,28 @@
+ 	gtk_window_present (shell->priv->window);
+ }
+ 
+ void
+ liferea_shell_toggle_visibility (void)
+ {
+ 	GtkWidget *mainwindow = GTK_WIDGET (shell->priv->window);
+ 	
+-	if ((gdk_window_get_state (mainwindow->window) & GDK_WINDOW_STATE_ICONIFIED) ||
+-	    !GTK_WIDGET_VISIBLE (mainwindow)) {
++	if(gdk_window_get_state(GTK_WIDGET(mainwindow)->window) & GDK_WINDOW_STATE_ICONIFIED) {
++		/* The window is either iconified, or on another workspace */
++		/* Raise it in one click */
++		if (GTK_WIDGET_VISIBLE(mainwindow)) {
++			liferea_shell_save_position ();
++			gtk_widget_hide(mainwindow);
++		}
++		liferea_shell_restore_position();
++		gtk_window_present(GTK_WINDOW(mainwindow));
++	}
++	else if(!GTK_WIDGET_VISIBLE(mainwindow)) {
++		/* The window is neither iconified nor on another workspace, but is not visible */
+ 		liferea_shell_restore_position ();
+ 		gtk_window_present (shell->priv->window);
+ 	} else {
+ 		liferea_shell_save_position ();
+ 		gtk_widget_hide (mainwindow);
+ 	}
+ }
+
diff -pruN 1.6.4-1/debian/patches/notification-append 1.6.4-1ubuntu1/debian/patches/notification-append
--- 1.6.4-1/debian/patches/notification-append	1970-01-01 01:00:00.000000000 +0100
+++ 1.6.4-1ubuntu1/debian/patches/notification-append	2010-11-02 12:58:11.000000000 +0000
@@ -0,0 +1,44 @@
+diff -ur liferea-1.6.0-rc6/src/notification/libnotify.c liferea-ted/src/notification/libnotify.c
+--- liferea-1.6.0-rc6/src/notification/libnotify.c	2009-06-20 13:33:19.000000000 -0500
++++ liferea-ted/src/notification/libnotify.c	2009-09-10 23:00:39.000000000 -0500
+@@ -44,6 +44,7 @@
+ #include "notification/notification.h"
+ 
+ static gboolean supports_actions = FALSE;
++static gboolean supports_append  = FALSE;
+ 
+ static void notif_libnotify_callback_open ( NotifyNotification *n, gchar *action, gpointer user_data ) {
+ 	g_assert(action != NULL);
+@@ -188,7 +189,11 @@
+ 			for (c = caps; c != NULL; c = c->next) {
+ 				if (g_str_equal ((char*)c->data, "actions")) {
+ 					supports_actions = TRUE;
+-					break;
++					continue;
++				}
++				if (g_str_equal ((char*)c->data, "append")) {
++					supports_append = TRUE;
++					continue;
+ 				}
+ 			}
+ 			g_list_foreach (caps, (GFunc)g_free, NULL);
+@@ -242,12 +247,16 @@
+ 	if (item_count == 0)
+ 		return;
+ 
+-	labelSummary_p = g_strdup_printf (ngettext ("%s has %d new / updated headline\n", "%s has %d new / updated headlines\n", item_count), 
++	labelSummary_p = g_strdup_printf (ngettext ("<b>%s</b> has <b>%d</b> update", "<b>%s</b> has <b>%d</b> updates", item_count), 
+ 	                                  node_get_title (node), item_count);
+-	n = notify_notification_new ( _("Feed Update"), labelSummary_p, NULL, NULL);
++	n = notify_notification_new ( _("Feed Update"), labelSummary_p, "liferea", NULL);
+ 	g_free(labelSummary_p);
+ 
+-	notify_notification_set_icon_from_pixbuf (n, node_get_icon (node));
++	if (supports_append) {
++		notify_notification_set_hint_string(n, "append", "allow");
++	} else {
++		notify_notification_set_icon_from_pixbuf (n, node_get_icon (node));
++	}
+ 	notify_notification_set_timeout (n, NOTIFY_EXPIRES_DEFAULT);
+ 	if (supports_actions) {
+ 		notify_notification_add_action (n, "show_details", _("Show details"),
diff -pruN 1.6.4-1/debian/patches/series 1.6.4-1ubuntu1/debian/patches/series
--- 1.6.4-1/debian/patches/series	2010-07-19 21:09:44.000000000 +0100
+++ 1.6.4-1ubuntu1/debian/patches/series	2010-11-02 12:58:11.000000000 +0000
@@ -1,3 +1,9 @@
 www-browser
 debian-example-feeds
 libtool-dont-rearange-as-needed
+fix_systray_behavior
+notification-append
diff -pruN 1.6.4-1/debian/rules 1.6.4-1ubuntu1/debian/rules
--- 1.6.4-1/debian/rules	2010-07-19 21:09:44.000000000 +0100
+++ 1.6.4-1ubuntu1/debian/rules	2010-11-02 12:58:11.000000000 +0000
@@ -3,7 +3,9 @@
 # GNU copyright 1997 to 1999 by Joey Hess.
 
 CFLAGS += -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
 LDFLAGS += "-Wl,--as-needed"
+
+export LIBS=-lICE

Reply via email to