Module: deluge
Branch: master
Commit: 68f0e9ddc7de9180af60c87344d05513a9d4d401

Author: Damien Churchill <[email protected]>
Date:   Wed Apr 28 16:09:53 2010 +0100

renderer the event column correctly and remove the bottom panel

---

 deluge/plugins/execute/execute/data/execute.js |   35 +++++++++++-------------
 1 files changed, 16 insertions(+), 19 deletions(-)

diff --git a/deluge/plugins/execute/execute/data/execute.js 
b/deluge/plugins/execute/execute/data/execute.js
index c31d7bd..7ca9899 100644
--- a/deluge/plugins/execute/execute/data/execute.js
+++ b/deluge/plugins/execute/execute/data/execute.js
@@ -39,11 +39,16 @@ Ext.ns('Deluge.ux.preferences');
 Deluge.ux.preferences.ExecutePage = Ext.extend(Ext.Panel, {
 
        title: _('Execute'),
-       layout: 'border',
+       layout: 'fit',
        border: false,
            
        initComponent: function() {
            
Deluge.ux.preferences.ExecutePage.superclass.initComponent.call(this);
+               var event_map = this.event_map = {
+                       'complete': _('Torrent Complete'),
+                       'added': _('Torrent Added')
+               }
+
                this.list = new Ext.list.ListView({
                        store: new Ext.data.SimpleStore({
                                fields: [
@@ -56,7 +61,12 @@ Deluge.ux.preferences.ExecutePage = Ext.extend(Ext.Panel, {
                                width: .3,
                                header: _('Event'),
                                sortable: true,
-                               dataIndex: 'event'
+                               dataIndex: 'event',
+                               tpl: new 
Ext.XTemplate('{[this.getEvent(values.event)]}', {
+                                       getEvent: function(e) {
+                                               return (event_map[e]) ? 
event_map[e] : e;
+                                       }
+                               })
                        }, {
                                id: 'name',
                                header: _('Command'),
@@ -68,32 +78,19 @@ Deluge.ux.preferences.ExecutePage = Ext.extend(Ext.Panel, {
                });
 
                this.panel = this.add({
-                       region: 'center',
                        items: [this.list]
                });
                
-           this.details = this.add({
-                       xtype: 'tabpanel',
-                       region: 'south',
-                       activeTab: 0
-           });
-           
-           this.add = this.details.add({
-                       title: _('Add')
-           });
-           this.edit = this.details.add({
-                       title: _('Edit')
-           });
+               deluge.preferences.on('show', this.onPreferencesShow, this);
        },
-       
-       onShow: function() {
-           Deluge.ux.preferences.ExecutePage.superclass.onShow.call(this);
+
+       onPreferencesShow: function() {
            deluge.client.execute.get_commands({
                        success: function(commands) {
                                this.list.getStore().loadData(commands);
                        },
                        scope: this
-           });
+               });
        }
 });
 

-- 
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