diff options
author | Walter Bender <walter@sugarlabs.org> | 2013-05-23 00:02:41 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2013-05-23 00:02:41 (GMT) |
commit | 545d3453fe188076253ba7e614b3a900c855d5ad (patch) | |
tree | edc39db4c53108f609103dd9905e4714125d1232 /turtleblocks.py | |
parent | f4feb5a9326978f490ccea2f5a324bb6e03cd71d (diff) |
set WATCH cursor when loading project
Diffstat (limited to 'turtleblocks.py')
-rwxr-xr-x | turtleblocks.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/turtleblocks.py b/turtleblocks.py index 7d5c092..9de66b4 100755 --- a/turtleblocks.py +++ b/turtleblocks.py @@ -24,6 +24,7 @@ import pygtk pygtk.require('2.0') import gtk +import gobject import cairo import getopt @@ -181,12 +182,17 @@ return %s(self)" % (p, P, P) if self._ta_file is None: self.tw.load_start() else: - self.tw.load_start(self._ta_file) - self.tw.lc.trace = 0 - if self._run_on_launch: - self._do_run_cb() + self.win.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) + gobject.idle_add(self._project_loader, self._ta_file) gtk.main() + def _project_loader(self, file_name): + self.tw.load_start(self._ta_file) + self.tw.lc.trace = 0 + if self._run_on_launch: + self._do_run_cb() + self.win.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR)) + def _draw_and_quit(self): ''' Non-interactive mode: run the project, save it to a file and quit. ''' |