mirror of
https://github.com/SoongNoonien/mpdevil.git
synced 2023-08-10 21:12:44 +03:00
avoid double seek
This commit is contained in:
parent
a2e8ac875a
commit
1fd5a75567
@ -2788,11 +2788,13 @@ class SeekBar(Gtk.Box):
|
|||||||
self._scale.clear_marks()
|
self._scale.clear_marks()
|
||||||
|
|
||||||
def _on_scale_button_press_event(self, widget, event):
|
def _on_scale_button_press_event(self, widget, event):
|
||||||
self._update=False
|
if (event.button == 1 or event.button == 3) and event.type == Gdk.EventType.BUTTON_PRESS:
|
||||||
|
self._update=False
|
||||||
|
|
||||||
def _on_scale_button_release_event(self, widget, event):
|
def _on_scale_button_release_event(self, widget, event):
|
||||||
self._update=True
|
if event.button == 1 or event.button == 3:
|
||||||
self._client.seekcur(self._scale.get_value())
|
self._update=True
|
||||||
|
self._client.seekcur(self._scale.get_value())
|
||||||
|
|
||||||
def _on_change_value(self, scale, scroll, value):
|
def _on_change_value(self, scale, scroll, value):
|
||||||
if scroll in (Gtk.ScrollType.STEP_BACKWARD, Gtk.ScrollType.STEP_FORWARD , Gtk.ScrollType.PAGE_BACKWARD, Gtk.ScrollType.PAGE_FORWARD):
|
if scroll in (Gtk.ScrollType.STEP_BACKWARD, Gtk.ScrollType.STEP_FORWARD , Gtk.ScrollType.PAGE_BACKWARD, Gtk.ScrollType.PAGE_FORWARD):
|
||||||
|
Loading…
Reference in New Issue
Block a user