1227 Commits

Author SHA1 Message Date
Calum Lind
3f72905b3f Revert "[Py2to3] Clean-up the use of keys() on dictionary objects."
This reverts commit 8b50f3cdbdec4f2fa622aca9d0e4b45e5e4bf3aa.
2016-10-26 19:14:10 +01:00
Calum Lind
9fab98a6ce [Py2to3] Passes libfuturize.fixes.fix_division_safe 2016-10-26 09:58:44 +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
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
01d27e22f8 [#2855] [WebUI] Unable to add UDP trackers 2016-07-19 11:49:00 +01:00
bendikro
5e493f2d3f [UI] Use a shared DEFAULT_HOSTS dict in ui/common
Instead of defining a DEFAULT_HOSTS dict for each UI
use a shared dict.
2016-05-24 21:10:52 +02:00
Calum Lind
262c8d71d5 [WebUI] Queue prefs updated 2016-05-23 15:19:58 +01:00
Calum Lind
3837a2c5d6 [WebUI] Constrain dialogs to browser window 2016-05-23 15:18:34 +01:00
Calum Lind
dc56e4557b [WebUI] Create more space by removing headers from Prefs dialogs 2016-05-23 15:05:51 +01:00
bendikro
d689ad72e8 [UI] [#1973] Improve passing extra args to UIs
Current solution for passing arguments to UI when invoking deluge
entry script is to select an UI with the --ui option and supply quoted
arguments with the --args option.

This patch cleans this up by removing both options and change to using
subparsers for valid UIs. All command line options are now parsed
directly by the child UI which is chosen by a positional argument,
i.e. the UI name.

The help text now also shows the current default UI.
2016-05-21 15:05:01 +01:00
bendikro
d6fec88932 [UI] Move Gtk console entry point class to __init__
To avoid unnecessarily importing modules from gtkui.py, move Gtk
console entry point class to __init__.py. This reduces load time
when showing help (deluge -h) with many hundred miliseconds

Also cleanup unnecessary WebUI code.
2016-05-21 15:04:59 +01:00
bendikro
6ce9f77e17 [WebUI] Handle missing script files and fallback to available files
* To help user's encountering a blank web page, log warnings if script
files for a selected mode are missing and attempt to fallback to a working mode.
 * There is no logging for dev version detection to prevent spamming output.
 * Add slimit dependency to tox
2016-05-19 15:24:37 +01:00
Calum Lind
bd7d10b81e [Lint] [WebUI] Fix issues raised by closure 2016-05-18 09:53:09 +01:00
Calum Lind
876e70d85f [WebUI] Remove margins from main window elements 2016-05-16 13:44:00 +01:00
Calum Lind
590f077963 [WebUI] Tidyup Add dialog margins 2016-05-16 13:27:00 +01:00
Calum Lind
2aa1ab2f2b [WebUI] Revert broken refactor of theme css
By combining the background-* css styles into background it overrides background
settings in ext-all-notheme.css resulting in incorrect placement of grid header gif.
2016-05-16 12:37:08 +01:00
Calum Lind
2e08599f82 [WebUI] Disable disabling WebUi plugin in WebUI 2016-05-16 12:37:08 +01:00
Calum Lind
b450739333 [WebUI] Remove border in Prefs for cleaner look 2016-05-16 12:37:08 +01:00
Calum Lind
e330ff0299 [WebUI] Tidyup prefs plugins details 2016-05-16 12:37:08 +01:00
Calum Lind
6c233da2ff [WebUI] Case-insensitive sort for plugins list 2016-05-16 12:37:08 +01:00
Calum Lind
fa309d0d18 [WebUI] Refactor json_api._get_host 2016-05-16 12:37:07 +01:00
Calum Lind
9f187ed027 [WebUI] Add missing deregister event handlers 2016-05-15 21:30:25 +01:00
Calum Lind
42e5876ebe [#2293] [WebUI] Fix plugins not loading when using WebUI plugin
- Any plugins that were started before the WebUI plugin would not be loaded
   upon starting the web server and would be not show up. The fix is to use
   web.pluginmanager.start to get all enabled plugins from core.
 - Update log message output for enable/disable in pluginmanager
2016-05-15 21:20:27 +01:00
Calum Lind
46b726a4e0 [WebUI] Fix prefs plugins page not listing enabled plugins correctly
This fixes the display of which plugins are currently running. The old
code was returned a list of enabled plugins containing WebUI code so
switched to calling the entire list of a plugins from core.

Also updated the docstring in json api to reflect actual usage.
2016-05-15 21:18:16 +01:00
Calum Lind
0278e782e0 [#2490] Add external IP to statusbar 2016-05-14 12:29:53 +01:00
Calum Lind
9adc9f886c [WebUI] Add missing translation markup 2016-05-14 11:14:17 +01:00
Calum Lind
618d2f9f58 [Lint] Enable pylint 'bad-continuation' and fix issues
There is some discrepency between pep8 and pylint for line
continuation (https://github.com/PyCQA/pylint/issues/747) but
with some minor layout changes both can pass and code looks fine,
if not better in places.
2016-05-09 20:10:51 +01:00
bendikro
bb0e699619 [UI] Add tests for ui_entry 2016-05-08 12:00:44 +01:00
bendikro
91ed621ec8 [UI] Changed ui command description and help 2016-05-06 12:44:45 +01:00
bendikro
84d2d20e13 [Web] Pylint fix for WebUtils 2016-04-29 23:23:23 +01:00
Calum Lind
b255fc40af [WebUI] Remove openssl check as already a requirement 2016-04-28 11:10:09 +01:00
Calum Lind
7b523af05b [#2819] [WebUI] Handle CannotListenError for second instance 2016-04-28 11:09:53 +01:00
Calum Lind
bd65abd3b4 [UI] [Core] Combine common process options into baseargparser 2016-04-28 11:09:53 +01:00
Calum Lind
b4dd90ba2b Cleanup code in web and deamon entries to match 2016-04-28 11:09:52 +01:00
Calum Lind
c274d5114c [#2818] [WebUI] Fix AttributeError starting WebUI on windows 2016-04-28 11:09:52 +01:00
Calum Lind
69871506e1 Improve order of args and wording of '--help' text 2016-04-28 11:09:39 +01:00
Calum Lind
acdc19df1d Add translation markup to '--help' options 2016-04-28 11:07:26 +01:00
Calum Lind
2bad04848c [WebUI] Update gettext.js 2016-04-25 15:41:47 +01:00
Calum Lind
bf3d6ae24b [WebUI] Add refresh dialog for language change 2016-04-25 15:35:52 +01:00
Calum Lind
2984e2dc5d [WebUI] Fix Interface page not saving with OK button 2016-04-25 15:35:21 +01:00
Calum Lind
3b23f69786 [WebUI] Use Apply button to change password 2016-04-25 13:26:59 +01:00
Calum Lind
9fbc63e6fb [WebUI] Tidy Interface page layout 2016-04-25 13:26:59 +01:00
bendikro
857e2fd46e [#1959] [WebUI] Allow user selectable GUI language 2016-04-25 13:26:58 +01:00
bendikro
dea43da4d2 [UI] [Daemon] Re-add --fork option 2016-04-24 22:39:16 +01:00
Calum Lind
d32796eab0 [WebUI] Reword doctring and update gettext.js 2016-04-23 23:13:11 +01:00
Calum Lind
1a79d7c255 [WebUI] Remove unneeded translation markup 2016-04-23 22:40:17 +01:00
bendikro
64ac5fdf73 [#2677] [Web] With --base option set, serve locally on new base path
When specifying the --base option to work with reverse proxy
the WebUI is no longer accessible locally since it listens
on the server root, but serves on the path specified to work
for the reverse proxy.
Change this to also handle local requests to the base path
such that the WebUI will be available both for the reverse proxy
as well as locally on the interface/port which the twisted sever
listens on.
2016-04-22 23:04:19 +01:00
bendikro
e370d7dbdd [Web] Fix error in WebApi in standalone mode
In GTKUI standalone mode, WebApi.enable would try to connect to
daemon if web.conf had the 'default_daemon' option set, causing
the client calls to break.
2016-04-18 21:03:03 +01:00
bendikro
70d8b65f0a [WebUi] [Core] Fixes to plugin handling and WebUi plugin + tests
This should fix problems with errors occuring when failing to
enable plugins. Errors in plugin handling are handled better
and properly logged.

WebUI plugin in particular had issues when being enabled and disabled
multiple times because it was trying to create DelugeWeb component
each time it was enabled. If deluge-web is already listening on
the same port, enabling the WebUI plugin will fail, and the checkbox
will not be checked.

There are still some issues when enabling/disabling plugins by
clicking fast multiple times on the checkbox.
2016-04-18 15:49:30 +01:00
bendikro
64c67a07dd [WebUI] Fix #2798: WebUI plugin fails to start 2016-04-18 12:01:02 +01:00