From 507b539295f276a56e9b182daeace13d453ff0d1 Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Wed, 20 Oct 2010 08:24:54 -0400 Subject: [PATCH] Only seek when the user updates the progress bar. --- ocarina/pbar.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ocarina/pbar.py b/ocarina/pbar.py index 86db9162..2486c892 100644 --- a/ocarina/pbar.py +++ b/ocarina/pbar.py @@ -24,7 +24,7 @@ class PBar(gtk.HScale): self.set_draw_value(False) self.set_range(0, 101) self.set_update_policy(gtk.UPDATE_DISCONTINUOUS) - self.connect("value-changed", self.value_changed) + self.connect("change-value", self.change_value) gobject.timeout_add(500, self.update) self.show() @@ -33,7 +33,6 @@ class PBar(gtk.HScale): self.set_value(update() * 100) return True - def value_changed(self, scale): + def change_value(self, scale, type, value): global seek - value = scale.get_value() seek(value / 100.0)