Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Desenho.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-10-19 13:11:38 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-10-19 18:51:12 (GMT)
commitfc87da4cafad2ca731a777ed28efb9622a004c2d (patch)
treef2b7d9570fe7d02650c33b87e6332400f63833c4 /Desenho.py
parent0f98321a2b765061c4ae4974b1723e1f15b9ebce (diff)
Use touch events - SL #4004
This patch does not solve the tools selection and freeform Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'Desenho.py')
-rw-r--r--Desenho.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/Desenho.py b/Desenho.py
index 1087819..b93f616 100644
--- a/Desenho.py
+++ b/Desenho.py
@@ -303,9 +303,8 @@ class Desenho:
widget.queue_draw_area(x - size, y - size,
width + size * 2, height + size * 2)
- def square(self, widget, event, coords, temp, fill):
+ def square(self, widget, coords, temp, fill):
"""Draw a square.
-
@param self -- Desenho.Desenho instance
@param widget -- Area object (GtkDrawingArea)
@param coords -- Two value tuple
@@ -575,18 +574,18 @@ class Desenho:
widget.queue_draw()
- def text(self, widget, event):
+ def text(self, widget, coord_x, coord_y):
"""Display and draw text in the drawing area.
@param self -- Desenho.Desenho instance
@param widget -- Area object (GtkDrawingArea)
- @param event -- GdkEvent
+ @param coord_x
+ @param coord_y
"""
if not widget.text_in_progress:
widget.text_in_progress = True
- x, y = int(event.x), int(event.y)
- widget.activity.move_textview(x, y)
+ widget.activity.move_textview(coord_x, coord_y)
widget.activity.textview.show()
widget.activity.textview.grab_focus()