[gtksourceview/wip/file-loader-set-modified: 2/2] FileLoader: document not_undoable_action() and set_modified() behavior



commit 7a615a7a37303dd6d7551c557a72026f14cbfcf8
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Jun 20 11:39:44 2015 +0200

    FileLoader: document not_undoable_action() and set_modified() behavior
    
    Since apps rely on that, it's better to document it.

 gtksourceview/gtksourcefileloader.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcefileloader.c b/gtksourceview/gtksourcefileloader.c
index d8b8b8e..fd484c5 100644
--- a/gtksourceview/gtksourcefileloader.c
+++ b/gtksourceview/gtksourcefileloader.c
@@ -43,6 +43,13 @@
  * A file loader should be used only for one load operation, including errors
  * handling. If an error occurs, you can reconfigure the loader and relaunch the
  * operation with gtk_source_file_loader_load_async().
+ *
+ * Running a #GtkSourceFileLoader is an undoable action for the
+ * #GtkSourceBuffer. That is, gtk_source_buffer_begin_not_undoable_action() and
+ * gtk_source_buffer_end_not_undoable_action() are called, which delete the
+ * undo/redo history. After a file loading, the buffer is reset to the contents
+ * provided by the #GFile or #GInputStream, so the buffer is set as unmodified,
+ * that is, gtk_text_buffer_set_modified() is called with %FALSE.
  */
 
 #if 0


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