[gnome-music/wip/jfelder/smoothscale-player: 5/6] smoothscale: Use GObject property syntax
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/smoothscale-player: 5/6] smoothscale: Use GObject property syntax
- Date: Tue, 9 Oct 2018 22:23:34 +0000 (UTC)
commit d0cbbe516821bdf3412c488463fada9ab1377826
Author: Jean Felder <jfelder src gnome org>
Date: Thu Sep 27 08:56:33 2018 +0200
smoothscale: Use GObject property syntax
gnomemusic/widgets/smoothscale.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/widgets/smoothscale.py b/gnomemusic/widgets/smoothscale.py
index 628aac21..847d3ea5 100644
--- a/gnomemusic/widgets/smoothscale.py
+++ b/gnomemusic/widgets/smoothscale.py
@@ -96,15 +96,15 @@ class SmoothScale(Gtk.Scale):
@log
def _on_state_change(self, klass, arguments):
- state = self._player.state
+ state = self._player.props.state
self._previous_state = state
if state == Playback.STOPPED:
self.set_value(0)
- self.set_sensitive(False)
+ self.props.sensitive = False
else:
- self.set_sensitive(True)
+ self.props.sensitive = True
if state == Playback.PLAYING:
self._update_timeout()
@@ -125,7 +125,7 @@ class SmoothScale(Gtk.Scale):
def _on_smooth_scale_seek_finish(self, value):
"""Prevent stutters when seeking with infinitesimal amounts"""
self._seek_timeout = None
- round_digits = self.get_property('round-digits')
+ round_digits = self.props.round_digits
if self._old_smooth_scale_value != round(value, round_digits):
self._on_smooth_scale_change_value(self)
self._old_smooth_scale_value = round(value, round_digits)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]