diff --git a/xfce4-notifyd-0.2.1-Fix-race-with-window-becoming-invalid.patch b/xfce4-notifyd-0.2.1-Fix-race-with-window-becoming-invalid.patch deleted file mode 100644 index eb1d579..0000000 --- a/xfce4-notifyd-0.2.1-Fix-race-with-window-becoming-invalid.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 66263f690164478b25a7a67efa398a235f91b711 Mon Sep 17 00:00:00 2001 -From: Ricky Zhou -Date: Thu, 2 Jun 2011 05:22:01 -0400 -Subject: [PATCH] Fix race with window becoming invalid. - ---- - xfce4-notifyd/xfce-notify-daemon.c | 13 ++++++++++++- - 1 files changed, 12 insertions(+), 1 deletions(-) - -diff --git a/xfce4-notifyd/xfce-notify-daemon.c b/xfce4-notifyd/xfce-notify-daemon.c -index 0d6eddd..6e49ab2 100644 ---- a/xfce4-notifyd/xfce-notify-daemon.c -+++ b/xfce4-notifyd/xfce-notify-daemon.c -@@ -517,11 +517,22 @@ xfce_notify_daemon_get_workarea(GdkScreen *screen, - - for(l = g_list_first(windows_list); l != NULL; l = g_list_next(l)) { - GdkWindow *window = l->data; -+ GdkWindowTypeHint type_hint; - -- if(gdk_window_get_type_hint(window) == GDK_WINDOW_TYPE_HINT_DOCK) { -+ gdk_error_trap_push(); -+ type_hint = gdk_window_get_type_hint(window); -+ gdk_flush(); -+ if (gdk_error_trap_pop()) -+ continue; -+ -+ if(type_hint == GDK_WINDOW_TYPE_HINT_DOCK) { - GdkRectangle window_geom, intersection; - -+ gdk_error_trap_push(); - gdk_window_get_frame_extents(window, &window_geom); -+ gdk_flush(); -+ if (gdk_error_trap_pop()) -+ continue; - - DBG("Got a dock window: x(%d), y(%d), w(%d), h(%d)", - window_geom.x, --- -1.7.5.2 - diff --git a/xfce4-notifyd-0.2.2-avoid-flickering.patch b/xfce4-notifyd-0.2.2-avoid-flickering.patch new file mode 100644 index 0000000..51b5a3b --- /dev/null +++ b/xfce4-notifyd-0.2.2-avoid-flickering.patch @@ -0,0 +1,44 @@ +From 8b34ed09d43bbf8daf4e1c71466212d614109ac0 Mon Sep 17 00:00:00 2001 +From: Nick Schermer +Date: Fri, 26 Aug 2011 19:15:31 +0000 +Subject: Avoid flickering of the window. + +Realize (and thus position) the window before actually showing it. + +From c032013769ee860309d3d8821bbea4ed284e45b0 Mon Sep 17 00:00:00 2001 +From: Nick Schermer +Date: Thu, 08 Sep 2011 15:11:27 +0000 +Subject: Fix mistake in commit 8b34ed09. + +The idle kept running, causing 100% cpu usage. +--- +diff --git a/xfce4-notifyd/xfce-notify-daemon.c b/xfce4-notifyd/xfce-notify-daemon.c +index 227d7c0..44eb24b 100644 +--- a/xfce4-notifyd/xfce-notify-daemon.c ++++ b/xfce4-notifyd/xfce-notify-daemon.c +@@ -866,6 +866,13 @@ notify_get_capabilities(XfceNotifyDaemon *xndaemon, + } + + static gboolean ++notify_show_window(gpointer window) ++{ ++ gtk_widget_show(GTK_WIDGET(window)); ++ return FALSE; ++} ++ ++static gboolean + notify_notify(XfceNotifyDaemon *xndaemon, + const gchar *app_name, + guint replaces_id, +@@ -929,7 +936,8 @@ notify_notify(XfceNotifyDaemon *xndaemon, + G_CALLBACK(xfce_notify_daemon_window_size_allocate), + xndaemon); + +- gtk_widget_show(GTK_WIDGET(window)); ++ gtk_widget_realize(GTK_WIDGET(window)); ++ g_idle_add(notify_show_window, window); + } + + if(!app_icon || !*app_icon) { +-- +cgit v0.9.0.3 diff --git a/xfce4-notifyd-0.2.2-emit-closed-signal.patch b/xfce4-notifyd-0.2.2-emit-closed-signal.patch new file mode 100644 index 0000000..330ac8a --- /dev/null +++ b/xfce4-notifyd-0.2.2-emit-closed-signal.patch @@ -0,0 +1,24 @@ +From ad77e8aa48201c1c10226b54f7ab006989f2f4d5 Mon Sep 17 00:00:00 2001 +From: Brian J. Tarricone +Date: Mon, 26 Sep 2011 07:07:31 +0000 +Subject: emit closed signal on correct object + +'widget' is actually the GtkButton when an action is clicked. this is +why notifications were never dismissed when an action got clicked. +long-standing bug finally fixed! +--- +diff --git a/xfce4-notifyd/xfce-notify-window.c b/xfce4-notifyd/xfce-notify-window.c +index 41316b8..8364d7a 100644 +--- a/xfce4-notifyd/xfce-notify-window.c ++++ b/xfce4-notifyd/xfce-notify-window.c +@@ -718,7 +718,7 @@ xfce_notify_window_button_clicked(GtkWidget *widget, + + g_signal_emit(G_OBJECT(window), signals[SIG_ACTION_INVOKED], 0, + action_id); +- g_signal_emit(G_OBJECT(widget), signals[SIG_CLOSED], 0, ++ g_signal_emit(G_OBJECT(window), signals[SIG_CLOSED], 0, + XFCE_NOTIFY_CLOSE_REASON_DISMISSED); + } + +-- +cgit v0.9.0.3 diff --git a/xfce4-notifyd-0.2.2-fixup-type-setting.patch b/xfce4-notifyd-0.2.2-fixup-type-setting.patch new file mode 100644 index 0000000..605fc2d --- /dev/null +++ b/xfce4-notifyd-0.2.2-fixup-type-setting.patch @@ -0,0 +1,30 @@ +From 836e6ce0673a71345c581170412f14a68f6163f7 Mon Sep 17 00:00:00 2001 +From: Nick Schermer +Date: Fri, 26 Aug 2011 10:27:48 +0000 +Subject: Fixup type setting. + +--- +diff --git a/xfce4-notifyd/xfce-notify-window.c b/xfce4-notifyd/xfce-notify-window.c +index 891f5a5..41316b8 100644 +--- a/xfce4-notifyd/xfce-notify-window.c ++++ b/xfce4-notifyd/xfce-notify-window.c +@@ -196,7 +196,6 @@ xfce_notify_window_init(XfceNotifyWindow *window) + GtkWidget *tophbox, *align, *vbox; + gdouble border_radius = DEFAULT_RADIUS; + +- GTK_WINDOW(window)->type = GTK_WINDOW_TOPLEVEL; + window->expire_timeout = DEFAULT_EXPIRE_TIMEOUT; + window->normal_opacity = DEFAULT_NORMAL_OPACITY; + /* The summary widget needs to be initialized before style_set is called. gtk_widget_ensure_style calls style_set */ +@@ -935,7 +934,8 @@ xfce_notify_window_new_with_actions(const gchar *summary, + { + XfceNotifyWindow *window; + +- window = g_object_new(XFCE_TYPE_NOTIFY_WINDOW, NULL); ++ window = g_object_new(XFCE_TYPE_NOTIFY_WINDOW, ++ "type", GTK_WINDOW_TOPLEVEL, NULL); + + xfce_notify_window_set_summary(window, summary); + xfce_notify_window_set_body(window, body); +-- +cgit v0.9.0.3 diff --git a/xfce4-notifyd-0.2.2-remove-libsexy-patch.patch b/xfce4-notifyd-0.2.2-remove-libsexy-patch.patch new file mode 100644 index 0000000..129daca --- /dev/null +++ b/xfce4-notifyd-0.2.2-remove-libsexy-patch.patch @@ -0,0 +1,22 @@ +From a911346130b5bd78c066eee1260c9373450480b2 Mon Sep 17 00:00:00 2001 +From: Jérôme Guelfucci +Date: Sun, 07 Aug 2011 19:32:44 +0000 +Subject: Remove obsolete libsexy check. + +--- +diff --git a/xfce4-notifyd/xfce-notify-daemon.c b/xfce4-notifyd/xfce-notify-daemon.c +index 20ee47e..227d7c0 100644 +--- a/xfce4-notifyd/xfce-notify-daemon.c ++++ b/xfce4-notifyd/xfce-notify-daemon.c +@@ -846,9 +846,7 @@ notify_get_capabilities(XfceNotifyDaemon *xndaemon, + (*OUT_capabilities)[i++] = g_strdup("actions"); + (*OUT_capabilities)[i++] = g_strdup("body"); + (*OUT_capabilities)[i++] = g_strdup("body-markup"); +-#ifdef HAVE_LIBSEXY + (*OUT_capabilities)[i++] = g_strdup("body-hyperlinks"); +-#endif + (*OUT_capabilities)[i++] = g_strdup("icon-static"); + (*OUT_capabilities)[i++] = g_strdup("x-canonical-private-icon-only"); + (*OUT_capabilities)[i++] = NULL; +-- +cgit v0.9.0.3 diff --git a/xfce4-notifyd.spec b/xfce4-notifyd.spec index 2649511..c51ecf1 100644 --- a/xfce4-notifyd.spec +++ b/xfce4-notifyd.spec @@ -4,16 +4,28 @@ Name: xfce4-notifyd Version: 0.2.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Simple notification daemon for Xfce Group: User Interface/Desktops License: GPLv2 URL: http://goodies.xfce.org/projects/applications/xfce4-notifyd +#VCS: git:git://http://git.xfce.org/apps/xfce4-notifyd/ Source0: http://archive.xfce.org/src/apps/%{name}/%{minorversion}/%{name}-%{version}.tar.bz2 # Similar to https://bugzilla.xfce.org/show_bug.cgi?id=7335 but we did the same # two years before upstream and continue to use org.xfce.Notifications.service Patch0: xfce4-notifyd-0.2.2-dbus-service-name.patch +# http://git.xfce.org/apps/xfce4-notifyd/commit/?id=a9113461 +Patch1: xfce4-notifyd-0.2.2-remove-libsexy-patch.patch +# http://git.xfce.org/apps/xfce4-notifyd/commit/?id=62796976 +Patch2: xfce4-notityd-0.2.2-uri-image-locations.patch +# http://git.xfce.org/apps/xfce4-notifyd/commit/?id=836e6ce0 +Patch3: xfce4-notifyd-0.2.2-fixup-type-setting.patch +# http://git.xfce.org/apps/xfce4-notifyd/commit/?id=8b34ed09 and +# http://git.xfce.org/apps/xfce4-notifyd/commit/?id=c0320137 in one patch +Patch4: xfce4-notifyd-0.2.2-avoid-flickering.patch +# http://git.xfce.org/apps/xfce4-notifyd/commit/?id=ad77e8aa +Patch5: xfce4-notifyd-0.2.2-emit-closed-signal.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gtk2-devel >= 2.14.0 @@ -42,6 +54,11 @@ Features: %prep %setup -q %patch0 -p1 -b .dbus-service-name +%patch1 -p1 -b .libsexy +%patch2 -p1 -b .uri-image +%patch3 -p1 -b .type-setting +%patch4 -p1 -b .avoid-flickering +%patch5 -p1 -b .emit-closed-signal %build @@ -52,10 +69,11 @@ make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' -desktop-file-install \ - --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \ - --add-only-show-in=XFCE \ - --delete-original \ +desktop-file-install \ + --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \ + --add-only-show-in=XFCE \ + --add-category=X-XFCE-SettingsDialog \ + --delete-original \ ${RPM_BUILD_ROOT}%{_datadir}/applications/xfce4-notifyd-config.desktop %find_lang %{name} @@ -94,6 +112,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Oct 06 2012 Christoph Wickert - 0.2.2-6 +- Remove obsolete libsexy checks +- Add patch to avoid flickering +- Add patch to support image URI locations +- Make xfce4-notifyd-config show up in xfce4-settings-manager + * Sun Jul 22 2012 Fedora Release Engineering - 0.2.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/xfce4-notityd-0.2.2-uri-image-locations.patch b/xfce4-notityd-0.2.2-uri-image-locations.patch new file mode 100644 index 0000000..9eab0ab --- /dev/null +++ b/xfce4-notityd-0.2.2-uri-image-locations.patch @@ -0,0 +1,33 @@ +From 627969763808d37b5455bbc7f3927d50fcae6987 Mon Sep 17 00:00:00 2001 +From: Nick Schermer +Date: Fri, 12 Aug 2011 19:57:46 +0000 +Subject: Accept uri-image locations. + +--- +diff --git a/xfce4-notifyd/xfce-notify-window.c b/xfce4-notifyd/xfce-notify-window.c +index e7612c2..891f5a5 100644 +--- a/xfce4-notifyd/xfce-notify-window.c ++++ b/xfce4-notifyd/xfce-notify-window.c +@@ -1041,6 +1041,7 @@ xfce_notify_window_set_icon_name(XfceNotifyWindow *window, + const gchar *icon_name) + { + gboolean icon_set = FALSE; ++ gchar *filename; + + g_return_if_fail(XFCE_IS_NOTIFY_WINDOW(window)); + +@@ -1052,6 +1053,12 @@ xfce_notify_window_set_icon_name(XfceNotifyWindow *window, + + if(g_path_is_absolute(icon_name)) + pix = gdk_pixbuf_new_from_file_at_size(icon_name, w, h, NULL); ++ else if(g_str_has_prefix (icon_name, "file://")) { ++ filename = g_filename_from_uri(icon_name, NULL, NULL); ++ if(filename) ++ pix = gdk_pixbuf_new_from_file_at_size(filename, w, h, NULL); ++ g_free(filename); ++ } + else + pix = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), + icon_name, +-- +cgit v0.9.0.3