Commit Graph

8112 Commits

Author SHA1 Message Date
bendikro 82fd5e6e8a [UI] Fix sorting in ui/util/lang.py.get_languages() 2016-10-30 12:45:02 +00:00
bendikro 1e183a3258 [UI] Add gettext.ngettext to __builtin__.__dict__
Handle plurality with getttext using ngettext. Added to
__builtin__.__dict__ as _n
2016-10-30 12:45:02 +00:00
bendikro 891209d925 [Common] Add overrides function decorator 2016-10-30 12:45:02 +00:00
bendikro 4d3cf756e4 [#2914] Fix: Specifying file version for default config 2016-10-30 12:45:02 +00:00
Calum Lind 27c87d56bb [Config] Sort the json keys in conf files 2016-10-29 13:26:56 +01:00
Calum Lind 72c588ad33 [WebUI] Modify UI to display single incoming port 2016-10-28 16:01:18 +01:00
bendikro 41fed16d08 [#2900] Fix Error loading torrent: invalid bencoded value
* Testing the torrent with other bencode libs doesn't raise exceptions
   so just revert the 'small fix' applied in b193d87499.
 * Add BTFailure exception so bdecode issue can be caught in deluge code.
2016-10-28 14:43:06 +01:00
Calum Lind 5607bb3d61 [GTKUI] Move Tab data funcs to new common file 2016-10-27 23:10:27 +01:00
Calum Lind fab0af1b40 [Oops] Remove introduced dead code by prev commit 2016-10-27 22:33:17 +01:00
Calum Lind b5afe90764 [GTKUI] Rearrange items in the UI tabs
* Move Private label to Trackers Tab.
 * Move Owner to Options Tab with a future plan for a dropdown box
   to change ownership.
 * Put the torrent status message into the progress bar.
 * Remove duplicate Shared label in Details Tab.
 * Details Tab allow more horizontal room for long folder paths
   and fix horizontal scrolling.
2016-10-27 22:19:00 +01:00
Calum Lind fef160e7a7 [Common] Use log.warning instead of error for download failure 2016-10-27 22:17:29 +01:00
Calum Lind e408dc14cc [#2417] [GTKUI] Add Last Active and modify layout of Status & Details Tabs 2016-10-27 13:11:50 +01:00
Calum Lind 257c31c05f [#2846] Fix splitting IPv6 from external IP alert message 2016-10-26 23:26:01 +01:00
Calum Lind 3f72905b3f Revert "[Py2to3] Clean-up the use of keys() on dictionary objects."
This reverts commit 8b50f3cdbd.
2016-10-26 19:14:10 +01:00
Giorgos Retsinas c4282f29ab [GtkUI] Refactor out duplicate code in piecesbar draw pieces 2016-10-26 10:50:22 +01:00
Calum Lind 642913b0f8 Revert "[Py2to3] Replace iteritems and itervalues"
This reverts commit 7ad8a3cbb5.
2016-10-26 10:49:41 +01:00
Calum Lind 2c3887ece9 [Py2to3] Use open() instead of file() 2016-10-26 09:58:44 +01:00
Calum Lind 9fab98a6ce [Py2to3] Passes libfuturize.fixes.fix_division_safe 2016-10-26 09:58:44 +01:00
Calum Lind 81334389a9 [Tests] Fix tests to run on Twisted < 13
* Also includes pylint fixes for W0233(non-parent-init-called)
 * Remove failing openbittorent icon test
2016-10-26 09:58:43 +01:00
Andrew Resch d579efa041 [Lint] Fix various pylint warnings and fixup code
* Use print function
 * Fix except as statements
 * Remove old twisted 8 code
 * Remove empty docstring
 * Refactor try statement to only contain the relevant import and
   disable pylint import msgs.
 * Use flake8 noqa and pylint comment and drop pyflakes workarounds.
2016-10-26 09:58:43 +01:00
Andrew Resch da4b2b4849 [Py2to3] Make VersionSplit Python 3 compatible.
The builtin cmp() and the __cmp__() special method is no longer used in Python 3, instead we use functools.total_ordering decorator and the __lt__/__eq__ special methods to get the same effect.
2016-10-26 09:58:43 +01:00
Andrew Resch da51e3a3d5 [Py2to3] A group of small compatiblity code changes
* Replace the uses of long with int.
 * Replace im_func with __func__ as it has been provided for Python 3 forward-compatibility.
 * Fix next/__next__ for Python 3 compatibility.
 * Remove the long number literal
 * Ensure freespace() returns int
2016-10-26 09:58:43 +01:00
Andrew Resch 837dae242c [Py2to3] Use future_builtins zip instead of izip for Py3 compat 2016-10-26 09:57:18 +01:00
Andrew Resch 7ad8a3cbb5 [Py2to3] Replace iteritems and itervalues
* Replace the use of iteritems() and itervalues() on dictionary objects
   with items() and values() respectively for Python 3 compatibility.
2016-10-26 09:53:32 +01:00
Andrew Resch 8b50f3cdbd [Py2to3] Clean-up the use of keys() on dictionary objects.
To make the code more Python 3 compatible, I've made a few changes to how we handle keys() or iterkeys() calls on dictionaries. All functionality should remain the same.

 * Remove the use of .keys() or .iterkeys() when iterating through a dictionary.
 * Remove the use of .keys() when checking if key exists in dictionary.
 * Replace dict.keys() with list(dict) to obtain a list of dictionary keys. In Python 3 dict.keys() returns a dict_keys object, not a list.
2016-10-26 09:53:32 +01:00
Calum Lind 16da4d851e [#2850] Fix duplicate ui log entries 2016-10-25 23:22:06 +01:00
Calum Lind a5bc73f0b3 [GTKUI] Use less verbose units to improve look and gain physical space
* Use markup in gtkui to reduce font size of displayed units.
 * Reduced statusbar item sizes using markup and <small> tag. Provides an
   interim solution to #1326 and has reduced width from 930px to ~600px.
 * Integer value for Progress bar value in Peers and Files Tabs.
 * Remove trailing zeros for Pieces size in Details Tab.
 * Change position of Share Ratio in Status Tab.
 * Increase minimum width of column from 10px to 20px for listview.
 * Use shortform units e.g. Columns, Title speed, Status tab, Status bar.
 * Use less precision displaying values in columns.
2016-10-25 23:22:06 +01:00
Calum Lind 258ad95b7a [Common] Enable use of precision and shortform units in unit funcs
* Also fixes #2562; add TiB unit.
2016-10-25 23:21:18 +01:00
bendikro 75714b60ca [Docs] Clean module sources dir before generating docs
If old and outdated sources are present in docs/sources/modules,
python setup.py build_docs will fail to generate docs.
2016-10-21 10:36:24 +01:00
Calum Lind ca7cbd291f [#2861] [Core] Switch to using python-geoip for geoip lookups
* libtorrent >= 1.1 dropped support for GeoIP so this adds support
   again using MaxMind GeoIP Legacy Python Extension API.
   For reference it is known by the following package names:
       * Maxmind: geoip-api-python
       * Linux: python-geoip
       * PyPi: GeoIP
2016-10-21 10:30:52 +01:00
Calum Lind d77666cd3e [GTKUI] Tidyup to use more width and no eol backslashes 2016-10-21 10:11:08 +01:00
Calum Lind 1755347878 [GTKUI] [Console] Modify UIs to display single incoming port 2016-10-21 10:11:08 +01:00
Calum Lind 5978b433d3 [Core] Listening ports fixes and updates
* #2133 Add flags for port reuse and disable binding to system port.
 * #2122 For random port, use single port and store it for reuse.
 * #2343 Fix 'Invalid Arg' from listen_on, likely due to whitespace as interface value.
 * Consolidate listen_on and outgoing_port into single '__set...' methods.
2016-10-20 10:57:03 +01:00
bendikro 37baf3de3c [#2875][Web] Fix: WebUI Json dumps Error 2016-10-19 10:47:41 +02:00
bendikro cfdddc4469 [Web][Tests] Refactor web tests 2016-10-19 10:47:37 +02:00
bendikro d505ebe926 [Tests] Use common.rpath() in all tests 2016-10-18 21:26:36 +01:00
bendikro c8a3fd72d4 [Tests] Improve UI entry script tests
* Added parameter log.setup_logger to prevent output noise in unit tests
2016-10-18 21:26:22 +01:00
Calum Lind 9788ca08ea [GTKUI] Autofill infohash entry from clipboard
* Create new common.is_infohash func and test.
2016-10-18 19:22:59 +01:00
Calum Lind b4787235b5 [#2901] [GTKUI] Strip whitespace from infohash entry before checks
* Copy-pasting from web page can include extra space at end of string.
 * Also make minor change to populate the magnet name with infohash
   for nicer UI display.
2016-10-18 18:58:49 +01:00
Calum Lind 9dd3b1617d [#2889] Fixes for 'Too many files open' error
* Ensure all file descriptors are closed. Using the with statement ensures
   closure.
 * The main problem was with thousands of unclosed file desciptors from
   tracker_icons mkstemp.
 * Use a prefix 'deluge_ticon.' to identify created tracker_icon tmp files.
2016-10-18 18:40:25 +01:00
Calum Lind 58835eeb2e Refactor daemon check process functions 2016-10-18 18:22:31 +01:00
Calum Lind 3a8ed2e9cb [Core] Change deprecated lt.version to lt.__version__ 2016-10-17 12:40:28 +01:00
Giorgos Retsinas 6b630c9fd2 [GtkUI] Fix ZeroDivisionError in piecesbar
While waiting for metadata for a magnet, self.__num_pieces is zero.
2016-10-10 18:58:28 +01:00
Calum Lind db1b427b3f [Tests] Fix flake8 v3 searching .tox dir 2016-10-10 18:46:09 +01:00
Calum Lind aa164cdbce [Core] Fix AttributeError for removed load_country_db method in lt 1.1.1 2016-09-28 10:32:35 +01:00
Calum Lind 9c27ed29ae [#2768] [GTKUI] [OSX] Fix invalid file error at startup
When installed to the system, not using .app, error is raised on startup
as nsapp_open_file is ignoring Deluge-bin but not deluge or deluge-gtk for
potential 'filename' when connecting NSApplicationOpenFile.
2016-07-21 00:29:14 +01:00
Calum Lind d2385e9c75 [#2857] [Notification] Fix issues with SMTP port input 2016-07-19 15:14:47 +01:00
Calum Lind 01d27e22f8 [#2855] [WebUI] Unable to add UDP trackers 2016-07-19 11:49:00 +01:00
Calum Lind abf90f1dd6 [#2784] [Execute] Escape ampersand in args for Windows
Due to the nature of passing a command and args to cmd.exe and then
to a batch file in Windows any ampersands in execute args need to be
double-escaped so prefixing with tripe-caret (^^^&) is the fix for this.
2016-06-29 23:24:23 +01:00
Calum Lind 53215d87ee [#2077] [Extractor] Ignore the remaining rar part files
* Bump version to 0.6
2016-06-10 15:33:04 +01:00