diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-01-28 17:54:53 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-01-28 17:54:53 (GMT) |
commit | 9f885cc32bf359a35c93ad07493fae8fe2d5ad73 (patch) | |
tree | 8717b12791eb1bc65220340b02c2b5c6dc0b7d36 /src/rhlibrary | |
parent | 5b6f68fef3348ba2ddb31f280128b60d632a8ce8 (diff) |
length vs. duration
Diffstat (limited to 'src/rhlibrary')
-rw-r--r-- | src/rhlibrary/player_widget.go | 6 | ||||
-rw-r--r-- | src/rhlibrary/vumeter_widget.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/rhlibrary/player_widget.go b/src/rhlibrary/player_widget.go index e2de85c..3059011 100644 --- a/src/rhlibrary/player_widget.go +++ b/src/rhlibrary/player_widget.go @@ -121,8 +121,8 @@ func addScrubber(grid *gtk.Grid, p *player.PlayerChan) (err error) { } }) - p.AddUpdateHandler(func(length time.Duration, pos time.Duration, meter player.Meter, userdata interface{}) bool { - glib.IdleAdd(func() { scale.SetValue(float64(pos) / float64(length)) }) + p.AddUpdateHandler(func(duration time.Duration, pos time.Duration, meter player.Meter, userdata interface{}) bool { + glib.IdleAdd(func() { scale.SetValue(float64(pos) / float64(duration)) }) return true }, nil) @@ -136,7 +136,7 @@ func addPlayTime(grid *gtk.Grid, p *player.PlayerChan) (err error) { return err } - p.AddUpdateHandler(func(length time.Duration, pos time.Duration, meter player.Meter, userdata interface{}) bool { + p.AddUpdateHandler(func(duration time.Duration, pos time.Duration, meter player.Meter, userdata interface{}) bool { glib.IdleAdd(func() { t := time.Unix(0, 0).UTC().Add(pos) label.SetText(t.Format("15:04:05.0")) diff --git a/src/rhlibrary/vumeter_widget.go b/src/rhlibrary/vumeter_widget.go index 3406dda..e83019e 100644 --- a/src/rhlibrary/vumeter_widget.go +++ b/src/rhlibrary/vumeter_widget.go @@ -190,7 +190,7 @@ func addVUMeterGrid(frame *gtk.Frame, p *player.PlayerChan) (err error) { return } - p.AddUpdateHandler(func(length time.Duration, pos time.Duration, meter player.Meter, userdata interface{}) bool { + p.AddUpdateHandler(func(duration time.Duration, pos time.Duration, meter player.Meter, userdata interface{}) bool { glib.IdleAdd(func() { updateVUMeterLevels(left, right, meter) }) return true }, nil) |