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-10 23:11:49 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-03-10 23:11:49 (GMT)
commite0a6fc7e1435f34db7a92088bb16c1a3189bfd88 (patch)
treeaaf6305040aa12ffa813eaa1b5539ea78d55a3a6 /mapnav.py
parent9faf267e89d39027a10df88d8e673eaacefa230a (diff)
Change the mode property in MapNavView to view_mode
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'mapnav.py')
-rw-r--r--mapnav.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mapnav.py b/mapnav.py
index c1c8579..02f8282 100644
--- a/mapnav.py
+++ b/mapnav.py
@@ -45,7 +45,7 @@ class MapNavView(gtk.DrawingArea):
self.y = 0
self.direction = 'S'
self.cache_info = {}
- self.mode = self.MODE_PLAY
+ self.view_mode = self.MODE_PLAY
self.selected = None
super(MapNavView, self).__init__()
self.set_can_focus(True)
@@ -100,7 +100,7 @@ class MapNavView(gtk.DrawingArea):
return True
def __button_press_event_cb(self, widget, event):
- if self.mode == self.MODE_EDIT:
+ if self.view_mode == self.MODE_EDIT:
info_walls = self.get_information_walls(self.x, self.y,
self.direction)
for wall_object in info_walls['objects']:
@@ -128,7 +128,7 @@ class MapNavView(gtk.DrawingArea):
self.update_wall_info(self.x, self.y, self.direction)
def __motion_notify_event_cb(self, widget, event):
- if self.mode == self.MODE_EDIT:
+ if self.view_mode == self.MODE_EDIT:
if self.selected is not None:
# move the object
# TODO: control limits
@@ -320,7 +320,7 @@ class MapNavView(gtk.DrawingArea):
wall_object['height'] = height
ctx.restore()
- if self.mode == self.MODE_EDIT and \
+ if self.view_mode == self.MODE_EDIT and \
self.selected is not None and \
self.selected.data['original'] == wall_object['original']:
# draw controls