Author: damoxc

Revision: 5046

Log:
        make the close button close the window

Diff:
Modified: trunk/deluge/ui/web/js/deluge-preferences.js
===================================================================
--- trunk/deluge/ui/web/js/deluge-preferences.js        2009-04-08 20:28:39 UTC 
(rev 5045)
+++ trunk/deluge/ui/web/js/deluge-preferences.js        2009-04-08 20:35:35 UTC 
(rev 5046)
@@ -35,7 +35,9 @@
                this.resizable = false;
                this.title = _('Preferences');
                this.buttons = [{
-                       text: _('Close')
+                       text: _('Close'),
+                       handler: this.onCloseButtonClick,
+                       scope: this
                },{
                        text: _('Apply')
                },{
@@ -81,6 +83,10 @@
                        this.on('show', this.onShow.bindWithEvent(this));
                },
                
+               onCloseButtonClick: function() {
+                       this.hide();
+               },
+               
                addPage: function(name, page) {
                        var store = this.categoriesGrid.getStore();
                        store.loadData([[name]], true);
@@ -97,7 +103,9 @@
                },
                
                onShow: function() {
-
+                       if 
(!this.categoriesGrid.getSelectionModel().hasSelection()) {
+                               
this.categoriesGrid.getSelectionModel().selectFirstRow();
+                       }
                }
        });
        



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