Better abstraction of the unsaved window status.
[pspp-builds.git] / src / ui / gui / psppire-syntax-window.c
index 86d87bb92b22a4f7a5086215b8ba7e26eb8e4745..a5cc08aa93b9a711f84cca75894cef2b013b2ee4 100644 (file)
@@ -414,10 +414,10 @@ on_text_changed (GtkTextBuffer *buffer, PsppireSyntaxWindow *window)
 static void
 on_modified_changed (GtkTextBuffer *buffer, PsppireWindow *window)
 {
-  psppire_window_set_unsaved (window, gtk_text_buffer_get_modified (buffer));
+  if (gtk_text_buffer_get_modified (buffer))
+    psppire_window_set_unsaved (window);
 }
 
-
 extern struct source_stream *the_source_stream ;
 
 static void