aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-main.c')
-rw-r--r--src/ephy-main.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 5daca6fc6..493eb91dc 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -238,16 +238,6 @@ handle_email (GtkAboutDialog *about,
}
static void
-shell_weak_notify (gpointer data,
- GObject *zombie)
-{
- if (gtk_main_level ())
- {
- gtk_main_quit ();
- }
-}
-
-static void
unref_proxy_reply_cb (DBusGProxy *proxy,
GError *error,
gpointer user_data)
@@ -468,6 +458,12 @@ save_accels (void)
g_free (filename);
}
+static void
+shell_quit_cb (EphyShell *shell, gpointer data)
+{
+ gtk_main_quit ();
+}
+
int
main (int argc,
char *argv[])
@@ -767,13 +763,10 @@ main (int argc,
/* Now create the shell */
_ephy_shell_create_instance ();
+ g_signal_connect (ephy_shell, "quit", G_CALLBACK (shell_quit_cb), NULL);
queue_commands (user_time);
- /* We'll release the initial reference on idle */
- 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);
@@ -782,6 +775,8 @@ main (int argc,
gtk_main ();
/* Shutdown */
+ g_object_unref (ephy_shell);
+
#ifdef HAVE_LIBNOTIFY
if (notify_is_initted ())
notify_uninit ();