aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <diegoe@src.gnome.org>2008-08-04 21:23:07 +0800
committerDiego Escalante Urrelo <diegoe@src.gnome.org>2008-08-04 21:23:07 +0800
commit90225c8e0c40d16f61771ea86f6f484b72e440be (patch)
treeb6e27f765f2918d0b3fc8ae2c305fbb329e497f8 /src
parent3533da6235d948a7a9b4fc637bbb88bfcba22aa1 (diff)
downloadgsoc2013-epiphany-90225c8e0c40d16f61771ea86f6f484b72e440be.tar
gsoc2013-epiphany-90225c8e0c40d16f61771ea86f6f484b72e440be.tar.gz
gsoc2013-epiphany-90225c8e0c40d16f61771ea86f6f484b72e440be.tar.bz2
gsoc2013-epiphany-90225c8e0c40d16f61771ea86f6f484b72e440be.tar.lz
gsoc2013-epiphany-90225c8e0c40d16f61771ea86f6f484b72e440be.tar.xz
gsoc2013-epiphany-90225c8e0c40d16f61771ea86f6f484b72e440be.tar.zst
gsoc2013-epiphany-90225c8e0c40d16f61771ea86f6f484b72e440be.zip
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=/branches/gnome-2-24/; revision=8382
Diffstat (limited to 'src')
-rw-r--r--src/ephy-main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 13c8f9ed7..4e92d42c4 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -50,6 +50,10 @@
#include <errno.h>
#include <string.h>
+#ifdef HAVE_LIBNOTIFY
+#include <libnotify/notify.h>
+#endif
+
static GQuark startup_error_quark = 0;
#define STARTUP_ERROR_QUARK (startup_error_quark)
@@ -737,9 +741,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 ();