Module: deluge
Branch: master
Commit: 8b23af062abd42d60ee3ea3cb8a40cf9266df493

Author: Damien Churchill <[email protected]>
Date:   Mon Apr 26 01:33:47 2010 +0100

add the layout for the maximum tab

---

 deluge/plugins/label/label/data/label.js |   45 ++++++++++++++++++++++++++---
 1 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/deluge/plugins/label/label/data/label.js 
b/deluge/plugins/label/label/data/label.js
index 9132ba0..6d07968 100644
--- a/deluge/plugins/label/label/data/label.js
+++ b/deluge/plugins/label/label/data/label.js
@@ -105,19 +105,53 @@ Deluge.ux.LabelOptionsWindow = Ext.extend(Ext.Window, {
 
        title: _('Label Options'),
        width:  350,
-       height: 400,
+       height: 300,
        
        initComponent: function() {
                
Deluge.ux.LabelOptionsWindow.superclass.initComponent.call(this);
                this.addButton(_('Cancel'), this.onCancelClick, this);
                this.addButton(_('Ok'), this.onOkClick, this);
 
-               this.add({
+               this.form = this.add({
+                       xtype: 'form'
+               });
+
+               this.tabs = this.form.add({
                        xtype: 'tabpanel',
-                       height: 335,
+                       height: 235,
                        border: false,
                        items: [{
-                               title: _('Maximum')
+                               title: _('Maximum'),
+                               items: [{
+                                       border: false,
+                                       items: [{
+                                               xtype: 'fieldset',
+                                               border: false,
+                                               labelWidth: 1,
+                                               items: [{
+                                                       xtype: 'checkbox',
+                                                       fieldLabel: '',
+                                                       boxLabel: _('Apply per 
torrent max settings:')
+                                               }]
+                                       }, {
+                                               xtype: 'fieldset',
+                                               border: false,
+                                               defaultType: 'spinnerfield',
+                                               items: [{
+                                                       fieldLabel: _('Download 
Speed'),
+                                                       name: 'down_speed'
+                                               }, {
+                                                       fieldLabel: _('Upload 
Speed'),
+                                                       name: 'up_speed'
+                                               }, {
+                                                       fieldLabel: _('Upload 
Slots'),
+                                                       name: 'upload_slots'
+                                               }, {
+                                                       fieldLabel: 
_('Connections'),
+                                                       name: 'connections'
+                                               }]
+                                       }]
+                               }]
                        }, {
                                title: _('Queue')
                        }, {
@@ -132,6 +166,7 @@ Deluge.ux.LabelOptionsWindow = Ext.extend(Ext.Window, {
                Deluge.ux.LabelOptionsWindow.superclass.show.call(this);
                this.label = label;
                this.setTitle(_('Label Options') + ': ' + this.label); 
+               this.tabs.setActiveTab(0);
        },
 
        onCancelClick: function() {
@@ -286,7 +321,7 @@ Deluge.plugins.LabelPlugin = Ext.extend(Deluge.Plugin, {
 
        onLabelOptionsClick: function() {
                if (!this.labelOpts) this.labelOpts = new 
Deluge.ux.LabelOptionsWindow();
-               this.labelOpts.show(this.filter.getFilter());
+               this.labelOpts.show(this.filter.getState());
        },
 
        onLabelRemoveClick: function() {

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to