[gnome-music/wip/jfelder/smoothscale-player: 4/5] smoothscale: Use GObject property syntax



commit 609749455e908cd51f1b5f25298e4ded78495bf8
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 615ead85..ddddff14 100644
--- a/gnomemusic/widgets/smoothscale.py
+++ b/gnomemusic/widgets/smoothscale.py
@@ -89,16 +89,16 @@ 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
                 or state == Playback.LOADING):
             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()
@@ -119,7 +119,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]