updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / liferea-unity / gtk-status-icon.patch
blob919889745e8a75a1f04cc267c1c3b26238627d1f
1 Description: backport GtkStatusIcon support to get proper icon transparency
2 Origin: backport, from trunk thanks to Eric Work
3 Bug: http://sourceforge.net/tracker/?func=detail&aid=2788746&group_id=87005&atid=581686
4 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/liferea/+bug/101980
6 --- liferea-1.6.4.orig/src/ui/Makefile.in
7 +++ liferea-1.6.4/src/ui/Makefile.in
8 @@ -50,7 +50,6 @@ libliui_a_AR = $(AR) $(ARFLAGS)
9 libliui_a_LIBADD =
10 am_libliui_a_OBJECTS = libliui_a-auth_dialog.$(OBJEXT) \
11 libliui_a-browser_tabs.$(OBJEXT) \
12 - libliui_a-eggtrayicon.$(OBJEXT) \
13 libliui_a-enclosure_list_view.$(OBJEXT) \
14 libliui_a-itemview.$(OBJEXT) \
15 libliui_a-liferea_dialog.$(OBJEXT) \
16 @@ -251,7 +250,6 @@ libliui_a_CFLAGS = $(PACKAGE_CFLAGS) $(D
17 libliui_a_SOURCES = \
18 auth_dialog.c auth_dialog.h \
19 browser_tabs.c browser_tabs.h \
20 - eggtrayicon.c eggtrayicon.h \
21 enclosure_list_view.c enclosure_list_view.h \
22 itemview.c itemview.h \
23 liferea_dialog.c liferea_dialog.h \
24 @@ -326,7 +324,6 @@ distclean-compile:
26 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libliui_a-auth_dialog.Po@am__quote@
27 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libliui_a-browser_tabs.Po@am__quote@
28 -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libliui_a-eggtrayicon.Po@am__quote@
29 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libliui_a-enclosure_list_view.Po@am__quote@
30 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libliui_a-itemview.Po@am__quote@
31 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libliui_a-liferea_dialog.Po@am__quote@
32 @@ -400,20 +397,6 @@ libliui_a-browser_tabs.obj: browser_tabs
33 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
34 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libliui_a_CFLAGS) $(CFLAGS) -c -o libliui_a-browser_tabs.obj `if test -f 'browser_tabs.c'; then $(CYGPATH_W) 'browser_tabs.c'; else $(CYGPATH_W) '$(srcdir)/browser_tabs.c'; fi`
36 -libliui_a-eggtrayicon.o: eggtrayicon.c
37 -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libliui_a_CFLAGS) $(CFLAGS) -MT libliui_a-eggtrayicon.o -MD -MP -MF $(DEPDIR)/libliui_a-eggtrayicon.Tpo -c -o libliui_a-eggtrayicon.o `test -f 'eggtrayicon.c' || echo '$(srcdir)/'`eggtrayicon.c
38 -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libliui_a-eggtrayicon.Tpo $(DEPDIR)/libliui_a-eggtrayicon.Po
39 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eggtrayicon.c' object='libliui_a-eggtrayicon.o' libtool=no @AMDEPBACKSLASH@
40 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
41 -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libliui_a_CFLAGS) $(CFLAGS) -c -o libliui_a-eggtrayicon.o `test -f 'eggtrayicon.c' || echo '$(srcdir)/'`eggtrayicon.c
43 -libliui_a-eggtrayicon.obj: eggtrayicon.c
44 -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libliui_a_CFLAGS) $(CFLAGS) -MT libliui_a-eggtrayicon.obj -MD -MP -MF $(DEPDIR)/libliui_a-eggtrayicon.Tpo -c -o libliui_a-eggtrayicon.obj `if test -f 'eggtrayicon.c'; then $(CYGPATH_W) 'eggtrayicon.c'; else $(CYGPATH_W) '$(srcdir)/eggtrayicon.c'; fi`
45 -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libliui_a-eggtrayicon.Tpo $(DEPDIR)/libliui_a-eggtrayicon.Po
46 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eggtrayicon.c' object='libliui_a-eggtrayicon.obj' libtool=no @AMDEPBACKSLASH@
47 -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
48 -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libliui_a_CFLAGS) $(CFLAGS) -c -o libliui_a-eggtrayicon.obj `if test -f 'eggtrayicon.c'; then $(CYGPATH_W) 'eggtrayicon.c'; else $(CYGPATH_W) '$(srcdir)/eggtrayicon.c'; fi`
50 libliui_a-enclosure_list_view.o: enclosure_list_view.c
51 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libliui_a_CFLAGS) $(CFLAGS) -MT libliui_a-enclosure_list_view.o -MD -MP -MF $(DEPDIR)/libliui_a-enclosure_list_view.Tpo -c -o libliui_a-enclosure_list_view.o `test -f 'enclosure_list_view.c' || echo '$(srcdir)/'`enclosure_list_view.c
52 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libliui_a-enclosure_list_view.Tpo $(DEPDIR)/libliui_a-enclosure_list_view.Po
53 --- liferea-1.6.4.orig/src/ui/eggtrayicon.h
54 +++ liferea-1.6.4/src/ui/eggtrayicon.h
55 @@ -1,80 +0,0 @@
56 -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
57 -/* eggtrayicon.h
58 - * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
59 - *
60 - * This library is free software; you can redistribute it and/or
61 - * modify it under the terms of the GNU Lesser General Public
62 - * License as published by the Free Software Foundation; either
63 - * version 2 of the License, or (at your option) any later version.
64 - *
65 - * This library is distributed in the hope that it will be useful,
66 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
67 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
68 - * Lesser General Public License for more details.
69 - *
70 - * You should have received a copy of the GNU Lesser General Public
71 - * License along with this library; if not, write to the
72 - * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
73 - * Boston, MA 02111-1307, USA.
74 - */
76 -#ifndef __EGG_TRAY_ICON_H__
77 -#define __EGG_TRAY_ICON_H__
79 -#include <gtk/gtk.h>
80 -#ifdef GDK_WINDOWING_X11
81 -#include <gdk/gdkx.h>
82 -#endif
84 -G_BEGIN_DECLS
86 -#define EGG_TYPE_TRAY_ICON (egg_tray_icon_get_type ())
87 -#define EGG_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon))
88 -#define EGG_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
89 -#define EGG_IS_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON))
90 -#define EGG_IS_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON))
91 -#define EGG_TRAY_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
93 -typedef struct _EggTrayIcon EggTrayIcon;
94 -typedef struct _EggTrayIconClass EggTrayIconClass;
96 -struct _EggTrayIcon
98 - GtkPlug parent_instance;
100 - guint stamp;
102 -#ifdef GDK_WINDOWING_X11
103 - Atom selection_atom;
104 - Atom manager_atom;
105 - Atom system_tray_opcode_atom;
106 - Atom orientation_atom;
107 - Window manager_window;
108 -#endif
109 - GtkOrientation orientation;
112 -struct _EggTrayIconClass
114 - GtkPlugClass parent_class;
117 -GType egg_tray_icon_get_type (void);
119 -EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen *screen,
120 - const gchar *name);
122 -EggTrayIcon *egg_tray_icon_new (const gchar *name);
124 -guint egg_tray_icon_send_message (EggTrayIcon *icon,
125 - gint timeout,
126 - const char *message,
127 - gint len);
128 -void egg_tray_icon_cancel_message (EggTrayIcon *icon,
129 - guint id);
131 -GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon);
133 -G_END_DECLS
135 -#endif /* __EGG_TRAY_ICON_H__ */
136 --- liferea-1.6.4.orig/src/ui/ui_tray.c
137 +++ liferea-1.6.4/src/ui/ui_tray.c
138 @@ -3,6 +3,7 @@
140 * Copyright (C) 2003-2009 Lars Lindner <lars.lindner@gmail.com>
141 * Copyright (C) 2004 Christophe Barbe <christophe.barbe@ufies.org>
142 + * Copyright (C) 2009 Hubert Figuiere <hub@figuiere.net>
144 * This program is free software; you can redistribute it and/or modify
145 * it under the terms of the GNU General Public License as published by
146 @@ -30,7 +31,6 @@
148 #include "common.h"
149 #include "conf.h"
150 -#include "eggtrayicon.h"
151 #include "feedlist.h"
152 #include "net.h"
153 #include "ui/liferea_shell.h"
154 @@ -40,20 +40,14 @@
155 #include "ui/ui_tray.h"
157 // FIXME: determine this from Pango or Cairo somehow...
158 -#define FONT_CHAR_WIDTH 6
159 +#define FONT_CHAR_WIDTH 6
160 #define FONT_CHAR_HEIGHT 8
162 -#define TRAY_ICON_WIDTH 16
163 -#define TRAY_ICON_HEIGHT 16
165 static struct trayIcon_priv {
166 int trayCount; /**< reference counter */
167 GdkPixbuf *currentIcon; /**< currently displayed icon */
169 - EggTrayIcon *widget; /**< the tray icon widget */
170 - GtkWidget *image; /**< render widget in the notification area */
171 - GtkWidget *alignment;
172 - GtkWidget *eventBox;
173 + GtkStatusIcon *status_icon; /**< the tray icon widget */
174 } *trayIcon_priv = NULL;
176 static void ui_tray_install(void);
177 @@ -61,112 +55,130 @@ static void ui_tray_install(void);
178 static void
179 ui_tray_tooltip_set (const gchar *message)
181 - gtk_widget_set_tooltip_text(GTK_WIDGET(trayIcon_priv->eventBox), message);
182 + gtk_status_icon_set_tooltip_text(trayIcon_priv->status_icon, message);
185 -static void ui_tray_expose_cb() {
186 +static GdkPixbuf*
187 +ui_tray_make_icon (void)
189 cairo_t *c;
190 + cairo_surface_t *cs;
191 gchar *str;
192 guint newItems;
193 - GtkRequisition requisition;
195 - gtk_widget_size_request(GTK_WIDGET(trayIcon_priv->widget), &requisition);
197 + gint size, i, j;
198 + gint w, h;
199 + int stride, pstride;
200 + unsigned char *data, *row;
201 + guchar *pixels, *p;
202 + GdkPixbuf *out;
204 /* We expect currentIcon to be a 16x16 image and we will
205 render a colored area with height 10 in the middle of
206 the image with 8pt text inside */
208 - gdk_draw_pixbuf(GDK_DRAWABLE(trayIcon_priv->image->window),
209 - NULL, trayIcon_priv->currentIcon, 0, 0,
210 - (requisition.width > TRAY_ICON_WIDTH)?(requisition.width - TRAY_ICON_WIDTH)/2 - 1:0,
211 - (requisition.height > TRAY_ICON_HEIGHT)?(requisition.height - TRAY_ICON_HEIGHT)/2 - 1:0,
212 - gdk_pixbuf_get_width(trayIcon_priv->currentIcon),
213 - gdk_pixbuf_get_height(trayIcon_priv->currentIcon),
214 - GDK_RGB_DITHER_NONE, 0, 0);
215 + h = gdk_pixbuf_get_height(trayIcon_priv->currentIcon);
216 + w = gdk_pixbuf_get_width(trayIcon_priv->currentIcon);
218 + /* this is a hack as we don't know the size of status icon
219 + * if it is not embedded.
220 + */
221 + if(gtk_status_icon_is_embedded (trayIcon_priv->status_icon)) {
222 + size = gtk_status_icon_get_size (trayIcon_priv->status_icon);
223 + } else {
224 + size = MAX(h,w);
227 if(!conf_get_bool_value(SHOW_NEW_COUNT_IN_TRAY))
228 - return;
229 + return trayIcon_priv->currentIcon;
231 newItems = feedlist_get_new_item_count();
233 + cs = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, size, size);
234 + c = cairo_create (cs);
235 + cairo_set_antialias (c, CAIRO_ANTIALIAS_NONE);
237 + gdk_cairo_set_source_pixbuf (c, trayIcon_priv->currentIcon,
238 + (size - w) / 2, (size - h) / 2);
239 + cairo_paint (c);
241 if(newItems > 0) {
242 guint textWidth, textStart;
243 - str = g_strdup_printf("%d", newItems);
244 + /* GtkStatusIcon doesn't allow non-square icons yet, so the
245 + * part that doesn't fit is just cropped. Don't put a large
246 + * text there then, otherwise it won't appear entirely.
247 + */
248 + if (newItems > 99)
249 + str = g_strdup_printf ("99+");
250 + else
251 + str = g_strdup_printf ("%d", newItems);
252 textWidth = strlen(str) * FONT_CHAR_WIDTH;
254 - if(textWidth + 2 > TRAY_ICON_WIDTH)
255 + if(textWidth + 2 > size)
256 textStart = 1;
257 else
258 - textStart = TRAY_ICON_WIDTH/2 - textWidth/2;
259 + textStart = size/2 - textWidth/2;
261 - c = gdk_cairo_create(trayIcon_priv->image->window);
262 - cairo_rectangle(c, textStart - 1, 3, textWidth + 1, FONT_CHAR_HEIGHT + 2);
263 - cairo_set_source_rgb(c, 1, 0.50, 0.10); // orange
264 + cairo_rectangle(c, textStart - 1, size/2 - (FONT_CHAR_HEIGHT + 2)/2,
265 + textWidth + 1, FONT_CHAR_HEIGHT + 2);
266 + cairo_set_source_rgba(c, 1, 0.50, 0.10, 1.0); // orange
267 cairo_fill(c);
269 - cairo_set_source_rgb(c, 1, 1, 1);
270 - cairo_move_to(c, textStart - 1, 3 + FONT_CHAR_HEIGHT);
271 + cairo_set_source_rgba(c, 1, 1, 1, 1.0);
272 + cairo_move_to(c, textStart - 1, size/2 - (FONT_CHAR_HEIGHT + 2)/2 + FONT_CHAR_HEIGHT);
273 cairo_select_font_face(c, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
274 cairo_set_font_size(c, FONT_CHAR_HEIGHT + 2);
275 cairo_show_text(c, str);
276 - cairo_destroy(c);
278 g_free(str);
281 + stride = cairo_image_surface_get_stride (cs);
282 + data = cairo_image_surface_get_data (cs);
284 + out = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, size, size);
285 + pstride = gdk_pixbuf_get_rowstride (out);
286 + pixels = gdk_pixbuf_get_pixels (out);
287 + for (i = 0; i < size; i++) {
288 + row = data + (i * stride);
289 + p = pixels + (i * pstride);
290 + for (j = 0; j < size; j++) {
291 + guint32 px = *(guint32*)row;
292 + p[0] = (px & 0xff0000) >> 16;
293 + p[1] = (px & 0xff00) >> 8;
294 + p[2] = (px & 0xff);
295 + p[3] = (px & 0xff000000) >> 24;
296 + p += 4;
297 + row += 4;
301 + cairo_destroy(c);
302 + cairo_surface_destroy (cs);
304 + return out;
308 static void
309 ui_tray_icon_set (gint newItems, GdkPixbuf *icon)
311 - guint width;
313 - g_assert (trayIcon_priv->widget);
314 + g_assert (trayIcon_priv->status_icon);
316 /* Having two code branches here to have real transparency
317 at least with new count disabled... */
318 if (conf_get_bool_value (SHOW_NEW_COUNT_IN_TRAY)) {
319 - width = ((guint) log10 (newItems) + 1) * FONT_CHAR_WIDTH;
320 - width += 2; /* number color border */
321 - width += 2; /* tray icon padding */;
322 - if (width < 16)
323 - width = 16;
325 trayIcon_priv->currentIcon = icon;
327 - if (trayIcon_priv->image)
328 - gtk_widget_destroy (trayIcon_priv->image);
330 - if (trayIcon_priv->alignment)
331 - gtk_widget_destroy (trayIcon_priv->alignment);
333 - trayIcon_priv->alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
334 - trayIcon_priv->image = gtk_drawing_area_new ();
335 - gtk_widget_set_size_request (trayIcon_priv->image, width, 16);
336 - g_signal_connect (G_OBJECT (trayIcon_priv->image), "expose_event",
337 - G_CALLBACK (ui_tray_expose_cb), NULL);
339 - gtk_container_add (GTK_CONTAINER (trayIcon_priv->eventBox), trayIcon_priv->alignment);
340 - gtk_container_add (GTK_CONTAINER (trayIcon_priv->alignment), trayIcon_priv->image);
341 - gtk_widget_show_all (GTK_WIDGET(trayIcon_priv->widget));
342 + gtk_status_icon_set_from_pixbuf (trayIcon_priv->status_icon, ui_tray_make_icon ());
343 } else {
344 /* Skip loading icon if already displayed. */
345 if (icon == trayIcon_priv->currentIcon)
346 return;
347 trayIcon_priv->currentIcon = icon;
349 - if (trayIcon_priv->image)
350 - gtk_widget_destroy (trayIcon_priv->image);
352 - if (trayIcon_priv->alignment) {
353 - gtk_widget_destroy (trayIcon_priv->alignment);
354 - trayIcon_priv->alignment = NULL;
357 - trayIcon_priv->alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
358 - trayIcon_priv->image = gtk_image_new_from_pixbuf (icon);
359 - gtk_container_add (GTK_CONTAINER (trayIcon_priv->eventBox), trayIcon_priv->alignment);
360 - gtk_container_add (GTK_CONTAINER (trayIcon_priv->alignment), trayIcon_priv->image);
361 - gtk_widget_show_all (GTK_WIDGET (trayIcon_priv->widget));
363 + gtk_status_icon_set_from_pixbuf(trayIcon_priv->status_icon, icon);
367 void
368 @@ -216,72 +228,41 @@ ui_tray_update (void)
369 g_free (msg);
372 -/* a click on the systray icon should show the program window
373 - if invisible or hide it if visible */
375 static void
376 -tray_icon_pressed (GtkWidget *button, GdkEventButton *event, EggTrayIcon *icon)
377 +tray_icon_popup (GtkStatusIcon *status_icon,
378 + guint button,
379 + guint activate_time,
380 + gpointer user_data)
382 - if ((event->type == GDK_2BUTTON_PRESS) || (event->type == GDK_3BUTTON_PRESS))
383 - return; /* ignore double and triple clicks */
385 - switch (event->button) {
386 - case 1:
387 - liferea_shell_toggle_visibility ();
388 - break;
389 - case 3:
390 - ui_popup_systray_menu (event->button, event->time);
391 - break;
395 -static gboolean ui_tray_create_cb() {
397 - ui_tray_install();
399 - return FALSE; /* for when we're called by the glib idle handler */
400 + ui_popup_systray_menu (&gtk_status_icon_position_menu, button, activate_time,
401 + status_icon);
405 +/* a click on the systray icon should show the program window
406 + if invisible or hide it if visible */
407 static void
408 -ui_tray_embedded_cb(GtkWidget *widget, void *data)
410 - /* Nothing to do */
411 +tray_icon_activate (GtkStatusIcon * status_icon, gpointer user_data)
413 + liferea_shell_toggle_visibility ();
417 -static void ui_tray_destroyed_cb(GtkWidget *widget, void *data) {
419 - g_object_unref(G_OBJECT(trayIcon_priv->widget));
420 - g_free(trayIcon_priv);
421 - trayIcon_priv = NULL;
423 - if (0 == ui_tray_get_count ())
424 - liferea_shell_present ();
426 - /* And make it re-appear when the notification area reappears */
427 - g_idle_add(ui_tray_create_cb, NULL);
431 static void ui_tray_install(void) {
433 g_assert(!trayIcon_priv);
434 trayIcon_priv = g_new0(struct trayIcon_priv, 1);
436 - trayIcon_priv->widget = egg_tray_icon_new(PACKAGE);
437 - trayIcon_priv->eventBox = gtk_event_box_new();
438 + trayIcon_priv->status_icon = gtk_status_icon_new();
440 - g_signal_connect(trayIcon_priv->eventBox, "button_press_event",
441 - G_CALLBACK(tray_icon_pressed), trayIcon_priv->widget);
442 - g_signal_connect(G_OBJECT(trayIcon_priv->widget), "embedded",
443 - G_CALLBACK(ui_tray_embedded_cb), NULL);
444 - g_signal_connect(G_OBJECT(trayIcon_priv->widget), "destroy",
445 - G_CALLBACK(ui_tray_destroyed_cb), NULL);
446 + g_signal_connect(trayIcon_priv->status_icon, "activate",
447 + G_CALLBACK(tray_icon_activate), NULL);
448 + g_signal_connect(trayIcon_priv->status_icon, "popup-menu",
449 + G_CALLBACK(tray_icon_popup), NULL);
451 - liferea_shell_setup_URL_receiver (trayIcon_priv->eventBox);
453 - gtk_container_add(GTK_CONTAINER(trayIcon_priv->widget), trayIcon_priv->eventBox);
454 - g_object_ref(G_OBJECT(trayIcon_priv->widget));
455 +// No URL dropping support on the status icon.
456 +// liferea_shell_setup_URL_receiver (trayIcon_priv->eventBox);
458 ui_tray_update();
459 trayIcon_priv->trayCount++;
460 @@ -289,13 +270,9 @@ static void ui_tray_install(void) {
462 static void ui_tray_remove(void) {
464 - g_assert(trayIcon_priv->widget);
465 + g_assert(trayIcon_priv->status_icon);
467 - g_signal_handlers_disconnect_by_func(G_OBJECT(trayIcon_priv->widget),
468 - G_CALLBACK(ui_tray_destroyed_cb), NULL);
469 - gtk_widget_destroy(trayIcon_priv->image);
470 - g_object_unref(G_OBJECT(trayIcon_priv->widget));
471 - gtk_object_destroy(GTK_OBJECT(trayIcon_priv->widget));
472 + g_object_unref(G_OBJECT(trayIcon_priv->status_icon));
473 g_free(trayIcon_priv);
474 trayIcon_priv = NULL;
476 @@ -322,17 +299,25 @@ ui_tray_get_count(void)
478 gboolean ui_tray_get_origin(gint *x, gint *y) {
480 + GdkRectangle rect;
481 if(!trayIcon_priv)
482 return FALSE;
484 - gdk_window_get_origin(GTK_WIDGET(trayIcon_priv->widget)->window, x, y);
485 + gtk_status_icon_get_geometry(trayIcon_priv->status_icon, NULL,
486 + &rect, NULL);
487 + *x = rect.x;
488 + *y = rect.y;
490 return TRUE;
493 void ui_tray_size_request(GtkRequisition *requisition) {
495 + gint size;
496 if(!trayIcon_priv)
497 return;
499 - gtk_widget_size_request(GTK_WIDGET(trayIcon_priv->widget), requisition);
500 + size = gtk_status_icon_get_size(trayIcon_priv->status_icon);
501 + requisition->width = requisition->height = size;
504 --- liferea-1.6.4.orig/src/ui/eggtrayicon.c
505 +++ liferea-1.6.4/src/ui/eggtrayicon.c
506 @@ -1,566 +0,0 @@
507 -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
508 -/* eggtrayicon.c
509 - * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
511 - * This library is free software; you can redistribute it and/or
512 - * modify it under the terms of the GNU Lesser General Public
513 - * License as published by the Free Software Foundation; either
514 - * version 2 of the License, or (at your option) any later version.
516 - * This library is distributed in the hope that it will be useful,
517 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
518 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
519 - * Lesser General Public License for more details.
521 - * You should have received a copy of the GNU Lesser General Public
522 - * License along with this library; if not, write to the
523 - * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
524 - * Boston, MA 02111-1307, USA.
525 - */
527 -#include <config.h>
528 -#include <string.h>
529 -#include <libintl.h>
531 -#include "eggtrayicon.h"
533 -#include <gdkconfig.h>
534 -#if defined (GDK_WINDOWING_X11)
535 -#include <gdk/gdkx.h>
536 -#include <X11/Xatom.h>
537 -#elif defined (GDK_WINDOWING_WIN32)
538 -#include <gdk/gdkwin32.h>
539 -#endif
541 -#ifndef EGG_COMPILATION
542 -#ifndef _
543 -#define _(x) dgettext (GETTEXT_PACKAGE, x)
544 -#define N_(x) x
545 -#endif
546 -#else
547 -#define _(x) x
548 -#define N_(x) x
549 -#endif
551 -#define SYSTEM_TRAY_REQUEST_DOCK 0
552 -#define SYSTEM_TRAY_BEGIN_MESSAGE 1
553 -#define SYSTEM_TRAY_CANCEL_MESSAGE 2
555 -#define SYSTEM_TRAY_ORIENTATION_HORZ 0
556 -#define SYSTEM_TRAY_ORIENTATION_VERT 1
558 -enum {
559 - PROP_0,
560 - PROP_ORIENTATION
563 -static GtkPlugClass *parent_class = NULL;
565 -static void egg_tray_icon_init (EggTrayIcon *icon);
566 -static void egg_tray_icon_class_init (EggTrayIconClass *klass);
568 -static void egg_tray_icon_get_property (GObject *object,
569 - guint prop_id,
570 - GValue *value,
571 - GParamSpec *pspec);
573 -static void egg_tray_icon_realize (GtkWidget *widget);
574 -static void egg_tray_icon_unrealize (GtkWidget *widget);
576 -static void egg_tray_icon_add (GtkContainer *container,
577 - GtkWidget *widget);
579 -#ifdef GDK_WINDOWING_X11
580 -static void egg_tray_icon_update_manager_window (EggTrayIcon *icon,
581 - gboolean dock_if_realized);
582 -static void egg_tray_icon_manager_window_destroyed (EggTrayIcon *icon);
583 -#endif
585 -GType
586 -egg_tray_icon_get_type (void)
588 - static GType our_type = 0;
590 - if (our_type == 0)
592 - static const GTypeInfo our_info =
594 - sizeof (EggTrayIconClass),
595 - (GBaseInitFunc) NULL,
596 - (GBaseFinalizeFunc) NULL,
597 - (GClassInitFunc) egg_tray_icon_class_init,
598 - NULL, /* class_finalize */
599 - NULL, /* class_data */
600 - sizeof (EggTrayIcon),
601 - 0, /* n_preallocs */
602 - (GInstanceInitFunc) egg_tray_icon_init,
603 - NULL /* value_table */
604 - };
606 - our_type = g_type_register_static (GTK_TYPE_PLUG, "EggTrayIcon", &our_info, 0);
609 - return our_type;
612 -static void
613 -egg_tray_icon_init (EggTrayIcon *icon)
615 - icon->stamp = 1;
616 - icon->orientation = GTK_ORIENTATION_HORIZONTAL;
618 - gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK);
621 -static void
622 -egg_tray_icon_class_init (EggTrayIconClass *klass)
624 - GObjectClass *gobject_class = (GObjectClass *)klass;
625 - GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
626 - GtkContainerClass *container_class = (GtkContainerClass *)klass;
628 - parent_class = g_type_class_peek_parent (klass);
630 - gobject_class->get_property = egg_tray_icon_get_property;
632 - widget_class->realize = egg_tray_icon_realize;
633 - widget_class->unrealize = egg_tray_icon_unrealize;
635 - container_class->add = egg_tray_icon_add;
637 - g_object_class_install_property (gobject_class,
638 - PROP_ORIENTATION,
639 - g_param_spec_enum ("orientation",
640 - _("Orientation"),
641 - _("The orientation of the tray."),
642 - GTK_TYPE_ORIENTATION,
643 - GTK_ORIENTATION_HORIZONTAL,
644 - G_PARAM_READABLE));
646 -#if defined (GDK_WINDOWING_X11)
647 - /* Nothing */
648 -#elif defined (GDK_WINDOWING_WIN32)
649 - g_warning ("Port eggtrayicon to Win32");
650 -#else
651 - g_warning ("Port eggtrayicon to this GTK+ backend");
652 -#endif
655 -static void
656 -egg_tray_icon_get_property (GObject *object,
657 - guint prop_id,
658 - GValue *value,
659 - GParamSpec *pspec)
661 - EggTrayIcon *icon = EGG_TRAY_ICON (object);
663 - switch (prop_id)
665 - case PROP_ORIENTATION:
666 - g_value_set_enum (value, icon->orientation);
667 - break;
668 - default:
669 - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
670 - break;
674 -#ifdef GDK_WINDOWING_X11
676 -static void
677 -egg_tray_icon_get_orientation_property (EggTrayIcon *icon)
679 - Display *xdisplay;
680 - Atom type;
681 - int format;
682 - union {
683 - gulong *prop;
684 - guchar *prop_ch;
685 - } prop = { NULL };
686 - gulong nitems;
687 - gulong bytes_after;
688 - int error, result;
690 - g_assert (icon->manager_window != None);
692 - if (!GTK_IS_WIDGET (icon))
693 - return;
695 - xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
697 - gdk_error_trap_push ();
698 - type = None;
699 - result = XGetWindowProperty (xdisplay,
700 - icon->manager_window,
701 - icon->orientation_atom,
702 - 0, G_MAXLONG, FALSE,
703 - XA_CARDINAL,
704 - &type, &format, &nitems,
705 - &bytes_after, &(prop.prop_ch));
706 - error = gdk_error_trap_pop ();
708 - if (error || result != Success)
709 - return;
711 - if (type == XA_CARDINAL)
713 - GtkOrientation orientation;
715 - orientation = (prop.prop [0] == SYSTEM_TRAY_ORIENTATION_HORZ) ?
716 - GTK_ORIENTATION_HORIZONTAL :
717 - GTK_ORIENTATION_VERTICAL;
719 - if (icon->orientation != orientation)
721 - icon->orientation = orientation;
723 - g_object_notify (G_OBJECT (icon), "orientation");
727 - if (prop.prop)
728 - XFree (prop.prop);
731 -static GdkFilterReturn
732 -egg_tray_icon_manager_filter (GdkXEvent *xevent, GdkEvent *event, gpointer user_data)
734 - EggTrayIcon *icon = user_data;
735 - XEvent *xev = (XEvent *)xevent;
737 - if (xev->xany.type == ClientMessage &&
738 - xev->xclient.message_type == icon->manager_atom &&
739 - xev->xclient.data.l[1] == icon->selection_atom)
741 - egg_tray_icon_update_manager_window (icon, TRUE);
743 - else if (xev->xany.window == icon->manager_window)
745 - if (xev->xany.type == PropertyNotify &&
746 - xev->xproperty.atom == icon->orientation_atom)
748 - egg_tray_icon_get_orientation_property (icon);
750 - if (xev->xany.type == DestroyNotify)
752 - egg_tray_icon_manager_window_destroyed (icon);
755 - return GDK_FILTER_CONTINUE;
758 -#endif
760 -static void
761 -egg_tray_icon_unrealize (GtkWidget *widget)
763 -#ifdef GDK_WINDOWING_X11
764 - EggTrayIcon *icon = EGG_TRAY_ICON (widget);
765 - GdkWindow *root_window;
767 - if (icon->manager_window != None)
769 - GdkWindow *gdkwin;
771 - gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
772 - icon->manager_window);
774 - gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
777 - root_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
779 - gdk_window_remove_filter (root_window, egg_tray_icon_manager_filter, icon);
781 - if (GTK_WIDGET_CLASS (parent_class)->unrealize)
782 - (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
783 -#endif
786 -#ifdef GDK_WINDOWING_X11
788 -static void
789 -egg_tray_icon_send_manager_message (EggTrayIcon *icon,
790 - long message,
791 - Window window,
792 - long data1,
793 - long data2,
794 - long data3)
796 - XClientMessageEvent ev;
797 - Display *display;
799 - ev.type = ClientMessage;
800 - ev.window = window;
801 - ev.message_type = icon->system_tray_opcode_atom;
802 - ev.format = 32;
803 - ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window);
804 - ev.data.l[1] = message;
805 - ev.data.l[2] = data1;
806 - ev.data.l[3] = data2;
807 - ev.data.l[4] = data3;
809 - display = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
811 - gdk_error_trap_push ();
812 - XSendEvent (display,
813 - icon->manager_window, False, NoEventMask, (XEvent *)&ev);
814 - XSync (display, False);
815 - gdk_error_trap_pop ();
818 -static void
819 -egg_tray_icon_send_dock_request (EggTrayIcon *icon)
821 - egg_tray_icon_send_manager_message (icon,
822 - SYSTEM_TRAY_REQUEST_DOCK,
823 - icon->manager_window,
824 - gtk_plug_get_id (GTK_PLUG (icon)),
825 - 0, 0);
828 -static void
829 -egg_tray_icon_update_manager_window (EggTrayIcon *icon,
830 - gboolean dock_if_realized)
832 - Display *xdisplay;
834 - if (icon->manager_window != None)
835 - return;
837 - xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
839 - XGrabServer (xdisplay);
841 - icon->manager_window = XGetSelectionOwner (xdisplay,
842 - icon->selection_atom);
844 - if (icon->manager_window != None)
845 - XSelectInput (xdisplay,
846 - icon->manager_window, StructureNotifyMask|PropertyChangeMask);
848 - XUngrabServer (xdisplay);
849 - XFlush (xdisplay);
851 - if (icon->manager_window != None)
853 - GdkWindow *gdkwin;
855 - gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
856 - icon->manager_window);
858 - gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
860 - if (dock_if_realized && GTK_WIDGET_REALIZED (icon))
861 - egg_tray_icon_send_dock_request (icon);
863 - egg_tray_icon_get_orientation_property (icon);
867 -static void
868 -egg_tray_icon_manager_window_destroyed (EggTrayIcon *icon)
870 - GdkWindow *gdkwin;
872 - g_return_if_fail (icon->manager_window != None);
874 - if (!GTK_IS_WIDGET (icon))
875 - return;
877 - gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
878 - icon->manager_window);
880 - gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
882 - icon->manager_window = None;
884 - egg_tray_icon_update_manager_window (icon, TRUE);
887 -#endif
889 -static gboolean
890 -transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
892 - gdk_window_clear_area (widget->window, event->area.x, event->area.y,
893 - event->area.width, event->area.height);
894 - return FALSE;
897 -static void
898 -make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
899 - gpointer user_data)
901 - gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
904 -static void
905 -make_transparent (GtkWidget *widget, gpointer user_data)
907 - if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
908 - return;
910 - gtk_widget_set_app_paintable (widget, TRUE);
911 - gtk_widget_set_double_buffered (widget, FALSE);
912 - gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
913 - g_signal_connect (widget, "expose_event",
914 - G_CALLBACK (transparent_expose_event), NULL);
915 - g_signal_connect_after (widget, "style_set",
916 - G_CALLBACK (make_transparent_again), NULL);
919 -static void
920 -egg_tray_icon_realize (GtkWidget *widget)
922 -#ifdef GDK_WINDOWING_X11
923 - EggTrayIcon *icon = EGG_TRAY_ICON (widget);
924 - GdkScreen *screen;
925 - GdkDisplay *display;
926 - Display *xdisplay;
927 - char buffer[256];
928 - GdkWindow *root_window;
930 - if (GTK_WIDGET_CLASS (parent_class)->realize)
931 - GTK_WIDGET_CLASS (parent_class)->realize (widget);
933 - make_transparent (widget, NULL);
935 - screen = gtk_widget_get_screen (widget);
936 - display = gdk_screen_get_display (screen);
937 - xdisplay = gdk_x11_display_get_xdisplay (display);
939 - /* Now see if there's a manager window around */
940 - g_snprintf (buffer, sizeof (buffer),
941 - "_NET_SYSTEM_TRAY_S%d",
942 - gdk_screen_get_number (screen));
944 - icon->selection_atom = XInternAtom (xdisplay, buffer, False);
946 - icon->manager_atom = XInternAtom (xdisplay, "MANAGER", False);
948 - icon->system_tray_opcode_atom = XInternAtom (xdisplay,
949 - "_NET_SYSTEM_TRAY_OPCODE",
950 - False);
952 - icon->orientation_atom = XInternAtom (xdisplay,
953 - "_NET_SYSTEM_TRAY_ORIENTATION",
954 - False);
956 - egg_tray_icon_update_manager_window (icon, FALSE);
957 - egg_tray_icon_send_dock_request (icon);
959 - root_window = gdk_screen_get_root_window (screen);
961 - /* Add a root window filter so that we get changes on MANAGER */
962 - gdk_window_add_filter (root_window,
963 - egg_tray_icon_manager_filter, icon);
964 -#endif
967 -static void
968 -egg_tray_icon_add (GtkContainer *container, GtkWidget *widget)
970 - g_signal_connect (widget, "realize",
971 - G_CALLBACK (make_transparent), NULL);
972 - GTK_CONTAINER_CLASS (parent_class)->add (container, widget);
975 -EggTrayIcon *
976 -egg_tray_icon_new_for_screen (GdkScreen *screen, const char *name)
978 - g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
980 - return g_object_new (EGG_TYPE_TRAY_ICON, "screen", screen, "title", name, NULL);
983 -EggTrayIcon*
984 -egg_tray_icon_new (const gchar *name)
986 - return g_object_new (EGG_TYPE_TRAY_ICON, "title", name, NULL);
989 -guint
990 -egg_tray_icon_send_message (EggTrayIcon *icon,
991 - gint timeout,
992 - const gchar *message,
993 - gint len)
995 - guint stamp;
997 - g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), 0);
998 - g_return_val_if_fail (timeout >= 0, 0);
999 - g_return_val_if_fail (message != NULL, 0);
1001 -#ifdef GDK_WINDOWING_X11
1002 - if (icon->manager_window == None)
1003 - return 0;
1004 -#endif
1006 - if (len < 0)
1007 - len = strlen (message);
1009 - stamp = icon->stamp++;
1011 -#ifdef GDK_WINDOWING_X11
1012 - /* Get ready to send the message */
1013 - egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_BEGIN_MESSAGE,
1014 - (Window)gtk_plug_get_id (GTK_PLUG (icon)),
1015 - timeout, len, stamp);
1017 - /* Now to send the actual message */
1018 - gdk_error_trap_push ();
1019 - while (len > 0)
1021 - XClientMessageEvent ev;
1022 - Display *xdisplay;
1024 - xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
1026 - ev.type = ClientMessage;
1027 - ev.window = (Window)gtk_plug_get_id (GTK_PLUG (icon));
1028 - ev.format = 8;
1029 - ev.message_type = XInternAtom (xdisplay,
1030 - "_NET_SYSTEM_TRAY_MESSAGE_DATA", False);
1031 - if (len > 20)
1033 - memcpy (&ev.data, message, 20);
1034 - len -= 20;
1035 - message += 20;
1037 - else
1039 - memcpy (&ev.data, message, len);
1040 - len = 0;
1043 - XSendEvent (xdisplay,
1044 - icon->manager_window, False, StructureNotifyMask, (XEvent *)&ev);
1045 - XSync (xdisplay, False);
1047 - gdk_error_trap_pop ();
1048 -#endif
1050 - return stamp;
1053 -void
1054 -egg_tray_icon_cancel_message (EggTrayIcon *icon,
1055 - guint id)
1057 - g_return_if_fail (EGG_IS_TRAY_ICON (icon));
1058 - g_return_if_fail (id > 0);
1059 -#ifdef GDK_WINDOWING_X11
1060 - egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_CANCEL_MESSAGE,
1061 - (Window)gtk_plug_get_id (GTK_PLUG (icon)),
1062 - id, 0, 0);
1063 -#endif
1066 -GtkOrientation
1067 -egg_tray_icon_get_orientation (EggTrayIcon *icon)
1069 - g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), GTK_ORIENTATION_HORIZONTAL);
1071 - return icon->orientation;
1073 --- liferea-1.6.4.orig/src/ui/ui_popup.c
1074 +++ liferea-1.6.4/src/ui/ui_popup.c
1075 @@ -57,13 +57,19 @@ on_toggle_visibility (void)
1078 static void
1079 -ui_popup_menu (GtkWidget *menu, guint button, guint32 activate_time)
1080 +ui_popup_menu_at_pos (GtkWidget *menu, GtkMenuPositionFunc func, guint button, guint32 activate_time, gpointer user_data)
1082 g_signal_connect_after (G_OBJECT(menu), "unmap-event", G_CALLBACK(gtk_widget_destroy), NULL);
1084 gtk_widget_show_all (menu);
1086 - gtk_menu_popup (GTK_MENU(menu), NULL, NULL, NULL, NULL, button, activate_time);
1087 + gtk_menu_popup (GTK_MENU(menu), NULL, NULL, func, user_data, button, activate_time);
1090 +static void
1091 +ui_popup_menu (GtkWidget *menu, guint button, guint32 activate_time)
1093 + ui_popup_menu_at_pos(menu, NULL, button, activate_time, NULL);
1096 static GtkWidget*
1097 @@ -161,7 +167,7 @@ ui_popup_enclosure_menu (enclosurePtr en
1100 void
1101 -ui_popup_systray_menu (guint button, guint32 activate_time)
1102 +ui_popup_systray_menu (GtkMenuPositionFunc func, guint button, guint32 activate_time, gpointer user_data)
1104 GtkWidget *menu;
1105 GtkWidget *mainwindow = liferea_shell_get_window ();
1106 @@ -177,7 +183,7 @@ ui_popup_systray_menu (guint button, gui
1107 ui_popup_add_menuitem (menu, _("_Show Liferea"), on_toggle_visibility, NULL, NULL, (!(gdk_window_get_state (mainwindow->window) & GDK_WINDOW_STATE_ICONIFIED) && GTK_WIDGET_VISIBLE (mainwindow)) + UI_POPUP_ITEM_IS_TOGGLE);
1108 ui_popup_add_menuitem (menu, _("_Quit"), on_popup_quit, NULL, GTK_STOCK_QUIT, 0);
1110 - ui_popup_menu (menu, button, activate_time);
1111 + ui_popup_menu_at_pos (menu, func, button, activate_time, user_data);
1114 /* popup callback wrappers */
1115 --- liferea-1.6.4.orig/src/ui/Makefile.am
1116 +++ liferea-1.6.4/src/ui/Makefile.am
1117 @@ -12,7 +12,6 @@ libliui_a_CFLAGS = $(PACKAGE_CFLAGS) $(D
1118 libliui_a_SOURCES = \
1119 auth_dialog.c auth_dialog.h \
1120 browser_tabs.c browser_tabs.h \
1121 - eggtrayicon.c eggtrayicon.h \
1122 enclosure_list_view.c enclosure_list_view.h \
1123 itemview.c itemview.h \
1124 liferea_dialog.c liferea_dialog.h \
1125 --- liferea-1.6.4.orig/src/ui/ui_popup.h
1126 +++ liferea-1.6.4/src/ui/ui_popup.h
1127 @@ -43,10 +43,12 @@ void ui_popup_item_menu (itemPtr item, g
1128 * Shows a popup menu for the systray icon.
1129 * (Offline mode, Close, Minimize...)
1131 + * @param func the function to calculate the position to popup
1132 * @param button the mouse button which was pressed to initiate the event
1133 * @param activate_time the time at which the activation event occurred
1134 + * @param user_data the user data to pass to func.
1136 -void ui_popup_systray_menu (guint button, guint32 activate_time);
1137 +void ui_popup_systray_menu (GtkMenuPositionFunc func, guint button, guint32 activate_time, gpointer user_data);
1140 * Shows a popup menu for the enclosure list view.
1141 --- liferea-1.6.4.orig/po/POTFILES.in
1142 +++ liferea-1.6.4/po/POTFILES.in
1143 @@ -74,8 +74,6 @@ src/vfolder.c
1144 src/vfolder.h
1145 src/xml.c
1146 src/xml.h
1147 -src/ui/eggtrayicon.c
1148 -src/ui/eggtrayicon.h
1149 src/ui/enclosure_list_view.c
1150 src/ui/enclosure_list_view.h
1151 src/ui/itemview.c