There were issues with dependencies and tox environments under Python 3
so refactored the tox configuration to be more consistent and clearer.
- Moved travis to default to Python 3 for linting and tests.
- Fixed missing mock for cairo in sphinx config.
- Collated the base deps sections to improve readability.
- Added PYTEST_ADDOPTS env to override pytest verbosity in just tox
tests as this was a common option being used.
- Renamed env 'testcoverage' to the more concise 'coverage' and moved
html creation under single env as handy to have this output as well
as report.
- Cleaned up the isort config for gtk3.
- Added `bad-continuation` to pylint config as conflcts with black
formatting.
- Fix isort issue with bbfreeze script. This will likely be removed
in future so just skip sorting it.
To ensure properties are updated this is a simple open and save with the
glade designer. Always a bit messy with the diff but should not
change functionality.
The popup_at_pointer method is only available in GTK >=3.22 so for
compatibility restore using popup method.
Right-clicking on column headers popped-up torrent menu so only show
this menu when in torrentview.
The % substitution was causing the bytes prefix to become part of the
string and created a `b'/` prefixed config directory. Ensure the config
arg is byte prefixed too.
- Added a tooltip to show text status which also required translation
so created a new liststore column for the translated text to ensure
status is parsed correctly.
- Forced the status to lowercase to avoid translation issues and
simplify comparisons.
Replace the old appindicator imports with AppIndicator3.
- Only few changes required due to Enum renaming.
- Updated the preference import to include require_version and set a bool.
- The password preference needs to be encoded for hashlib on Python3 but
also need to keep Python 2 support so attempt decode then encode.
- Switch from pynotify to gi libnotify binding.
- Ideally would drop libnotify for [GNotification] but requires more
work with the desktop file needing renamed to DNS format.
e.g. `org.deluge-torrent.deluge`
[GNotification]: https://developer.gnome.org/GNotification/
Co-authored-by: Calum Lind calumlind+deluge@gmail.com
- Added new svg icons for cleaner look.
- Use widget get_allocated_width and get_allocated_height instead of window size.
- Tweaked margins to fix spacing issues.
- Removed yellow background from 'slow settings' and applied only to label.
Co-authored-by: Calum Lind <calumlind+deluge@gmail.com>
- Several of the FIXME comments seem to be outdated so removed.
- The status_icon comment was resolved by fixing the arguments supplied to
tray_menu.popup().
- The TreePath no longer returns a tuple so cast path to int.
- Fix an error with Pixbuf signature.
With move to GTK3 needed to update the mocking of external modules.
There is a new autodoc option `autodoc_mock_imports` so use this instead
of the custom mock class.
There are some build warnings output using autodoc mock:
TypeError: unsupported operand type(s) for |: '_MockObject' and '_MockObject'
Will resolve these later as the build passes.
In Python 3 builtin next function instead of the next method.
Unpickling with translated strings in state file causes ascii decode
error so ensure UTF-8 encoding is specified.
Right-clicking on column header resulted in this error:
TypeError: could not convert type EventButton to GdkEvent required for parameter 0
The following fixes and cleans up the issue:
- Move the signal creation to the class, using the __gsignals__ dict.
- Replace `Event` with `object` since we are passing an EventButton as
Gtk3 no longer accepts it as an Event.
- Replace deprecated menu `popup()` with `popup_at_pointer()` which also
fixes a critical gdk error when using `popup()`.
The filechooser dialog was wrongly transient to the main window causing
weird behaviour, namely the main window moving but dialog remaining in
place when attempting to move the child dialog.
The solution is to pass the parent dialog to PathChooser so it can be
properly set the filechooser dialog transient property.
Fixed the Preferences dialog not being set to be modal to main window.
My personal feeling is that GTK client-side decoration (CSD) putting
main dialog buttons in the titlebar is wrong so create a non-CSD dialog.
There was no simple way of changing GtkFileChooserDialog to play nice
with non-CSD buttons and resulting in these GTK warnings:
Gtk-WARNING : Content added to the action area of a dialog using header bars
There is an unwanted dialog border with this custom filechooser dialog
with no apparent way to remove them. Would require switching to a
GtkWindow implementation.