commit notification-daemon for openSUSE:Factory
Hello community, here is the log from the commit of package notification-daemon for openSUSE:Factory checked in at Wed Apr 29 00:52:36 CEST 2009. -------- --- GNOME/notification-daemon/notification-daemon.changes 2009-04-23 23:44:34.000000000 +0200 +++ notification-daemon/notification-daemon.changes 2009-04-25 02:19:04.000000000 +0200 @@ -1,0 +2,7 @@ +Sat Apr 25 02:15:54 CEST 2009 - vuntz@novell.com + +- Add notification-daemon-crash-theme-change.patch to fix a crash + when the notification theme changes while a notification is + opened. Fix bnc#496430. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- notification-daemon-crash-theme-change.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ notification-daemon.spec ++++++ --- /var/tmp/diff_new_pack.Z13564/_old 2009-04-29 00:51:36.000000000 +0200 +++ /var/tmp/diff_new_pack.Z13564/_new 2009-04-29 00:51:36.000000000 +0200 @@ -30,7 +30,7 @@ BuildRequires: libwnck-devel BuildRequires: update-desktop-files Version: 0.4.0 -Release: 2 +Release: 3 Url: http://www.galago-project.org/ Group: System/Daemons License: GPL v2 or later @@ -38,6 +38,8 @@ Source: %{name}-%{version}.tar.bz2 # PATCH-FIX-UPSTREAM notification-daemon-memleak.patch vuntz@novell.com -- Fix a memory leak, patch from Ubuntu. Patch1: notification-daemon-memleak.patch +# PATCH-FIX-UPSTREAM notification-daemon-crash-theme-change.patch vuntz@novell.com +Patch2: notification-daemon-crash-theme-change.patch # PATCH-FEATURE-OPENSUSE notification-daemon-new-bubble.patch vuntz@novell.com -- Patch a new standard-based theme to be compliant with our policy. Patch10: notification-daemon-new-bubble.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -58,6 +60,7 @@ %prep %setup -q %patch1 -p0 +%patch2 -p1 # We create a new bubble theme based on the standard theme cp -a src/themes/standard src/themes/newbubble sed -i "s/libstandard/libbubble/g" src/themes/newbubble/Makefile* @@ -107,6 +110,10 @@ %files lang -f %{name}.lang %changelog +* Sat Apr 25 2009 vuntz@novell.com +- Add notification-daemon-crash-theme-change.patch to fix a crash + when the notification theme changes while a notification is + opened. Fix bnc#496430. * Thu Apr 23 2009 vuntz@novell.com - Review changes. * Thu Apr 09 2009 opensuse@sukimashita.com ++++++ notification-daemon-crash-theme-change.patch ++++++ Index: notification-daemon-0.4.0/src/daemon/daemon.c =================================================================== --- notification-daemon-0.4.0.orig/src/daemon/daemon.c +++ notification-daemon-0.4.0/src/daemon/daemon.c @@ -77,6 +77,7 @@ const PopupNotifyStackLocation popup_sta typedef struct { + NotifyDaemon *daemon; GTimeVal expiration; GTimeVal paused_diff; gboolean has_timeout; @@ -117,6 +118,7 @@ struct _DBusGMethodInvocation #endif /* D-BUS < 0.60 */ static void notify_daemon_finalize(GObject *object); +static void _notification_destroyed_cb(GtkWindow *nw, NotifyDaemon *daemon); static void _close_notification(NotifyDaemon *daemon, guint id, gboolean hide_notification, NotifydClosedReason reason); @@ -147,6 +149,13 @@ notify_daemon_class_init(NotifyDaemonCla static void _notify_timeout_destroy(NotifyTimeout *nt) { + /* Disconnect the destroy handler to avoid a loop since the id + * won't be removed from the hash table before the widget is + * destroyed */ + g_signal_handlers_disconnect_by_func(nt->nw, + _notification_destroyed_cb, + nt->daemon); + gtk_widget_destroy(GTK_WIDGET(nt->nw)); g_free(nt); } @@ -582,6 +591,7 @@ _store_notification(NotifyDaemon *daemon nt = g_new0(NotifyTimeout, 1); nt->id = id; nt->nw = nw; + nt->daemon = daemon; _calculate_timeout(daemon, nt, timeout); Index: notification-daemon-0.4.0/src/daemon/engines.c =================================================================== --- notification-daemon-0.4.0.orig/src/daemon/engines.c +++ notification-daemon-0.4.0/src/daemon/engines.c @@ -114,13 +114,25 @@ destroy_engine(ThemeEngine *engine) g_free(engine); } +static gboolean +theme_engine_destroy(ThemeEngine *engine) +{ + destroy_engine(engine); + return FALSE; +} + static void theme_engine_unref(ThemeEngine *engine) { engine->ref_count--; if (engine->ref_count == 0) - destroy_engine(engine); + /* Destroy the engine in an idle loop since the last reference + * might have been the one of a notification which is being + * destroyed and that still has references to the engine + * module. This way, we're sure the notification is completely + * destroyed before the engine is. */ + g_idle_add((GSourceFunc) theme_engine_destroy, engine); } static void ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de