[gedit/wip/loader-saver: 54/58] tab: emit the GeditDocument "load" and "save" signals
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/loader-saver: 54/58] tab: emit the GeditDocument "load" and "save" signals
- Date: Sun, 6 Jul 2014 16:44:09 +0000 (UTC)
commit 93194e6097d5d5e6845a22f37ea2b6c7ce4dd29c
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon Jun 30 23:55:52 2014 +0200
tab: emit the GeditDocument "load" and "save" signals
gedit/gedit-tab.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 35b25bb..5b57ef6 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -1958,6 +1958,7 @@ load (GeditTab *tab,
GSList *candidate_encodings = NULL;
GtkSourceFile *file;
GFile *location;
+ GeditDocument *doc;
g_return_if_fail (GTK_SOURCE_IS_FILE_LOADER (tab->priv->loader));
@@ -1993,6 +1994,9 @@ load (GeditTab *tab,
g_clear_object (&tab->priv->cancellable);
tab->priv->cancellable = g_cancellable_new ();
+ doc = gedit_tab_get_document (tab);
+ g_signal_emit_by_name (doc, "load");
+
/* Keep the tab alive during the async operation. */
g_object_ref (tab);
@@ -2277,10 +2281,15 @@ save_cb (GtkSourceFileSaver *saver,
static void
save (GeditTab *tab)
{
+ GeditDocument *doc;
+
g_return_if_fail (GTK_SOURCE_IS_FILE_SAVER (tab->priv->saver));
gedit_tab_set_state (tab, GEDIT_TAB_STATE_SAVING);
+ doc = gedit_tab_get_document (tab);
+ g_signal_emit_by_name (doc, "save");
+
/* Keep the tab alive during the async operation. */
g_object_ref (tab);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]