From 3c6a471e1ac91a23e98533bba0548c3a61ecc44d Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Mon, 4 Aug 2008 13:21:11 +0000 Subject: Move libnotify initialization to ephy-main This should fix the crash when libnotify was uninit before the notification was actually shown. Fix suggested by Colin Walters, closes: #536768. svn path=/trunk/; revision=8380 --- src/ephy-main.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/ephy-main.c b/src/ephy-main.c index 0beebf939..1850ffbb4 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -50,6 +50,10 @@ #include #include +#ifdef HAVE_LIBNOTIFY +#include +#endif + static GQuark startup_error_quark = 0; #define STARTUP_ERROR_QUARK (startup_error_quark) @@ -714,9 +718,18 @@ main (int argc, g_object_weak_ref (G_OBJECT (ephy_shell), shell_weak_notify, NULL); ephy_object_idle_unref (ephy_shell); +#ifdef HAVE_LIBNOTIFY + /* Init notifications for the download manager */ + notify_init (PACKAGE); +#endif + gtk_main (); /* Shutdown */ +#ifdef HAVE_LIBNOTIFY + if (notify_is_initted ()) + notify_uninit (); +#endif eel_gconf_monitor_remove ("/apps/epiphany/general"); gnome_accelerators_sync (); ephy_state_save (); -- cgit v1.2.3