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

David Yang notifications at xxxxx
Mon Aug 9 09:20:34 UTC 2021


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

Pretty sure automatic detection doesn't do it as you switch to the tab, unless file_prefs.reload_clean_doc_on_file_change is on and it isn't on by default and it sounds like a world of accidental data loss anyways. Also it seems like the various tab is the only place where you can access it, and with the way the various tab looks no one is ever going to just browse that tab so features that can only be enabled through it basically don't exist unless you're told that they can be found in there. 1 refresh better than hitting the key 15 times after you run a git checkout, and manual refresh >>> magic automatic refresh no matter what background program silently changed your file.

I'll try adding the save check, see if this feels better, but it feels like it goes against the spirit of the dialog that pops with keep_edit_history_on_reload to quietly reload files with an edit history. The whole annoyance only happens with that flag anyways, and I think anyone who has that flag on doesn't mind being nagged a bunch.

-- 
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_r685036383
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20210809/50d861c6/attachment.htm>


More information about the Github-comments mailing list