[Github-comments] [geany/geany] Add reload all keybinding (#2859)

Enrico Tröger notifications at xxxxx
Mon Aug 9 22:04:25 UTC 2021


@eht16 commented on this pull request.



> @@ -335,6 +335,21 @@ void on_toolbutton_reload_clicked(GtkAction *action, gpointer user_data)
 	document_reload_prompt(doc, NULL);
 }
 
+/* reload all files */
+void on_toolbutton_reload_all_clicked(GtkAction *action, gpointer user_data)
+{
+	guint i;
+	gint cur_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(main_widgets.notebook));
+	
+	foreach_document(i)
+	{
+		if (! (documents[i]->file_name == NULL))

What if we use a single confirmation dialog for the "reload all" feature which just explains the user that Geany is going to reload all files and that any unsaved changes will be lost. The dialog could look like "Reloading all open documents cause any unsaved changes to be lost" [OK] [Cancel] or something like this.
So the user has the chance to cancel the progress before anything is reloaded and only experiences the "annoyance" of one dialog.

The dialog is necessary only if:
- any of the open documents has unsaved changes
- `keep_edit_history_on_reload` is off

I think this could work well enough for most users, assuming the majority has `keep_edit_history_on_reload` on anyway.

(Sorry if I repeated this idea in case one of you mentioned it already earlier.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2859#discussion_r685552018
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20210809/ac284db6/attachment.htm>


More information about the Github-comments mailing list