Re: Meld - feature request / rudimentary working patch



Hi Jay, thanks that's a great idea. Can you open a bugzilla item for
this and attach the patch?

I like the simplicity of the patch.
You can handle the per-file reload by passing None to set_files().
e.g. self.set_files( [None, "/foo/bar", None] ) only reloads the
second file.
Also it would be great to check the mtimes at the top of save_file.
Probably, you don't need to modify the glade files - misc.run_dialog
with "extrabuttons" will do the work.

Regards,
Stephen.

On 5/23/07, Sonrisu <sonrisu gmail com> wrote:
Steve,

I stumbled upon Meld a few days ago and I love what it has to offer.
Unfortunately, it's missing one feature that I have seen apparent even in
certain file editors: it does not notify the user if/when the file has been
modified (from anything other than the application itself) since the file
has been opened. Instead of just asking for this to be added as a feature, I
poked around a little bit and have a (very rudimentary) version of
modification time checking. I simply added a call to check the modification
time of *all* files opened in panes whenever a pane gets focus. If one of
the files are modified, then a dialog pops up asking if the user would like
to reload. I don't have much experience with glade and handling UI events
with it, so I did what appeared to be correct in the limited amount of time
I took to examine the code.

I'm sure you may have different ideas about how this may work (per file
basis, perhaps?). Attached is the diff which implements a quick and dirty
solution to the problem. If you have any questions, feel free to ask.

Thanks for your time,
-Jay





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]