Commit Graph

8462 Commits

Author SHA1 Message Date
Calum Lind a481c4d243 [UI] Update UIs for new default piece priority
- libtorrent 1.1 changes default piece priorty to 4 so changes to
   the UIs are required. Some refactoring and improvements were made as well:

    - A new 'Low' priority introduced that is values 1-3.
    - 'Normal' priority is now value 4.
    - Removed 'Highest' with the addition of 'Low' and 'High' is now values 5-7.
    - Renamed 'Do not download' to 'Ignore' so it is more succinct.
    - Moved file priority constant to ui.common.
2017-01-18 12:33:27 +00:00
Calum Lind bb44411a50 [Core] Check valid torrent first in alert handlers 2017-01-18 12:33:26 +00:00
Calum Lind 1e4a24c474 [Docs] Fix docstring return type format in config.py
* With new version of Sphinx 1.5 the warning below was generated, caused
   by incorrect formatting of return type in docstring.

     docstring of deluge.config.find_json_objects:None:
     WARNING: more than one target found for cross-reference u'start'
2017-01-12 11:13:28 +00:00
Calum Lind 993a0f71af [UI] Fix usage of 'with Image.open' in tracker_icons
* Revert changes made to fix 'too many files open' as Image.open does
      not return a file descriptor and generated the following error:

          exceptions.AttributeError: 'NoneType' object has no attribute 'startswith'
2017-01-12 10:11:08 +00:00
Calum Lind 283ad6137d Fix isfile() typo in setup.py 2017-01-09 18:02:28 +00:00
Calum Lind 6743b0c813 [Core] Relocate add_torrent_alert to alerts section 2016-11-30 23:21:46 +00:00
Calum Lind b69ba02652 [Core] Refactor default add torrent flags into a constant 2016-11-30 23:21:45 +00:00
Calum Lind 915f2bf9e7 [Core] Move alert logging to alertmanager 2016-11-30 22:53:18 +00:00
Calum Lind 59b01b363c [Core] Refactor TM register of alert and set funcs 2016-11-30 22:53:18 +00:00
Calum Lind c5e623ae45 [Core] Refactor of priorities code and test 2016-11-30 22:53:18 +00:00
Calum Lind 425af00ebf [GTKUI] Fix the translation of tracker status 2016-11-30 20:43:34 +00:00
Calum Lind 373c8a14b0 [WebUI] Remove duplicated translation code 2016-11-30 20:43:29 +00:00
Calum Lind 5f4a16630e Fix a typo in minify script 2016-11-28 19:20:05 +00:00
Calum Lind 3260db416a [Core] Add a quick fix for lt1.1 default priority change 2016-11-28 19:18:48 +00:00
Calum Lind 9cefbc6e5d [Setup] Refactor BuildWebUI class 2016-11-28 18:59:25 +00:00
Calum Lind 14a5156e15 [Setup] Move package variables to top of file
- Refactor _data_files list so icons paths are auto-generated.
2016-11-28 18:58:45 +00:00
Calum Lind 259c9f11e6 [Setup] Rearrange order of some classes 2016-11-28 17:44:22 +00:00
Calum Lind fd1261ab65 [Setup] Create a CleanTranslations class 2016-11-28 17:44:20 +00:00
Calum Lind 37d9e1f8fe [UI] Move and rename util/lang to translations_util
- The name needed to be more descriptive of it's function.
 - Moved into ui directory because of upcoming  changes being made to setup.py
   meant it would be easier to include all the 'common' ui files if there
   are no sub-dirs such as 'util'.
2016-11-28 17:41:56 +00:00
Calum Lind a924cb73b0 [Setup] Fix wording and syntax in descriptions 2016-11-28 13:00:24 +00:00
Calum Lind 3cbafec68d [Setup] Move deluge egg-info clean to Clean 2016-11-28 13:00:09 +00:00
Calum Lind a48c01c3a5 Cleanup up minify js script
- The slimit package is now widely available so make the script
   only rely on it and closure. Keeping closure as it makes the most
   compact and lints the javascript but it is not as easy to install
   as slimit.
2016-11-28 12:59:03 +00:00
Calum Lind 7468078b71 [Setup] Add a CleanDocs class 2016-11-28 12:58:34 +00:00
Calum Lind 98add5fecd [Lint] Fix issues raised by minify script 2016-11-28 12:58:27 +00:00
Calum Lind 5e1603317a Revert "Rename version.py to calc_version.py to fix buildd error"
This reverts commit 943a9ded00.
2016-11-26 19:35:53 +00:00
Calum Lind 943a9ded00 Rename version.py to calc_version.py to fix buildd error
- There is a version.py included with buildd that is conflicting
   with the deluge one. Rather than messing with sys.path it is
   simplest to rename version.py to calc_version.py
2016-11-26 17:51:07 +00:00
Calum Lind 04370b38ec Revert "[Setup] Fix buildd error with version.py import"
This reverts commit 3aff57600f.
2016-11-26 17:10:13 +00:00
Calum Lind 3aff57600f [Setup] Fix buildd error with version.py import
- The deb buildd command also has a version.py so need to use relative import
   to specify that we really mean deluge supplied version.py.
2016-11-26 16:36:31 +00:00
Calum Lind 874249655d [Tests] Replace isort test with flake8-isort
* Move the known_third_party back to setup.cfg with comments.
2016-11-25 12:43:50 +00:00
Calum Lind 7ebd69218f [Common] Fix is_ipv6 when using ipaddress module
* The ipaddress module require unicode string for 'packed' addresses.
 * Also include minor corrections to the tests.
2016-11-23 11:04:12 +00:00
bendikro 0edebda1c7 [WebUI] Log correct http address if listening on IPv6 2016-11-22 22:07:03 +00:00
Calum Lind 7283e8b668 [Core] Deprecate prioritize_first_last for prioritize_first_last_pieces 2016-11-22 20:45:58 +00:00
Calum Lind f3f380553a [Core] Fix KeyError if only file_priorities in options 2016-11-22 20:45:57 +00:00
Calum Lind 4a9d2d2129 [Core] Decorate methods deprecated 2016-11-22 20:45:57 +00:00
Calum Lind cf343c21a8 [Base] Add new deprecated decorator 2016-11-22 20:45:57 +00:00
Calum Lind 179de3b0ff [#495] Deprecate core.set_torrent_* for core.set_torrent_options 2016-11-22 20:45:57 +00:00
Calum Lind 720d113a9a [GTKUI] Fix typo in About dialog if-statement 2016-11-21 21:47:07 +00:00
Calum Lind 59c9584fe0 [GTKUI] Revert use of non-existent mainwindow.get_window method 2016-11-19 10:36:51 +00:00
Calum Lind 674610ef7d [GTKUI] Use get_window for GdkWindow instead of attribute 2016-11-19 10:32:31 +00:00
Calum Lind b8135617ae Revert "[GTKUI] Add MainWindow.get_window() and replace window attr usage"
Made a mistake with types of window, get_window actually refers to GdkWindow
rather than GtkWindow... The use of self.window.window is confusing and is
still deprecated in Gtk3 so will fix that in following commit.

This reverts commit ccfe6b3c80.
2016-11-19 10:27:34 +00:00
Calum Lind 6ac296118d [GTKUI] Replace decode_string with decode(utf-8)
* We know that GTK widgets will return utf-8 encoded so no need to decode_string.
2016-11-17 12:33:23 +00:00
Calum Lind ecf9822ac0 [Docs] Fix example and param notation in reST docstrings
* For future parsing into other docstring styles.
2016-11-17 12:33:23 +00:00
Calum Lind c1249a2f3a [GTKUI] Switch to non-deprecated GTK methods 2016-11-17 12:33:23 +00:00
Calum Lind 36cbfa8c61 [Lint] Fix files to pass Flake8 v3.2.0 2016-11-17 12:19:41 +00:00
Calum Lind 2657cc3921 [Lint] Quote cleanup 2016-11-17 10:19:59 +00:00
Calum Lind 441861786b [GTKUI] Add decode_string to column name comparison
* Strings from GTK are returned utf8 encoded so require decoding if
   comparing with unicode strings passed around in python code.
2016-11-11 22:22:50 +00:00
Calum Lind 0cdf0230e9 [GTKUI] Refactor gtk imports and code
* Where possible use 'from gtk import ...', i.e. if repeated often or under 10 individual imports.
 * Remove osx_check to not show svg. It's only an issue on Windows so should work fine...
 * Rearrange and deduplicate code into d.u.g.common for getting pixbuf from files.
 * Use 'from gtk.gdk import...' to make it cleaner to apply GTK3 changes in future.
 * Move generic icon code from torrent_data_funcs to common.
 * Fix pylint import warnings and add WindowsError to pylintrc file.
2016-11-11 22:21:51 +00:00
Calum Lind c8e6a4476d [GTKUI] Another update of methods to latest GTK2 API 2.24
* These updates make the code more compatible with GTK3
2016-11-11 14:08:25 +00:00
Calum Lind ccfe6b3c80 [GTKUI] Add MainWindow.get_window() and replace window attr usage
* In GTK3 the use of `window` attribute is no longer valid so need to
   use get_window(). This updates MainWindow to follow the same convention.
2016-11-11 14:08:25 +00:00
Calum Lind 86549eb3ee [GTKUI] Cleanup references to MainWindow 2016-11-11 14:08:25 +00:00