add tooltips to the statusbar items

add disk free space to the statusbar
This commit is contained in:
Damien Churchill 2009-12-10 00:06:34 +00:00
parent 0d3f364aac
commit 1ba3955025
6 changed files with 28 additions and 6 deletions

View File

@ -43,6 +43,7 @@ input {
.x-deluge-connections, .x-btn .x-deluge-connections { background-image: url('/icons/connections.png') }
.x-deluge-traffic, .x-btn .x-deluge-traffic { background-image: url('/icons/traffic.png') }
.x-deluge-edit-trackers, .x-btn .x-deluge-edit-trackers {background-image: url('/icons/edit_trackers.png'); }
.x-deluge-freespace, .x-btn .x-deluge-freespace {background-image: url('/icons/drive.png'); }
/* Torrent Details */

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

View File

@ -22,29 +22,40 @@
text: ' ',
cls: 'x-btn-text-icon',
iconCls: 'x-deluge-connections',
tooltip: _('Connections'),
menu: Deluge.Menus.Connections
}, '-', {
id: 'statusbar-downspeed',
text: ' ',
cls: 'x-btn-text-icon',
iconCls: 'x-deluge-downloading',
tooltip: _('Download Speed'),
menu: Deluge.Menus.Download
}, '-', {
id: 'statusbar-upspeed',
text: ' ',
cls: 'x-btn-text-icon',
iconCls: 'x-deluge-seeding',
tooltip: _('Upload Speed'),
menu: Deluge.Menus.Upload
}, '-', {
id: 'statusbar-traffic',
text: ' ',
cls: 'x-btn-text-icon',
iconCls: 'x-deluge-traffic'
iconCls: 'x-deluge-traffic',
tooltip: _('Protocol Traffic Download/Upload')
}, '-', {
id: 'statusbar-dht',
text: ' ',
cls: 'x-btn-text-icon',
iconCls: 'x-deluge-dht'
iconCls: 'x-deluge-dht',
tooltip: _('DHT Nodes')
}, '-', {
id: 'statusbar-freespace',
text: ' ',
cls: 'x-btn-text-icon',
iconCls: 'x-deluge-freespace',
tooltip: _('Freespace in download location')
});
this.created = true;
},
@ -131,6 +142,7 @@
});
this.items.get('statusbar-dht').setText(stats.dht_nodes);
this.items.get('statusbar-freespace').setText(fsize(stats.free_space));
Deluge.Menus.Connections.setValue(stats.max_num_connections);
Deluge.Menus.Download.setValue(stats.max_download);
@ -138,4 +150,4 @@
}
});
Deluge.Statusbar = new Ext.deluge.Statusbar();
})();
})();

View File

@ -76,6 +76,9 @@ Deluge.UI = {
plugin = Deluge.Plugins[plugin];
plugin.enable();
}
// Initialize quicktips so all the tooltip configs start working.
Ext.QuickTips.init();
Deluge.Client.on('connected', function(e) {
Deluge.Login.show();

File diff suppressed because one or more lines are too long

View File

@ -489,6 +489,9 @@ class WebApi(JSONComponent):
def got_health(health):
ui_info["stats"]["has_incoming_connections"] = health
def got_free_space(free_space):
ui_info["stats"]["free_space"] = free_space
def got_torrents(torrents):
ui_info["torrents"] = torrents
@ -518,7 +521,10 @@ class WebApi(JSONComponent):
d6 = client.core.get_health()
d6.addCallback(got_health)
dl = DeferredList([d1, d2, d3, d4, d5, d6], consumeErrors=True)
d7 = client.core.get_free_space(self.core_config.get("download_location"))
d7.addCallback(got_free_space)
dl = DeferredList([d1, d2, d3, d4, d5, d6, d7], consumeErrors=True)
dl.addCallback(on_complete)
return d
@ -848,4 +854,4 @@ class WebApi(JSONComponent):
"""
Retrieve the pending events for the session.
"""
return self.event_queue.get_events(__request__.session_id)
return self.event_queue.get_events(__request__.session_id)