[gedit/wip/loader-saver] Adapt for the FileSaver location -> target-location
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/loader-saver] Adapt for the FileSaver location -> target-location
- Date: Mon, 7 Jul 2014 21:20:34 +0000 (UTC)
commit 2ac5c894a4bbd6b90c72cd176e09a9893c7e6581
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon Jul 7 23:17:24 2014 +0200
Adapt for the FileSaver location -> target-location
gedit/gedit-tab.c | 18 +++++-------------
1 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 2378a3f..51baded 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -2334,7 +2334,6 @@ _gedit_tab_save (GeditTab *tab)
{
GeditDocument *doc;
GtkSourceFile *file;
- GFile *location;
GtkSourceFileSaverFlags save_flags;
g_return_if_fail (GEDIT_IS_TAB (tab));
@@ -2366,11 +2365,8 @@ _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 (GTK_SOURCE_BUFFER (doc),
- file,
- location);
+ tab->priv->saver = gtk_source_file_saver_new (GTK_SOURCE_BUFFER (doc), file);
gtk_source_file_saver_set_flags (tab->priv->saver, save_flags);
@@ -2382,7 +2378,6 @@ gedit_tab_auto_save (GeditTab *tab)
{
GeditDocument *doc;
GtkSourceFile *file;
- GFile *location;
GtkSourceFileSaverFlags save_flags;
gedit_debug (DEBUG_TAB);
@@ -2424,11 +2419,8 @@ gedit_tab_auto_save (GeditTab *tab)
clear_saving (tab);
file = gedit_document_get_file (doc);
- location = gtk_source_file_get_location (file);
- tab->priv->saver = gtk_source_file_saver_new (GTK_SOURCE_BUFFER (doc),
- file,
- location);
+ tab->priv->saver = gtk_source_file_saver_new (GTK_SOURCE_BUFFER (doc), file);
save_flags = get_initial_save_flags (tab, TRUE);
gtk_source_file_saver_set_flags (tab->priv->saver, save_flags);
@@ -2494,9 +2486,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 (GTK_SOURCE_BUFFER (doc),
- file,
- location);
+ tab->priv->saver = gtk_source_file_saver_new_with_target_location (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]