[gnome-builder] code: mark buffer as unchanged when save completes



commit 21dd1aaa851c3be3c145806bce7739e25f088a62
Author: Christian Hergert <chergert redhat com>
Date:   Fri May 17 13:40:26 2019 -0700

    code: mark buffer as unchanged when save completes
    
    This can be used to clear the infobar after saving with overwrite.

 src/libide/code/ide-buffer.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/libide/code/ide-buffer.c b/src/libide/code/ide-buffer.c
index 9ce7c6dae..7a736d346 100644
--- a/src/libide/code/ide-buffer.c
+++ b/src/libide/code/ide-buffer.c
@@ -1442,6 +1442,11 @@ ide_buffer_save_file_cb (GObject      *object,
   ide_notification_set_progress (state->notif, 1.0);
   ide_buffer_set_state (self, IDE_BUFFER_STATE_READY);
 
+  /* Treat our save as freshest. It's possible we race, as we'd need an etag to
+   * detect that, probably fine in all but the most slowest of races.
+   */
+  _ide_buffer_set_changed_on_volume (self, FALSE);
+
   /* Notify addins that a save has completed */
   if (self->addins != NULL)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]