[gnome-music/wip/jfelder/smoothscale-player: 13/14] 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: 13/14] smoothscale: Use GObject property syntax
- Date: Mon, 15 Oct 2018 23:31:42 +0000 (UTC)
commit 01aedf7242e76e754508344dfe408eba157619ee
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 7050a10a..7522ae0e 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]