[Github-comments] [geany/geany] Add reload all keybinding (#2859)
Enrico Tröger
notifications at xxxxx
Sat Aug 7 08:16:15 UTC 2021
@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.
> @@ -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.
> @@ -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.
> @@ -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 or view it on GitHub:
https://github.com/geany/geany/pull/2859#pullrequestreview-724802554
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20210807/8dd2455f/attachment.htm>
More information about the Github-comments
mailing list