improve the statusbar, default to "Not Connected" with an icon
This commit is contained in:
parent
b9d84be341
commit
faae99d3d8
|
@ -67,4 +67,15 @@ html, body {
|
|||
|
||||
.deluge-status dd.torrent_name, .deluge-status dd.tracker, .deluge-status dd.path {
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
|
||||
/* Statusbar */
|
||||
#deluge-statusbar .x-not-connected {
|
||||
background: url('/icons/16/error.png') no-repeat 2px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
#deluge-statusbar .x-connected {
|
||||
background: transparent;
|
||||
}
|
|
@ -15,6 +15,7 @@ Licensed under the Creative Common Attribution-ShareAlike 3.0 License.
|
|||
- connection_manager.png
|
||||
- create.png
|
||||
- down.png
|
||||
- error.png
|
||||
- go-bottom.png
|
||||
- go-top.png
|
||||
- help.png
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 886 B |
|
@ -177,7 +177,31 @@ Deluge.SideBar = {
|
|||
margins: '5 0 0 5'
|
||||
};
|
||||
|
||||
Deluge.StatusBar = new Ext.StatusBar({
|
||||
Deluge.StatusBar = {
|
||||
onRender: function() {
|
||||
this.bound = {
|
||||
onConnect: this.onConnect.bindWithEvent(this)
|
||||
}
|
||||
Deluge.Events.on('connect', this.bound.onConnect);
|
||||
Deluge.Events.on('disconnect', this.bound.onDisconnect);
|
||||
},
|
||||
|
||||
onConnect: function() {
|
||||
this.Bar.setStatus({
|
||||
iconCls: 'x-connected',
|
||||
text: ''
|
||||
});
|
||||
},
|
||||
|
||||
onDisconnect: function() {
|
||||
this.Bar.clearStatus({useDefaults:true});
|
||||
}
|
||||
}
|
||||
|
||||
Deluge.StatusBar.Bar = new Ext.StatusBar({
|
||||
id: 'deluge-statusbar',
|
||||
defaultIconCls: 'x-not-connected',
|
||||
defaultText: _('Not Connected'),
|
||||
/*items: [{
|
||||
id: 'statusbar-connections',
|
||||
text: '200 (200)',
|
||||
|
@ -207,4 +231,5 @@ Deluge.StatusBar = new Ext.StatusBar({
|
|||
cls: 'x-btn-text-icon',
|
||||
icon: '/icons/16/dht.png'
|
||||
}]*/
|
||||
listeners: {'render': {scope: Deluge.StatusBar, fn: Deluge.StatusBar.onRender}}
|
||||
});
|
|
@ -8,7 +8,7 @@ Deluge.Ui = {
|
|||
layout: 'border',
|
||||
tbar: Deluge.ToolBar.Bar,
|
||||
items: [Deluge.SideBar, Deluge.Details.Panel, Deluge.Torrents],
|
||||
bbar: Deluge.StatusBar
|
||||
bbar: Deluge.StatusBar.Bar
|
||||
});
|
||||
|
||||
this.Viewport = new Ext.Viewport({
|
||||
|
|
Loading…
Reference in New Issue