diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-07-04 20:22:41 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-07-04 20:22:41 +0800 |
commit | 553cf8c4a065086212d22d52715333ee166b85b5 (patch) | |
tree | 3927b984675f82fd3488def5827247166be9a3e3 /embed/mozilla/mozilla-embed-single.cpp | |
parent | 0e935c597fe2e3e00f672b98f77eaebf48660857 (diff) | |
download | gsoc2013-epiphany-553cf8c4a065086212d22d52715333ee166b85b5.tar.gz gsoc2013-epiphany-553cf8c4a065086212d22d52715333ee166b85b5.tar.zst gsoc2013-epiphany-553cf8c4a065086212d22d52715333ee166b85b5.zip |
Better fix for bug #151037 to make session shutdown work again. Also fix
2005-07-04 Christian Persch <chpe@cvs.gnome.org>
* embed/downloader-view.c: (remove_download), (prepare_close_cb),
(downloader_view_init), (downloader_view_finalize),
(downloader_view_remove_download), (download_dialog_delete_cb):
* embed/ephy-embed-shell.c: (ephy_embed_shell_prepare_close),
(ephy_embed_shell_class_init):
* embed/ephy-embed-shell.h:
* embed/ephy-favicon-cache.c: (prepare_close_cb),
(ephy_favicon_cache_init), (kill_download):
* embed/mozilla/mozilla-embed-find.cpp:
* embed/mozilla/mozilla-embed-single.cpp:
* embed/mozilla/mozilla-embed.cpp:
* embed/mozilla/mozilla-notifiers.cpp:
* embed/mozilla/mozilla-notifiers.h:
* src/ephy-session.c: (ephy_session_init), (ephy_session_dispose),
(ephy_session_autoresume), (close_dialog), (ephy_session_close):
* src/ephy-shell.c: (ephy_shell_startup), (toolwindow_hide_cb):
* src/ephy-window.c: (ephy_window_finalize):
Better fix for bug #151037 to make session shutdown work again.
Also fix session shutdown while resuming, and preserve the session
in this case.
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index 2053914e9..00d06875a 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -28,6 +28,7 @@ #include "ephy-cookie-manager.h" #include "ephy-password-manager.h" #include "ephy-permission-manager.h" +#include "ephy-embed-shell.h" #include "glib.h" #include "ephy-debug.h" @@ -545,6 +546,20 @@ init_services (MozillaEmbedSingle *single) } static void +prepare_close_cb (EphyEmbedShell *shell) +{ + GValue value = { 0, }; + + /* To avoid evil web sites posing an alert and thus inhibiting + * shutdown, we just turn off javascript! :) + */ + g_value_init (&value, G_TYPE_BOOLEAN); + g_value_set_boolean (&value, FALSE); + mozilla_pref_set ("javascript.enabled", &value); + g_value_unset (&value); +} + +static void mozilla_embed_single_init (MozillaEmbedSingle *mes) { mes->priv = MOZILLA_EMBED_SINGLE_GET_PRIVATE (mes); @@ -571,6 +586,10 @@ mozilla_embed_single_init (MozillaEmbedSingle *mes) exit (0); } + + g_signal_connect_object (embed_shell, "prepare-close", + G_CALLBACK (prepare_close_cb), mes, + (GConnectFlags) 0); } static void |