download tab status caption
git-svn-id: svn://svn.berlios.de/gpodder/trunk@361 b0d088ad-0a06-0410-aad2-9ed5178a7e87
This commit is contained in:
parent
7ce3115618
commit
d3b5a05bfe
|
@ -1,3 +1,10 @@
|
|||
Tue, 24 Jul 2007 20:40:35 +0200 <thp@perli.net>
|
||||
* src/gpodder/libwget.py: Add count() function to downloadStatusManager
|
||||
* src/gpodder/gpodder.py: New download_status_updated callback
|
||||
function that updates the caption for the downloads tab to include
|
||||
the number of files currently being downloaded (i.e. "Downloads (2)")
|
||||
* data/gpodder.glade: Update label for downloads tab for above changes
|
||||
|
||||
Sun, 22 Jul 2007 23:39:50 +0200 <thp@perli.net>
|
||||
* src/gpodder/libipodsync.py: Apply patch from Nick (nikosapi)
|
||||
to fix an issue with the wrong python-id3 library being used
|
||||
|
|
|
@ -1146,9 +1146,9 @@
|
|||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label12">
|
||||
<widget class="GtkLabel" id="labelDownloads">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Download Status</property>
|
||||
<property name="label" translatable="yes">Downloads</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
|
|
|
@ -203,7 +203,7 @@ class Gpodder(SimpleGladeApp):
|
|||
for itemcolumn in ( episodecolumn, speedcolumn, progresscolumn ):
|
||||
self.treeDownloads.append_column( itemcolumn)
|
||||
|
||||
self.download_status_manager = downloadStatusManager( main_window = self.gPodder, change_notification = self.updateComboBox)
|
||||
self.download_status_manager = downloadStatusManager( main_window = self.gPodder, change_notification = self.download_status_updated)
|
||||
self.treeDownloads.set_model( self.download_status_manager.getModel())
|
||||
|
||||
# tooltips :)
|
||||
|
@ -308,6 +308,15 @@ class Gpodder(SimpleGladeApp):
|
|||
if gl.device_type != 'none':
|
||||
self.toolTransfer.set_sensitive( True)
|
||||
|
||||
def download_status_updated( self):
|
||||
count = self.download_status_manager.count()
|
||||
if count:
|
||||
self.labelDownloads.set_text( _('Downloads (%d)') % count)
|
||||
else:
|
||||
self.labelDownloads.set_text( _('Downloads'))
|
||||
|
||||
self.updateComboBox()
|
||||
|
||||
def updateComboBox( self):
|
||||
try:
|
||||
old_active = self.comboAvailable.get_active()
|
||||
|
|
|
@ -252,6 +252,9 @@ class downloadStatusManager( object):
|
|||
if self.change_notification:
|
||||
gobject.idle_add( self.change_notification)
|
||||
|
||||
def count( self):
|
||||
return len(self.status_list)
|
||||
|
||||
def updateInfo( self, id, new_status = { 'episode':"unknown", 'speed':"0b/s", 'progress':0, 'url':"unknown" }):
|
||||
if not id in self.status_list:
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue