[pitivi] ruler: LMB functionality consistent with the timeline
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] ruler: LMB functionality consistent with the timeline
- Date: Thu, 17 Dec 2015 10:04:43 +0000 (UTC)
commit 8b276c6cfed1457fef3e0a14a4ea523d1236902a
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Fri Nov 27 03:40:19 2015 +0100
ruler: LMB functionality consistent with the timeline
Basically disables the LMB when not leftClickAlsoSeeks.
It can be argued that this is not necessary, but we should be consistent
in the behavior of the ruler and timeline. Also, in the future we could
have LMB for selecting ranges or leaving markers on the ruler.
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D516
pitivi/timeline/ruler.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/ruler.py b/pitivi/timeline/ruler.py
index 14f4575..5e9e079 100644
--- a/pitivi/timeline/ruler.py
+++ b/pitivi/timeline/ruler.py
@@ -195,8 +195,10 @@ class ScaleRuler(Gtk.DrawingArea, Zoomable, Loggable):
return False
self.debug("button pressed at x:%d", event.x)
- position = self.pixelToNs(event.x + self.pixbuf_offset)
- self._pipeline.simple_seek(position)
+ button = event.button
+ if button == 3 or (button == 1 and self.app.settings.leftClickAlsoSeeks):
+ position = self.pixelToNs(event.x + self.pixbuf_offset)
+ self._pipeline.simple_seek(position)
return False
def do_button_release_event(self, event):
@@ -209,8 +211,10 @@ class ScaleRuler(Gtk.DrawingArea, Zoomable, Loggable):
return False
position = self.pixelToNs(event.x + self.pixbuf_offset)
- seek_mask = (Gdk.ModifierType.BUTTON3_MASK |
- Gdk.ModifierType.BUTTON1_MASK)
+
+ seek_mask = Gdk.ModifierType.BUTTON3_MASK
+ if self.app.settings.leftClickAlsoSeeks:
+ seek_mask |= Gdk.ModifierType.BUTTON1_MASK
if event.state & seek_mask:
self.debug("motion at event.x %d", event.x)
self._pipeline.simple_seek(position)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]