[gnome-builder/gnome-builder-3-32] code: be more flexible in writes
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-32] code: be more flexible in writes
- Date: Fri, 17 May 2019 20:42:20 +0000 (UTC)
commit b2718d22fbd14980592c1cccb5b42f3e5e30ab49
Author: Christian Hergert <chergert redhat com>
Date: Fri May 17 13:41:07 2019 -0700
code: be more flexible in writes
We provide ample notification to the user now about changes, so we can
overwrite the file contents in this workflow.
src/libide/code/ide-buffer.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/libide/code/ide-buffer.c b/src/libide/code/ide-buffer.c
index 9894d9033..21534d12a 100644
--- a/src/libide/code/ide-buffer.c
+++ b/src/libide/code/ide-buffer.c
@@ -1488,6 +1488,12 @@ ide_buffer_save_file_settle_cb (GObject *object,
}
saver = gtk_source_file_saver_new (GTK_SOURCE_BUFFER (self), state->source_file);
+ /* At this point, we've notified the user of changes to the underlying file using
+ * the infobar, so just save the file knowing that we are overwriting things.
+ */
+ gtk_source_file_saver_set_flags (saver,
+ (GTK_SOURCE_FILE_SAVER_FLAGS_IGNORE_INVALID_CHARS |
+ GTK_SOURCE_FILE_SAVER_FLAGS_IGNORE_MODIFICATION_TIME));
gtk_source_file_saver_save_async (saver,
G_PRIORITY_DEFAULT,
ide_task_get_cancellable (task),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]