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.
GObject.idle_add is deprecated using GLib.idle_add instead
GObject.timeout_add is deprecated using GLib.timeout_add instead
GObject.SIGNAL_RUN_LAST is deprecated; use GObject.SignalFlags.RUN_LAST instead
GObject.GError is deprecated; use GLib.GError instead
GObject.timeout_add is deprecated use GLib.timeout_add instead.
ListStore(str, str) using unicode_literals get_value return utf8.
- VBox is Box(vertical);
- HBox is Box;
- HButtonBox is ButtonBox;
- HSeparator is Separator;
- VPaned is Paned(vertical);
- Table is Grid;
- use_action_appearance is purged;
- yalign is purged;
- xalign is purged;
- xoptions are purged;
- yoptions are purged;
- add some align: start;
The apidoc modules were not being generated on ReadTheDocs because
there is no way to run sphinx-apidoc manually.
Moved the running of sphinx-apidoc into conf.py.
Added zope.interface minimum version to fix Readthedocs warning.
The use of pkg_resource.require caused an unwanted requirements lookup
that errored out the sphinx build when no dependencies are installed.
This is fixed by switching to pkg_resources.get_distribution.
Also changed the tox docs env to not install Deluge as the setup.py
now contains install_requires which is unwanted.
- Change the layout and contents of docs to be better organised and
follow ideas from: https://www.divio.com/blog/documentation/
- Use markdown for non-technical documents to speed up writing.
- Added new sections and imported documents from Trac wiki.
Build fixes:
- Added a patch to fix recommonmark 0.4 and doc referencing:
https://github.com/rtfd/recommonmark/issues/93
- Set docs build in tox to Py2.7 since there are problems with autodoc
mocking multiple inheritance on Python 3 resulting in metaclass errors.
- Supressed warning about `modules.rst` not in the toctree by creating
a static `modules.rst` with `:orphan:` file directive and add to git.
Also skip creating this toc file with sphinx-apidoc in setup and tox.
- Simplified finding exported RPC and JSON API methods by adding an
autodoc custom class directive. Removed unneeded __rpcapi.py.
- Fix applying the setting to libtorrent, passing the value without
modification so it decide when to enable it.
- Enable super_seeding option when adding torrents to core.
- Update UIs with option in tabs and add dialogs.
- Found an issue while fixing `get_name` where `handle.rename_file`
would raise a UnicodeDecodeError with non-ascii on Python 2. The
fix is to catch this and pass unicode string to method instead.
- Add a test `test_rename_unicode` to verify no errors are generated.
- Updated test to use core.session instead of creating another one.
The recent change to torrent.get_name does not handle non-ascii paths
on Python 2.
- Add a decode_bytes to resolve the issue.
- Add tests.
- Refactor to reduce nesting.
- Replace usage of `s` for variable names to make it easier to read the code.
- Remove unneeded and unused encoding parameter from parse_color_string
It should not be encoded by this function, only on output.
The following error was encountered by user:
...deluge/ui/console/modes/basemode.py, line 290, in add_string
screen.addstr(row, col, string, color)
UnicodeEncodeError: 'ascii' codec can't encode character...
The `add_str` method is defaulting to using the Python 2 ascii
encoding with a unicode string so use the encoding passed to the
function.
- Add an About window to see version details like GTKUI.
- The author and license text were left out as unnecessary.
- Added a daemon get_version method since daemon version was not
available through the json-api.
- Fix LookupResource to ensure path exists when rendering.
If a user keeps the deluge config file under source control and symlinks
to the config files in deluge config dir then when deluge saves config
files it will replace the symlink with actual file.
Using realpath will resolve these symlinks and file will be updated in
the correct location.
Use a temporary file for new config new before moving it to the
resolved location.
Co-authored-by: Calum Lind <calumlind+deluge@gmail.com>
- Use named placeholders to allow translators to change text order.
- Refactor fpcnt to use format() and markup strings properly.
- Remove gettext.js creatation from generate_pot script since this step
is now always done at build-time.
The following error was encountered in GTK3 which is a result of trying
to cast a very large ETA value to C int and raising an Overlflow error.
<type 'exceptions.OverflowError'>: 3072227291 not in range -2147483648 to 2147483647
The solution is to limit the ETA to 1 year and represent any values over
that as -1 which the UIs can display as infinity.
Remove extra_requires since requirements-*.txt files provides these now
plus the extras_requires is for extras at installation time which does
not apply to docs or dev.
For test_requires include the minimal requirements for pytest to run.
This is not the same as the longer tox test requirements that include
linting, docs etcs.
Fix license field.
- Add an install_requires list to allow dependencies to be automatically
installed via setuptools or pip installation.
- Needed a workaround for twisted service_identity install.
- Tweaked the layout a bit with optional part of dependency description.
- Updated descriptions to help understand dependency usage.
- Made intltool and chardet packages optional. This will help with
installation where these might be missing and are not crucial.
- Remove gettext from dependency as is part of Python.
- License should be GPL3+.
- Use the Deluge HTTPS URLs.
- Wrap the description long lines.
- Add launchable tag to launch from software centre after install.
- Removed name tag to use .desktop file name field instead.
The new get_name method needs to function as it did in 1.3-stable so
when renaming a torrent file or top-level folder update torrent name
to reflect that. If UI supports renaming the torrent then the options
value with be used instead.