Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/mapnav.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-03-31 05:58:12 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-03-31 05:58:12 (GMT)
commit05d854454008aa2809fcc9e7f3d9c4a57507b2ab (patch)
tree5d21ac074c67a63851111ef55a66652a08ec02ef /mapnav.py
parentf65b8ee5d678b33210d117e492af14fe714de854 (diff)
Add questions to the map
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'mapnav.py')
-rw-r--r--mapnav.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mapnav.py b/mapnav.py
index 6813fb0..d843be5 100644
--- a/mapnav.py
+++ b/mapnav.py
@@ -40,6 +40,8 @@ class MapNavView(gtk.DrawingArea):
([gobject.TYPE_INT, gobject.TYPE_INT,
gobject.TYPE_STRING])),
'resource-clicked': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE, ([gobject.TYPE_STRING])),
+ 'question-clicked': (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE, ([gobject.TYPE_STRING]))}
MODE_PLAY = 0
@@ -125,7 +127,10 @@ class MapNavView(gtk.DrawingArea):
self.update_wall_info(self.x, self.y, self.direction)
else:
# in play mode trigger event
- self.emit('resource-clicked', wall_object['id_resource'])
+ if wall_object['type_object'] == 'resource':
+ self.emit('resource-clicked', wall_object['id_object'])
+ if wall_object['type_object'] == 'question':
+ self.emit('question-clicked', wall_object['id_object'])
if self.view_mode == self.MODE_EDIT:
# check resize