@eht16 commented on this pull request.


In src/callbacks.c:

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

I guess we are both right: there is a setting (in the preferences dialog in the "Various" tab): "files.keep_edit_history_on_reload" and if this option is not enabled and the document has been modified, CTRL+R will display a confirmation dialog (see https://github.com/geany/geany/blob/master/src/document.c#L1651).

And so we could maintain this behaviour and either skip all modified documents if this option is disabled or just display a similar confirmation dialog as the current one before the reloading is performed.

While I agree with you that using the keyboard shortcut is probably a dedicated decision for most users, we still should respect that setting. Reloading unsaved changes while keeping the Undo history is fine but without the history, it might affect the user.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.