Module: deluge
Branch: master
Commit: 5e1f6a873882ae38b980367397115b41750a132e

Author: Damien Churchill <[email protected]>
Date:   Wed Apr 28 15:51:47 2010 +0100

switch the gridpanel to a listview

---

 deluge/plugins/execute/execute/data/execute.js |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/deluge/plugins/execute/execute/data/execute.js 
b/deluge/plugins/execute/execute/data/execute.js
index 41cc2f7..c31d7bd 100644
--- a/deluge/plugins/execute/execute/data/execute.js
+++ b/deluge/plugins/execute/execute/data/execute.js
@@ -44,9 +44,7 @@ Deluge.ux.preferences.ExecutePage = Ext.extend(Ext.Panel, {
            
        initComponent: function() {
            
Deluge.ux.preferences.ExecutePage.superclass.initComponent.call(this);
-           this.commands = this.add({
-                       xtype: 'grid',
-                       region: 'center',
+               this.list = new Ext.list.ListView({
                        store: new Ext.data.SimpleStore({
                                fields: [
                                        {name: 'event', mapping: 1},
@@ -55,24 +53,24 @@ Deluge.ux.preferences.ExecutePage = Ext.extend(Ext.Panel, {
                                id: 0
                        }),
                        columns: [{
-                               width: 70,
+                               width: .3,
                                header: _('Event'),
                                sortable: true,
-                               renderer: fplain,
                                dataIndex: 'event'
                        }, {
                                id: 'name',
                                header: _('Command'),
                                sortable: true,
-                               renderer: fplain,
                                dataIndex: 'name'
                        }],
-                       stripRows: true,
-                       selModel: new Ext.grid.RowSelectionModel({
-                               singleSelect: true
-                       }),
+                       singleSelect: true,
                        autoExpandColumn: 'name'
-           });
+               });
+
+               this.panel = this.add({
+                       region: 'center',
+                       items: [this.list]
+               });
                
            this.details = this.add({
                        xtype: 'tabpanel',
@@ -92,7 +90,7 @@ Deluge.ux.preferences.ExecutePage = Ext.extend(Ext.Panel, {
            Deluge.ux.preferences.ExecutePage.superclass.onShow.call(this);
            deluge.client.execute.get_commands({
                        success: function(commands) {
-                               this.commands.getStore().loadData(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