aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed-shell.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-07-04 20:22:41 +0800
committerChristian Persch <chpe@src.gnome.org>2005-07-04 20:22:41 +0800
commit553cf8c4a065086212d22d52715333ee166b85b5 (patch)
tree3927b984675f82fd3488def5827247166be9a3e3 /embed/ephy-embed-shell.c
parent0e935c597fe2e3e00f672b98f77eaebf48660857 (diff)
downloadgsoc2013-epiphany-553cf8c4a065086212d22d52715333ee166b85b5.tar
gsoc2013-epiphany-553cf8c4a065086212d22d52715333ee166b85b5.tar.gz
gsoc2013-epiphany-553cf8c4a065086212d22d52715333ee166b85b5.tar.bz2
gsoc2013-epiphany-553cf8c4a065086212d22d52715333ee166b85b5.tar.lz
gsoc2013-epiphany-553cf8c4a065086212d22d52715333ee166b85b5.tar.xz
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/ephy-embed-shell.c')
-rw-r--r--embed/ephy-embed-shell.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 8067bf0ea..600037c93 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -43,6 +43,14 @@ struct _EphyEmbedShellPrivate
EphyEncodings *encodings;
};
+enum
+{
+ PREPARE_CLOSE,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
static void ephy_embed_shell_class_init (EphyEmbedShellClass *klass);
static void ephy_embed_shell_init (EphyEmbedShell *shell);
@@ -204,6 +212,14 @@ ephy_embed_shell_get_encodings (EphyEmbedShell *shell)
return G_OBJECT (shell->priv->encodings);
}
+void
+ephy_embed_shell_prepare_close (EphyEmbedShell *shell)
+{
+ EphyEmbedShellPrivate *priv = shell->priv;
+
+ g_signal_emit (shell, signals[PREPARE_CLOSE], 0);
+}
+
static void
ephy_embed_shell_init (EphyEmbedShell *shell)
{
@@ -225,5 +241,22 @@ ephy_embed_shell_class_init (EphyEmbedShellClass *klass)
klass->get_embed_single = impl_get_embed_single;
+/**
+ * EphyEmbed::prepare-close:
+ * @shell:
+ *
+ * The ::prepare-close signal is emitted when epiphany is preparing to
+ * quit on command from the session manager. You can use it when you need
+ * to do something special (shut down a service, for example).
+ **/
+ signals[PREPARE_CLOSE] =
+ g_signal_new ("prepare-close",
+ EPHY_TYPE_EMBED_SHELL,
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EphyEmbedShellClass, prepare_close),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
g_type_class_add_private (object_class, sizeof (EphyEmbedShellPrivate));
}