diffuse icon indicating copy to clipboard operation
diffuse copied to clipboard

Prompt once to reload if more than one file modified externally #16

Open yuriiz opened this issue 3 years ago • 7 comments

https://github.com/MightyCreak/diffuse/issues/16

yuriiz avatar Apr 01 '21 06:04 yuriiz

Thanks. What happens if the file is modified in diffuse and outside, especially when auto-reload is on?

krlmlr avatar Apr 05 '21 13:04 krlmlr

It will load from outside as indicated by the setting.

yuriiz avatar Apr 12 '21 06:04 yuriiz

@MightyCreak: Any chance you can review this and other pull requests within the next few weeks? Happy to collaborate in this repository -- this seems the most recent source of diffuse.

krlmlr avatar Apr 17 '21 09:04 krlmlr

@krlmlr I promise I'll get to it, and I'm still tracking the events on this repo, I just need to prioritize my personal life right now, but I'll get back to the repository as soon as I can.

MightyCreak avatar Apr 19 '21 16:04 MightyCreak

Thanks for the heads up, very much appreciated! Let me know if I can help triage or review.

krlmlr avatar Apr 20 '21 04:04 krlmlr

One more thing: when the new dialog shows, the following is printed to the console:

/usr/local/bin/diffuse:7590: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "parent, flags, message_type, buttons, message_format" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dialog = Gtk.MessageDialog(self, Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.QUESTION, Gtk.ButtonsType.NONE, msg)
/usr/local/bin/diffuse:7590: PyGTKDeprecationWarning: The keyword(s) "message_format" have been deprecated in favor of "text" respectively. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dialog = Gtk.MessageDialog(self, Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.QUESTION, Gtk.ButtonsType.NONE, msg)
/usr/local/bin/diffuse:7590: PyGTKDeprecationWarning: The "flags" argument for dialog construction is deprecated. Please use initializer keywords: modal=True and/or destroy_with_parent=True. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dialog = Gtk.MessageDialog(self, Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.QUESTION, Gtk.ButtonsType.NONE, msg)

I'm using an installation that contains both this PR and #96. @yuriiz: Could you please take a look?

krlmlr avatar Apr 20 '21 04:04 krlmlr

One more thing: when the new dialog shows, the following is printed to the console:

/usr/local/bin/diffuse:7590: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "parent, flags, message_type, buttons, message_format" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dialog = Gtk.MessageDialog(self, Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.QUESTION, Gtk.ButtonsType.NONE, msg)
/usr/local/bin/diffuse:7590: PyGTKDeprecationWarning: The keyword(s) "message_format" have been deprecated in favor of "text" respectively. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dialog = Gtk.MessageDialog(self, Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.QUESTION, Gtk.ButtonsType.NONE, msg)
/usr/local/bin/diffuse:7590: PyGTKDeprecationWarning: The "flags" argument for dialog construction is deprecated. Please use initializer keywords: modal=True and/or destroy_with_parent=True. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dialog = Gtk.MessageDialog(self, Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.QUESTION, Gtk.ButtonsType.NONE, msg)

I'm using an installation that contains both this PR and #96. @yuriiz: Could you please take a look?

Should be fixed in https://github.com/MightyCreak/diffuse/pull/93/commits/da581726b9a22dc12836159a8a55a71490c1bd0a

yuriiz avatar Apr 22 '21 05:04 yuriiz

@yuriiz: Are you available for help with this?

krlmlr avatar Oct 24 '22 03:10 krlmlr

@krlmlr @MightyCreak I've adopted changes from https://github.com/MightyCreak/diffuse/commit/87d5ef001d51fadd40efaa979bce8cb56245fd9d and removed changes to handling binaries and new "tabs_reload_automatically" option from this PR.

yuriiz avatar Oct 25 '22 07:10 yuriiz

Ok! So I had a couple of discussions on Matrix in the GTK and GNOME Python rooms and modified your code a bit (made all the dialogs more GNOME HIG compliant by using colors).

Also I added your changes in the changelog.

But it seems that, since you used the master branch on your fork, I suspect this branch is protected, so I can't push my changes on top of yours.

I'll create a new PR with both your changes and mines, merge the new one and close this one.

MightyCreak avatar Nov 07 '22 21:11 MightyCreak

It's merged! Congrats @yuriiz!!

MightyCreak avatar Nov 07 '22 21:11 MightyCreak

Thank you!

yuriiz avatar Nov 09 '22 10:11 yuriiz