[gcompris/gcomprixogoo] Now accept the double click to mark the time line end.



commit fadb6d49c6e9998728805177c1c9b0bcb4a24c0c
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Sun Nov 8 02:22:03 2009 +0100

    Now accept the double click to mark the time line end.

 src/anim-activity/Timeline.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/anim-activity/Timeline.py b/src/anim-activity/Timeline.py
index 64c8507..0aa3775 100644
--- a/src/anim-activity/Timeline.py
+++ b/src/anim-activity/Timeline.py
@@ -143,9 +143,11 @@ class Timeline:
         # Unmark previous mark
         if self.lastmark >= 0:
             marked_item = self.timelinelist[self.lastmark]
-            marked_item.set_properties(stroke_color_rgba = self.default_stroke)
+            marked_item.set_properties(stroke_color_rgba = self.default_stroke,
+                                       line_width = 1)
 
-        item.set_properties(stroke_color_rgba = self.marked_stroke)
+        item.set_properties(stroke_color_rgba = self.marked_stroke,
+                            line_width = 3.5)
         self.lastmark = item.get_data("time")
 
     def get_lastmark(self):
@@ -157,7 +159,8 @@ class Timeline:
     #
     def timeline_item_event(self, item, target, event):
 
-        if event.button == 1:
+        if (event.type == gtk.gdk.BUTTON_PRESS
+            and event.button == 1):
             self.select_it(item)
         else:
             self.lastmark_it(item)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]