fix wrong method being called for menu clicks

This commit is contained in:
Damien Churchill 2008-09-26 18:02:54 +00:00
parent eea926fadf
commit fd544834e4
1 changed files with 8 additions and 9 deletions

View File

@ -76,7 +76,7 @@ Deluge.UI = {
var menu = new Widgets.PopupMenu() var menu = new Widgets.PopupMenu()
menu.add(Deluge.Menus.Torrents); menu.add(Deluge.Menus.Torrents);
menu.addEvent('action', function(e) { menu.addEvent('action', function(e) {
this.torrent_action(e.action, e.value) this.torrentAction(e.action, e.value)
}.bind(this)) }.bind(this))
this.grid.addEvent('row_menu', function(e) { this.grid.addEvent('row_menu', function(e) {
@ -88,10 +88,11 @@ Deluge.UI = {
}.bindWithEvent(this)) }.bindWithEvent(this))
this.grid.addEvent('selectedchanged', function(e) { this.grid.addEvent('selectedchanged', function(e) {
if ($chk(this.grid.selectedRow)) if ($chk(this.grid.selectedRow)) {
this.details.update(this.grid.selectedRow.id); this.details.update(this.grid.selectedRow.id);
else } else {
this.details.update(null); this.details.update(null);
}
}.bindWithEvent(this)) }.bindWithEvent(this))
}, },
@ -151,12 +152,12 @@ Deluge.UI = {
this.grid.updateTorrents(this.torrents); this.grid.updateTorrents(this.torrents);
this.statusbar.update(this.stats); this.statusbar.update(this.stats);
if ($chk(this.grid.selectedRow)) if ($chk(this.grid.selectedRow)) {
this.details.update(this.grid.selectedRow.id); this.details.update(this.grid.selectedRow.id);
else } else {
this.details.update(null); this.details.update(null);
}
this.labels.update(this.filters) this.labels.update(this.filters);
}, },
filePriorities: function(event) { filePriorities: function(event) {
@ -269,8 +270,6 @@ Deluge.UI = {
} }
}; };
window.addEvent('domready', function(e) { window.addEvent('domready', function(e) {
Deluge.UI.initialize(); Deluge.UI.initialize();
Deluge.UI.run(); Deluge.UI.run();