Encoutered an error reordering files by dragging in the files tab:
TypeError: can't pickle TreePath objects
The issue was get_selected_row now returns a list of TreePath objects which
cannot be pickled. Also the set_text method only accept unicode text to
pickled bytes cannot be used.
The fix is to convert the TreePaths to strings and use json to encode
the list of strings for set_text.
- Fix new flake8 warnings from latest version.
Note: The `addSlash` variable was orphaned with no reference in
Twisted or Deluge code so removed.
- Update pre-commit config
- New pinned versions.
- Fix prettier output.
- Use new flake8 hook config and add naming plugin.
When showing the main_window, Add dialog or file manager windows they
would not appear at the top of the display stack, always one below.
This is due to needing the windowing timestamp to be passed when making
these calls. The recommended Gtk solution to use present_with_time and
use an event.time timestamp. However, this does not always work so
instead used the lower level Gdk set_user_time and fetch timestamp from
X11 server.
Notes:
- Using int(time.time()) for timestamp is not correct as the
windowing timestamp is different.
- Gtk.get_current_event_time only works when there is an event being
processed.
- It might be useful for non-X11 windowing systems to store event
timestamps so that we have a value to use instead of 0.
- Fixed the core not correctly settings the current file_priority
settings and added a test.
- Fixed the console not setting file priorities.
- Change the label for not downloading of a file to 'Skip'.