@eht16 requested changes on this pull request.

Looks good and works as expected.

Beside my other minor comments, adding the keybinding to https://github.com/geany/geany/blob/master/doc/geany.txt#file-keybindings would be cool.


In src/document.h:

> @@ -244,6 +244,8 @@ gboolean document_reload_prompt(GeanyDocument *doc, const gchar *forced_enc);
 
 void document_reload_config(GeanyDocument *doc);
 
+void force_reload_all(void);

Seems like a left-over.


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)

The function name somewhat suggests there is a toolbar button while it is not.
It might be unlikely that we will add a toolbar item for this functionality, so I think it's worth to rename the function to make it less confusing.


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

Fine!
What do you think about additionally ignoring documents which have doc->changed set?
It might be surprising for the user if changed documents get reloaded and the unsaved changes will be lost without a warning.


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.