[gedit/wip/loader-saver: 44/48] Update for the move of the buffer to the FileLoader and FileSaver
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/loader-saver: 44/48] Update for the move of the buffer to the FileLoader and FileSaver
- Date: Wed, 9 Jul 2014 11:11:43 +0000 (UTC)
commit 4ac14ce896abb217af2f027d931c5d169143ecb5
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Jul 5 15:50:49 2014 +0200
Update for the move of the buffer to the FileLoader and FileSaver
gedit/gedit-document.c | 2 +-
gedit/gedit-tab.c | 25 +++++++++++++++++++------
2 files changed, 20 insertions(+), 7 deletions(-)
---
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index ab7e531..7547cb7 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -741,7 +741,7 @@ gedit_document_init (GeditDocument *doc)
g_get_current_time (&doc->priv->time_of_last_save_or_load);
- priv->file = gtk_source_file_new (GTK_SOURCE_BUFFER (doc));
+ priv->file = gtk_source_file_new ();
g_signal_connect_object (priv->file,
"notify::location",
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 41899de..99e2363 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -2035,7 +2035,9 @@ _gedit_tab_load (GeditTab *tab,
g_object_unref (tab->priv->loader);
}
- tab->priv->loader = gtk_source_file_loader_new (file, location);
+ tab->priv->loader = gtk_source_file_loader_new (GTK_SOURCE_BUFFER (doc),
+ file,
+ location);
_gedit_document_set_create (doc, create);
@@ -2067,7 +2069,9 @@ _gedit_tab_load_stream (GeditTab *tab,
g_object_unref (tab->priv->loader);
}
- tab->priv->loader = gtk_source_file_loader_new_from_stream (file, stream);
+ tab->priv->loader = gtk_source_file_loader_new_from_stream (GTK_SOURCE_BUFFER (doc),
+ file,
+ stream);
_gedit_document_set_create (doc, FALSE);
@@ -2103,7 +2107,9 @@ _gedit_tab_revert (GeditTab *tab)
g_object_unref (tab->priv->loader);
}
- tab->priv->loader = gtk_source_file_loader_new (file, location);
+ tab->priv->loader = gtk_source_file_loader_new (GTK_SOURCE_BUFFER (doc),
+ file,
+ location);
load (tab, NULL, 0, 0);
}
@@ -2368,7 +2374,10 @@ _gedit_tab_save (GeditTab *tab)
file = gedit_document_get_file (doc);
location = gtk_source_file_get_location (file);
- tab->priv->saver = gtk_source_file_saver_new (file, location);
+ tab->priv->saver = gtk_source_file_saver_new (GTK_SOURCE_BUFFER (doc),
+ file,
+ location);
+
gtk_source_file_saver_set_flags (tab->priv->saver, save_flags);
save (tab);
@@ -2423,7 +2432,9 @@ gedit_tab_auto_save (GeditTab *tab)
file = gedit_document_get_file (doc);
location = gtk_source_file_get_location (file);
- tab->priv->saver = gtk_source_file_saver_new (file, location);
+ tab->priv->saver = gtk_source_file_saver_new (GTK_SOURCE_BUFFER (doc),
+ file,
+ location);
save_flags = get_initial_save_flags (tab, TRUE);
gtk_source_file_saver_set_flags (tab->priv->saver, save_flags);
@@ -2489,7 +2500,9 @@ _gedit_tab_save_as (GeditTab *tab,
save_flags |= GTK_SOURCE_FILE_SAVER_FLAGS_IGNORE_MODIFICATION_TIME;
}
- tab->priv->saver = gtk_source_file_saver_new (file, location);
+ tab->priv->saver = gtk_source_file_saver_new (GTK_SOURCE_BUFFER (doc),
+ file,
+ location);
gtk_source_file_saver_set_encoding (tab->priv->saver, encoding);
gtk_source_file_saver_set_newline_type (tab->priv->saver, newline_type);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]