1. 11 May, 2018 1 commit
  2. 20 Apr, 2018 5 commits
    • Kai Willadsen's avatar
      b502235e
    • Kai Willadsen's avatar
      filediff: Add a helper for showing user-criticial errors · db57bf5b
      Kai Willadsen authored
      The idea behind this decorator is that it should be used with functions
      where failure is important to the user (and may not be obvious
      otherwise). The only current use is on save, where it's possible to hit
      a traceback and have the callback handling crash out, but other than a
      log message or traceback on the command line... the user may not notice
      anything.
      
      This is made necessary by the GTK+/pygobject philosophy (which is
      generally extremely good) of treating errors of this kind as non-fatal.
      We also want it to not be fatal in this case, but... the user needs to
      know if they tried to save a file and it didn't work.
      
      On the other hand, if they tried to e.g., go to the next diff and we
      messed something up and didn't go to the next diff, (a) they'd notice
      and (b) showing them a modal dialog would be even more annoying than
      the actual error.
      db57bf5b
    • Kai Willadsen's avatar
      FIXME: Initial pass at a wrapper that ensures that a user sees that we've... · 88d511ab
      Kai Willadsen authored
      FIXME: Initial pass at a wrapper that ensures that a user sees that we've errored, for certain critical things (like saving...)
      88d511ab
    • Kai Willadsen's avatar
    • Kai Willadsen's avatar
      filediff: Work around GtkSourceView load failure (final part of #152) · da3ba746
      Kai Willadsen authored
      When GtkSourceView's loader fails to load due to a unicode decode issue,
      at least one of the failure cases doesn't actually end the in-progress
      user action (see bgo#795387). Because we use user-actions to handle both
      our undo stack and also our sensitivity setting (i.e., we disable some
      things while you're in the middle of a user action) this breaks several
      things across the Meld UI, basically putting us in a very weird state.
      
      The workaround here is... not good, but it's the best we can do for now.
      If/when the GtkSourceView side of this gets fixed, we'll end up with a
      lot of GTK+ critical logs, but everything *should* continue to work.
      da3ba746
  3. 12 Apr, 2018 2 commits
  4. 07 Apr, 2018 5 commits
  5. 22 Mar, 2018 1 commit
  6. 17 Feb, 2018 2 commits
    • Kai Willadsen's avatar
      filediff: Don't reset saving state from while-closing saves · c645afe6
      Kai Willadsen authored
      The bug here looks something like:
      
       * Compare files a, b and c
       * Modify b and c
       * Close the tab; when prompted to save, save both b and c
       * Both files will be saved, but the tab won't close
      
      The problem here was that we were resetting the state to Normal when
      a save succeeded. This doesn't cause an issue if you're only saving
      one file, but if you're saving multiple then the second save to run
      *won't* be in a Closing state in its saved callback, and so won't
      try to close the tab.
      c645afe6
    • Kai Willadsen's avatar
      Make our state saving an enum, for both sanity and better debugging · c2b29ade
      Kai Willadsen authored
      This way at least we get meaningful names when debugging these state
      transitions. Also, it's better in every way.
      
      I've used an IntEnum here just so that I keep the state-changed signal
      signature, though there's no reason that needs to remain the same,
      really.
      c2b29ade
  7. 10 Feb, 2018 1 commit
    • Kai Willadsen's avatar
      undo: Take and keep track of the buffers an UndoSequence references · eb614e7f
      Kai Willadsen authored
      We're using weakrefs here because I'm paranoid about the lifecycle
      issues with GTK+ + Python refcounting fun.
      
      Starting a group now means dereferencing and re-referencing these
      buffers, which isn't great, but is probably the least-bad option. The
      other choice here would be to give groups a reference to their parent
      UndoSequence, and have the buffers lookup follow that, which seems...
      more complicated and confusing.
      eb614e7f
  8. 08 Feb, 2018 3 commits
  9. 28 Jan, 2018 1 commit
  10. 18 Jan, 2018 2 commits
  11. 02 Jan, 2018 1 commit
  12. 30 Dec, 2017 7 commits
  13. 09 Dec, 2017 4 commits
  14. 08 Dec, 2017 1 commit
  15. 25 Nov, 2017 1 commit
  16. 24 Nov, 2017 3 commits