[geany/geany] b0d3b5: Close "Deleted from Disk" Infobar on Reload. (#1628)

LarsGit223 git-noreply at xxxxx
Tue Nov 14 22:02:00 UTC 2017


Branch:      refs/heads/master
Author:      LarsGit223 <LarsGit223 at users.noreply.github.com>
Committer:   Thomas Martitz <kugel at rockbox.org>
Date:        Tue, 14 Nov 2017 22:02:00 UTC
Commit:      b0d3b5ed0faadb34edb68bfd7715ffd5d9e0878a
             https://github.com/geany/geany/commit/b0d3b5ed0faadb34edb68bfd7715ffd5d9e0878a

Log Message:
-----------
Close "Deleted from Disk" Infobar on Reload. (#1628)

Cancel 'MSG_TYPE_RESAVE' info bar if still open in function 'document_reload_force'.
This closes the "Deleted from Disk" message if the user clicks on the reload button.
Fixes #1330.


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

Modified: src/document.c
4 lines changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -1601,6 +1601,10 @@ gboolean document_reload_force(GeanyDocument *doc, const gchar *forced_enc)
 
 	g_return_val_if_fail(doc != NULL, FALSE);
 
+	/* Cancel resave bar if still open from previous file deletion */
+	if (doc->priv->info_bars[MSG_TYPE_RESAVE] != NULL)
+		gtk_info_bar_response(GTK_INFO_BAR(doc->priv->info_bars[MSG_TYPE_RESAVE]), GTK_RESPONSE_CANCEL);
+
 	/* Use cancel because the response handler would call this recursively */
 	if (doc->priv->info_bars[MSG_TYPE_RELOAD] != NULL)
 		gtk_info_bar_response(GTK_INFO_BAR(doc->priv->info_bars[MSG_TYPE_RELOAD]), GTK_RESPONSE_CANCEL);



--------------
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