summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind@gmail.com>2018-10-08 15:22:49 +0200
committerCalum Lind <calumlind@gmail.com>2018-10-08 15:49:36 +0200
commit20fa106b8b746662cf1a884f8b2f8521a94efa68 (patch)
tree79544ea607471590a1451878176124911145d6d8
parent[WebUI] Fix browser Flash plugin warning (diff)
downloaddeluge-20fa106b8b746662cf1a884f8b2f8521a94efa68.tar.xz
deluge-20fa106b8b746662cf1a884f8b2f8521a94efa68.zip
Update pre-commit config
The prettier hook was missing a trailing slash so omitting css files. Add a trailing space fix hook and fix issues.
-rw-r--r--.pre-commit-config.yaml6
-rw-r--r--README.rst2
-rw-r--r--deluge/ui/web/js/extjs/ext-extensions-debug.js54
-rw-r--r--deluge/ui/web/js/extjs/ext-extensions/form/RadioGroupFix.js2
-rw-r--r--deluge/ui/web/js/extjs/ext-extensions/form/SpinnerFieldFix.js2
-rw-r--r--deluge/ui/web/js/extjs/ext-extensions/form/ToggleField.js2
-rw-r--r--deluge/ui/web/js/extjs/ext-extensions/layout/FormLayoutFix.js2
-rw-r--r--deluge/ui/web/js/extjs/ext-extensions/tree/MultiSelectionModelFix.js2
-rw-r--r--deluge/ui/web/js/extjs/ext-extensions/tree/TreeGridNodeUIFix.js2
-rw-r--r--docs/source/core/rpc.rst14
-rw-r--r--docs/source/interfaces/web.rst4
-rw-r--r--packaging/osx/gtkrc2
12 files changed, 48 insertions, 46 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5d53fb355..bf2252ada 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -14,7 +14,7 @@ repos:
hooks:
- id: prettier
name: Fmt Prettier
- files: "\\.(
+ files: "\\.(\
css\
|less\
|scss\
@@ -35,8 +35,10 @@ repos:
name: Fix End-of-files
exclude_types: [javascript, css]
- id: mixed-line-ending
- name: Fix Line-endings
+ name: Fix Line endings
args: [--fix=auto]
+ - id: trailing-whitespace
+ name: Fix Trailing whitespace
- id: flake8
name: Chk Flake8
additional_dependencies:
diff --git a/README.rst b/README.rst
index 0915020c2..45f10788c 100644
--- a/README.rst
+++ b/README.rst
@@ -10,7 +10,7 @@ Authors:
Andrew Resch
Damien Churchill
-For contributors and past developers see:
+For contributors and past developers see:
AUTHORS
==========================
diff --git a/deluge/ui/web/js/extjs/ext-extensions-debug.js b/deluge/ui/web/js/extjs/ext-extensions-debug.js
index 38b665ff3..37165d2ab 100644
--- a/deluge/ui/web/js/extjs/ext-extensions-debug.js
+++ b/deluge/ui/web/js/extjs/ext-extensions-debug.js
@@ -83,7 +83,7 @@ Ext.ux.form.FileUploadField = Ext.extend(Ext.form.TextField, {
this.bindListeners();
this.resizeEl = this.positionEl = this.wrap;
},
-
+
bindListeners: function(){
this.fileInput.on({
scope: this,
@@ -102,11 +102,11 @@ Ext.ux.form.FileUploadField = Ext.extend(Ext.form.TextField, {
change: function(){
var v = this.fileInput.dom.value;
this.setValue(v);
- this.fireEvent('fileselected', this, v);
+ this.fireEvent('fileselected', this, v);
}
- });
+ });
},
-
+
createFileInput : function() {
this.fileInput = this.wrap.createChild({
id: this.getFileInputId(),
@@ -117,7 +117,7 @@ Ext.ux.form.FileUploadField = Ext.extend(Ext.form.TextField, {
size: 1
});
},
-
+
reset : function(){
if (this.rendered) {
this.fileInput.remove();
@@ -149,18 +149,18 @@ Ext.ux.form.FileUploadField = Ext.extend(Ext.form.TextField, {
Ext.ux.form.FileUploadField.superclass.onDestroy.call(this);
Ext.destroy(this.fileInput, this.button, this.wrap);
},
-
+
onDisable: function(){
Ext.ux.form.FileUploadField.superclass.onDisable.call(this);
this.doDisable(true);
},
-
+
onEnable: function(){
Ext.ux.form.FileUploadField.superclass.onEnable.call(this);
this.doDisable(false);
},
-
+
// private
doDisable: function(disabled){
this.fileInput.dom.disabled = disabled;
@@ -184,7 +184,7 @@ Ext.reg('fileuploadfield', Ext.ux.form.FileUploadField);
Ext.form.FileUploadField = Ext.ux.form.FileUploadField;
/*!
* Ext.ux.form.RadioGroup.js
- *
+ *
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
@@ -294,7 +294,7 @@ Ext.reg('spinnerfield', Ext.ux.form.SpinnerField);
Ext.form.SpinnerField = Ext.ux.form.SpinnerField;
/*!
* Ext.ux.form.SpinnerField.js
- *
+ *
* Copyright (c) Damien Churchill 2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
@@ -506,7 +506,7 @@ Ext.ux.form.SpinnerGroup = Ext.extend(Ext.form.CheckboxGroup, {
Ext.reg('spinnergroup', Ext.ux.form.SpinnerGroup);
/*!
* Ext.ux.form.ToggleField.js
- *
+ *
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
@@ -823,7 +823,7 @@ Ext.ux.grid.BufferView = Ext.extend(Ext.grid.GridView, {
});
/*!
* Ext.ux.layout.FormLayoutFix.js
- *
+ *
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
@@ -857,7 +857,7 @@ Ext.override(Ext.layout.FormLayout, {
});
/*!
* Ext.ux.tree.MultiSelectionModelFix.js
- *
+ *
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
@@ -870,7 +870,7 @@ Ext.override(Ext.layout.FormLayout, {
* @author Damien Churchill <damoxc@gmail.com>
*/
Ext.override(Ext.tree.MultiSelectionModel, {
-
+
onNodeClick: function (node, e) {
if (e.ctrlKey && this.isSelected(node)) {
this.unselect(node);
@@ -909,11 +909,11 @@ Ext.override(Ext.tree.MultiSelectionModel, {
select: function(node, e, keepExisting, suppressEvent) {
if(keepExisting !== true){
this.clearSelections(true);
- }
+ }
if(this.isSelected(node)){
this.lastSelNode = node;
return node;
- }
+ }
this.selNodes.push(node);
this.selMap[node.id] = node;
this.lastSelNode = node;
@@ -1382,18 +1382,18 @@ Ext.tree.ColumnResizer = Ext.extend(Ext.util.Observable, {
var hw = 5,
x = e.getPageX(),
hd = e.getTarget('.x-treegrid-hd', 3, true);
-
- if(hd){
+
+ if(hd){
var r = hd.getRegion(),
ss = hd.dom.style,
pn = hd.dom.parentNode;
-
+
if(x - r.left <= hw && hd.dom !== pn.firstChild) {
var ps = hd.dom.previousSibling;
while(ps && Ext.fly(ps).hasClass('x-treegrid-hd-hidden')) {
ps = ps.previousSibling;
}
- if(ps) {
+ if(ps) {
this.activeHd = Ext.get(ps);
ss.cursor = Ext.isWebKit ? 'e-resize' : 'col-resize';
}
@@ -1404,7 +1404,7 @@ Ext.tree.ColumnResizer = Ext.extend(Ext.util.Observable, {
}
if(ns) {
this.activeHd = Ext.get(ns);
- ss.cursor = Ext.isWebKit ? 'w-resize' : 'col-resize';
+ ss.cursor = Ext.isWebKit ? 'w-resize' : 'col-resize';
}
} else{
delete this.activeHd;
@@ -1444,13 +1444,13 @@ Ext.tree.ColumnResizer = Ext.extend(Ext.util.Observable, {
var nw = this.proxy.getWidth(),
tree = this.tree,
disabled = this.dragHeadersDisabled;
-
+
this.proxy.remove();
delete this.dragHd;
-
+
tree.columns[this.hdIndex].width = nw;
tree.updateColumnWidths();
-
+
setTimeout(function(){
tree.headersDisabled = disabled;
}, 100);
@@ -1619,7 +1619,7 @@ Ext.ux.tree.TreeGridRootNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
expand : Ext.emptyFn
});/*!
* Ext.ux.tree.TreeGridNodeUIFix.js
- *
+ *
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
@@ -1631,7 +1631,7 @@ Ext.override(Ext.ux.tree.TreeGridNodeUI, {
updateColumns: function() {
if (!this.rendered) return;
-
+
var a = this.node.attributes,
t = this.node.getOwnerTree(),
cols = t.columns,
@@ -1649,7 +1649,7 @@ Ext.override(Ext.ux.tree.TreeGridNodeUI, {
});
Ext.tree.RenderColumn = Ext.extend(Ext.tree.Column, {
-
+
constructor: function(c) {
c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':this.format}');
c.tpl.format = c.renderer;
diff --git a/deluge/ui/web/js/extjs/ext-extensions/form/RadioGroupFix.js b/deluge/ui/web/js/extjs/ext-extensions/form/RadioGroupFix.js
index 7ddfab80f..8d557be4e 100644
--- a/deluge/ui/web/js/extjs/ext-extensions/form/RadioGroupFix.js
+++ b/deluge/ui/web/js/extjs/ext-extensions/form/RadioGroupFix.js
@@ -1,6 +1,6 @@
/*!
* Ext.ux.form.RadioGroup.js
- *
+ *
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
diff --git a/deluge/ui/web/js/extjs/ext-extensions/form/SpinnerFieldFix.js b/deluge/ui/web/js/extjs/ext-extensions/form/SpinnerFieldFix.js
index c4ee7e75f..433dfc755 100644
--- a/deluge/ui/web/js/extjs/ext-extensions/form/SpinnerFieldFix.js
+++ b/deluge/ui/web/js/extjs/ext-extensions/form/SpinnerFieldFix.js
@@ -1,6 +1,6 @@
/*!
* Ext.ux.form.SpinnerField.js
- *
+ *
* Copyright (c) Damien Churchill 2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
diff --git a/deluge/ui/web/js/extjs/ext-extensions/form/ToggleField.js b/deluge/ui/web/js/extjs/ext-extensions/form/ToggleField.js
index 5b40482e3..3ff70a4c9 100644
--- a/deluge/ui/web/js/extjs/ext-extensions/form/ToggleField.js
+++ b/deluge/ui/web/js/extjs/ext-extensions/form/ToggleField.js
@@ -1,6 +1,6 @@
/*!
* Ext.ux.form.ToggleField.js
- *
+ *
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
diff --git a/deluge/ui/web/js/extjs/ext-extensions/layout/FormLayoutFix.js b/deluge/ui/web/js/extjs/ext-extensions/layout/FormLayoutFix.js
index 9a03d10a1..24905cdaa 100644
--- a/deluge/ui/web/js/extjs/ext-extensions/layout/FormLayoutFix.js
+++ b/deluge/ui/web/js/extjs/ext-extensions/layout/FormLayoutFix.js
@@ -1,6 +1,6 @@
/*!
* Ext.ux.layout.FormLayoutFix.js
- *
+ *
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
diff --git a/deluge/ui/web/js/extjs/ext-extensions/tree/MultiSelectionModelFix.js b/deluge/ui/web/js/extjs/ext-extensions/tree/MultiSelectionModelFix.js
index 8046e64ee..96e4cd870 100644
--- a/deluge/ui/web/js/extjs/ext-extensions/tree/MultiSelectionModelFix.js
+++ b/deluge/ui/web/js/extjs/ext-extensions/tree/MultiSelectionModelFix.js
@@ -1,6 +1,6 @@
/*!
* Ext.ux.tree.MultiSelectionModelFix.js
- *
+ *
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
diff --git a/deluge/ui/web/js/extjs/ext-extensions/tree/TreeGridNodeUIFix.js b/deluge/ui/web/js/extjs/ext-extensions/tree/TreeGridNodeUIFix.js
index 41966795d..fb11732f2 100644
--- a/deluge/ui/web/js/extjs/ext-extensions/tree/TreeGridNodeUIFix.js
+++ b/deluge/ui/web/js/extjs/ext-extensions/tree/TreeGridNodeUIFix.js
@@ -1,6 +1,6 @@
/*!
* Ext.ux.tree.TreeGridNodeUIFix.js
- *
+ *
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
diff --git a/docs/source/core/rpc.rst b/docs/source/core/rpc.rst
index 90f553d0f..817e01571 100644
--- a/docs/source/core/rpc.rst
+++ b/docs/source/core/rpc.rst
@@ -5,9 +5,9 @@ Message Formats
---------------
DelugeRPC is a protocol used for daemon/client communication. There are four
types of messages involved in the protocol: RPC Request, RPC Response,
-RPC Error and Event. All messages are zlib compressed rencoded strings and
+RPC Error and Event. All messages are zlib compressed rencoded strings and
their data formats are detailed below.
-
+
"""""""""""
RPC Request
"""""""""""
@@ -28,7 +28,7 @@ remote method be called. Multiple requests can be bundled in a list.
call other objects or plugins methods.
**args** (list)
- The arguments to call the method with.
+ The arguments to call the method with.
**kwargs** (dict)
The keyword arguments to call the method with.
@@ -38,7 +38,7 @@ RPC Response
""""""""""""
This message is created and sent in response to a RPC Request from a client. It
will hold the return value of the requested method call. In the case of an
-error, a RPC Error message will be sent instead.
+error, a RPC Error message will be sent instead.
**[message_type, request_id, [return_value]]**
@@ -49,7 +49,7 @@ error, a RPC Error message will be sent instead.
**request_id** (int)
The request_id is the same as the one sent by the client in the initial
request. It used on the client side to determine what message this is in
- response to.
+ response to.
**return_value** (list)
The return value of the method call.
@@ -58,7 +58,7 @@ error, a RPC Error message will be sent instead.
RPC Error
"""""""""
This message is created in response to an error generated while processing a
-RPC Request and will serve as a replacement for a RPC Response message.
+RPC Request and will serve as a replacement for a RPC Response message.
**[message_type, request_id, exception_type, exception_msg, traceback]**
@@ -83,7 +83,7 @@ Event
"""""
This message is created by the daemon and sent to the clients without being in
response to a RPC Request. Events are generally sent for changes in the
-daemon's state that the clients need to be made aware of.
+daemon's state that the clients need to be made aware of.
**[message_type, event_name, data]**
diff --git a/docs/source/interfaces/web.rst b/docs/source/interfaces/web.rst
index 82cb3af2e..77e73195f 100644
--- a/docs/source/interfaces/web.rst
+++ b/docs/source/interfaces/web.rst
@@ -9,11 +9,11 @@ the ExtJS framework, running on top of a Twisted webserver.
SSL Configuration
=================
By default the web interface will use the same private key and certificate as
-the Deluge daemon. If you wish to use a different certificate/key (see
+the Deluge daemon. If you wish to use a different certificate/key (see
`How to Create a SSL Certificate <http://www.yatblog.com/2007/02/27/how-to-create-a-ssl-certificate/>`_
for information on creating one) you are able to specify which you want to use.
There are 2 ways to enable SSL encryption in the webserver, 1 is to specify it
in your configuration (accessible via the Preferences window). The other is to
add '--ssl' when running the webserver, which will override the configuration
-value and enable SSL.
+value and enable SSL.
diff --git a/packaging/osx/gtkrc b/packaging/osx/gtkrc
index c9b0a50b3..a77430b68 100644
--- a/packaging/osx/gtkrc
+++ b/packaging/osx/gtkrc
@@ -7,4 +7,4 @@ style "user-font"
{
font_name="Arial Unicode MS"
}
-widget_class "*" style "user-font"
+widget_class "*" style "user-font"