Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/jukeboxactivity.py
diff options
context:
space:
mode:
Diffstat (limited to 'jukeboxactivity.py')
-rw-r--r--jukeboxactivity.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/jukeboxactivity.py b/jukeboxactivity.py
index a16fbd1..952a998 100644
--- a/jukeboxactivity.py
+++ b/jukeboxactivity.py
@@ -124,11 +124,6 @@ class JukeboxActivity(activity.Activity):
self.control = Control(toolbar_box.toolbar, self)
- separator = gtk.SeparatorToolItem()
- separator.props.draw = False
- separator.set_expand(True)
- toolbar_box.toolbar.insert(separator, -1)
-
toolbar_box.toolbar.insert(StopButton(self), -1)
self.set_toolbar_box(toolbar_box)
@@ -597,6 +592,18 @@ class JukeboxActivity(activity.Activity):
value = self.p_position * 100.0 / self.p_duration
self.control.adjustment.set_value(value)
+ # Update the current time
+ seconds = self.p_position * 10 ** -9
+ time = '%2d:%02d' % (int(seconds / 60), int(seconds % 60))
+ self.control.current_time_label.set_text(time)
+
+ # FIXME: this should be updated just once when the file starts
+ # the first time
+ if self.p_duration != gst.CLOCK_TIME_NONE:
+ seconds = self.p_duration * 10 ** -9
+ time = '%2d:%02d' % (int(seconds / 60), int(seconds % 60))
+ self.control.total_time_label.set_text(time)
+
return True
def _erase_playlist_entry_clicked_cb(self, widget):