enable the disabled toolbar buttons once the ui connects
This commit is contained in:
parent
1ff29a134c
commit
cc272d8dc0
|
@ -65,6 +65,18 @@ Deluge.ToolBar = new Ext.Toolbar({
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Deluge.ToolBar.connected = function() {
|
||||||
|
Deluge.ToolBar.items.each(function(bn) {
|
||||||
|
bn.enable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Deluge.ToolBar.disconnected = function() {
|
||||||
|
Deluge.ToolBar.items.each(function(bn) {
|
||||||
|
bn.disable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function torrentAction(item) {
|
function torrentAction(item) {
|
||||||
var selection = Deluge.Torrents.getSelectionModel().getSelections();
|
var selection = Deluge.Torrents.getSelectionModel().getSelections();
|
||||||
var ids = new Array();
|
var ids = new Array();
|
||||||
|
|
|
@ -14,7 +14,7 @@ Deluge.Connections = {
|
||||||
Deluge.Client = new JSON.RPC('/json', {
|
Deluge.Client = new JSON.RPC('/json', {
|
||||||
methods: methods
|
methods: methods
|
||||||
});
|
});
|
||||||
Deluge.Ui.run();
|
Deluge.Ui.connected();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -149,13 +149,14 @@ Deluge.Ui = {
|
||||||
information.
|
information.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
Deluge.UI.run();
|
Deluge.UI.connected();
|
||||||
*/
|
*/
|
||||||
run: function() {
|
connected: function() {
|
||||||
if (!this.running) {
|
if (!this.running) {
|
||||||
this.running = this.update.periodical(2000, this);
|
this.running = this.update.periodical(2000, this);
|
||||||
this.update();
|
this.update();
|
||||||
}
|
}
|
||||||
|
Deluge.ToolBar.connected();
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue