[geany/geany] ffcec4: document.c: Immediately mark as changed when document is externally deleted

Thomas Martitz git-noreply at xxxxx
Sun Jun 29 09:38:02 UTC 2014


Branch:      refs/heads/master
Author:      Thomas Martitz <kugel at rockbox.org>
Committer:   Thomas Martitz <kugel at rockbox.org>
Date:        Sun, 29 Jun 2014 09:38:02 UTC
Commit:      ffcec43d01609ea0cc8a8e25d77bd4325b5b1e27
             https://github.com/geany/geany/commit/ffcec43d01609ea0cc8a8e25d77bd4325b5b1e27

Log Message:
-----------
document.c: Immediately mark as changed when document is externally deleted

Before infobar it didn't matter because the dialog was modal and interaction
with the doc was impossible. Now that you can interact it the doc should
be marked changed immediately.


Modified Paths:
--------------
    src/document.c

Modified: src/document.c
10 lines changed, 3 insertions(+), 7 deletions(-)
===================================================================
@@ -3256,13 +3256,6 @@ static void on_monitor_resave_missing_file_response(GtkWidget *bar,
 	if (response_id == GTK_RESPONSE_ACCEPT)
 		file_saved = dialogs_show_save_as();
 
-	if (!file_saved)
-	{
-		document_set_text_changed(doc, TRUE);
-		/* don't prompt more than once */
-		SETPTR(doc->real_path, NULL);
-	}
-
 	doc->priv->info_bars[MSG_TYPE_RESAVE] = NULL;
 }
 
@@ -3286,6 +3279,9 @@ static void monitor_resave_missing_file(GeanyDocument *doc)
 				doc->file_name);
 
 		protect_document(doc);
+		document_set_text_changed(doc, TRUE);
+		/* don't prompt more than once */
+		SETPTR(doc->real_path, NULL);
 		doc->priv->info_bars[MSG_TYPE_RESAVE] = bar;
 		enable_key_intercept(doc, bar);
 	}



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list