[gnome-music/wip/jfelder/smoothscale-player: 7/14] smoothScale: Do not start the player after a seek operation
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/smoothscale-player: 7/14] smoothScale: Do not start the player after a seek operation
- Date: Mon, 15 Oct 2018 23:31:12 +0000 (UTC)
commit a3d9dad2023ef57e1cd421f71b2a84c951807d02
Author: Jean Felder <jfelder src gnome org>
Date: Tue Oct 16 00:25:00 2018 +0200
smoothScale: Do not start the player after a seek operation
On some corner cases, for example holding the mouse on the SmoothScale
button, it can reset the song.
This implies a new behavior:
- if a song is already playing, it will resume at the new position
- if the player is paused, position will be updated, but the song will
not start
data/ui/PlayerToolbar.ui | 1 -
gnomemusic/widgets/playertoolbar.py | 5 -----
gnomemusic/widgets/smoothscale.py | 7 -------
3 files changed, 13 deletions(-)
---
diff --git a/data/ui/PlayerToolbar.ui b/data/ui/PlayerToolbar.ui
index 5f25c140..da2e9166 100644
--- a/data/ui/PlayerToolbar.ui
+++ b/data/ui/PlayerToolbar.ui
@@ -201,7 +201,6 @@
<property name="valign">center</property>
<property name="hexpand">True</property>
<property name="draw_value">False</property>
- <signal name = "seek-finished" handler="_on_seek_finished" swapped="no"/>
<signal name = "value-changed" handler="_on_progress_value_changed" swapped="no"/>
</object>
</child>
diff --git a/gnomemusic/widgets/playertoolbar.py b/gnomemusic/widgets/playertoolbar.py
index 5091dd13..ac893d2d 100644
--- a/gnomemusic/widgets/playertoolbar.py
+++ b/gnomemusic/widgets/playertoolbar.py
@@ -86,11 +86,6 @@ class PlayerToolbar(Gtk.ActionBar):
self._player.connect('notify::repeat-mode', self._sync_repeat_image)
self._player.connect('playback-status-changed', self._sync_playing)
- @Gtk.Template.Callback()
- @log
- def _on_seek_finished(self, klass, time):
- self._player.play()
-
@Gtk.Template.Callback()
@log
def _on_progress_value_changed(self, progress_scale):
diff --git a/gnomemusic/widgets/smoothscale.py b/gnomemusic/widgets/smoothscale.py
index e995540b..878947f0 100644
--- a/gnomemusic/widgets/smoothscale.py
+++ b/gnomemusic/widgets/smoothscale.py
@@ -41,12 +41,6 @@ class SmoothScale(Gtk.Scale):
"""
__gtype_name__ = 'SmoothScale'
- __gsignals__ = {
- 'seek-finished': (
- GObject.SignalFlags.RUN_FIRST, None, (float,)
- ),
- }
-
def __repr__(self):
return '<SmoothScale>'
@@ -131,7 +125,6 @@ class SmoothScale(Gtk.Scale):
self._on_smooth_scale_change_value(self)
self._old_smooth_scale_value = round(value, round_digits)
- self.emit('seek-finished', value)
return False
@log
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]