Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/mapview.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@sugarlabs.org>2014-04-11 00:58:35 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2014-05-14 21:21:40 (GMT)
commit1394eb71f8e677990ca26d3be4e1fb1af708f950 (patch)
tree6d4740b8ad9ceabc090d45c52f9342c4cd3aa966 /mapview.py
parent3b2c6fa2d075bd77f22202fdacd480b6dcd26f9b (diff)
Port to Gtk3: Initial run of py-giconvert.sh and sugar-convert.sh
Diffstat (limited to 'mapview.py')
-rw-r--r--mapview.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/mapview.py b/mapview.py
index cf443c9..06ce54c 100644
--- a/mapview.py
+++ b/mapview.py
@@ -5,7 +5,7 @@
#
# The class TopMapView draw a map from the top
-import gtk
+from gi.repository import Gtk
import cairo
from game_map import GameMap
@@ -112,7 +112,7 @@ def draw(ctx, game_map, view_data):
ctx.fill()
-class TopMapView(gtk.DrawingArea):
+class TopMapView(Gtk.DrawingArea):
def __init__(self, game_map, width, height):
self._game_map = game_map
@@ -148,14 +148,14 @@ class TopMapView(gtk.DrawingArea):
def main():
- window = gtk.Window()
+ window = Gtk.Window()
game_map = GameMap()
map_view = TopMapView(game_map, 200, 200)
window.add(map_view)
- window.connect("destroy", gtk.main_quit)
+ window.connect("destroy", Gtk.main_quit)
window.show_all()
- gtk.main()
+ Gtk.main()
if __name__ == "__main__":
main()