Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
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
parent9faf267e89d39027a10df88d8e673eaacefa230a (diff)
Change the mode property in MapNavView to view_mode
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r--editmap.py2
-rw-r--r--mapnav.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/editmap.py b/editmap.py
index f8a14ad..00da4c8 100644
--- a/editmap.py
+++ b/editmap.py
@@ -27,7 +27,7 @@ class EditMapWin(gtk.HBox):
left_vbox = gtk.VBox()
self.nav_view = MapNavView(self.game_map)
- self.nav_view.mode = MapNavView.MODE_EDIT
+ self.nav_view.view_mode = MapNavView.MODE_EDIT
self.top_view = TopMapView(self.game_map, 150, 150)
self.top_view.show_position(self.nav_view.x, self.nav_view.y,
self.nav_view.direction)
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