Open cmahte opened 2 years ago
Seconded! I like the way gedit responds when a file gets changed externally, and I'd love to make Gummi act the same. More broadly, I'd like to make Gummi's file recovery feature work more smoothly with intentional external file changes, such as:
Feedback from people who use Gummi's file recovery feature would be very helpful here.
When a gedit tab gains focus (view_focused_in
), it checks whether the associated file has been changed externally (gtk_source_file_is_externally_modified
). If so, the tab shows an info bar offering to reload the file.
Gummi can already display info bars (like in gui_recovery_mode_enable
) and check whether a tab's associated file has been changed (using GuTabContext*->editor->last_modtime
), so it might be relatively easy to imitate gedit's behavior.
When I use Git to manage LaTeX projects, the file recovery feature adds two annoying steps (in bold) to my workflow.
editor_buffer_changed
asterisk in the tab name.Here's the simplest fix I can think of.
However, I'd love a fix that demands less action from the user. Thoughts?
I've prototyped a gedit-style external changes procedure! It's on the load-changes branch of my fork. Should I make a pull request?
"focus-in-event"
callback."focus-in-event"
callback need to be disconnected manually when a tab is destroyed?tabmanagergui_create_infobar
:
// we will probably want to make a separate file for infobar // procedures that we can attach to hboxes in both the editor // and the preview window, TODO for 0.7.0 -Alex
gtk_source_file_is_externally_modified
, like gedit, instead of a modification time comparison. I think this would require deep changes to the way Gummi associates files with editor tabs.
Missing Menu Item: Reload Document. Hopefully with a shortcut
This is an alternative/interim for Issue 162 that would fill a hole (missing regex replace) to quickly producing lots of tweaked documents.
That is, this is a way to allow Gummi to quickly render files edited externally (with a REGEX enabled editor.)