diff options
Diffstat (limited to 'path.py')
-rwxr-xr-x | path.py | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -1,8 +1,6 @@ #!/usr/bin/env python #Copyright (c) 2011 Walter Bender -# Port To GTK3: -# Ignacio Rodriguez <ignaciorodriguez@sugarlabs.org> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -14,7 +12,7 @@ # Foundation, 51 Franklin Street, Suite 500 Boston, MA 02110-1335 USA -from gi.repository import Gdk, Gtk +import gtk from gettext import gettext as _ import os @@ -27,18 +25,18 @@ class PathMain: self.r = 0 # create a new window - self.win = Gtk.Window(Gtk.WindowType.TOPLEVEL) + self.win = gtk.Window(gtk.WINDOW_TOPLEVEL) self.win.maximize() self.win.set_title("%s: %s" % (_("Paths"), _("Move tiles to make a path."))) - self.win.connect("delete_event", lambda w,e: Gtk.main_quit()) + self.win.connect("delete_event", lambda w,e: gtk.main_quit()) # A vbox to put a menu and the canvas in - vbox = Gtk.VBox(False, 0) + vbox = gtk.VBox(False, 0) self.win.add(vbox) vbox.show() - canvas = Gtk.DrawingArea() + canvas = gtk.DrawingArea() vbox.pack_end(canvas, True, True) canvas.show() @@ -61,7 +59,7 @@ class PathMain: def main(): - Gtk.main() + gtk.main() return 0 if __name__ == "__main__": |