From 545d3453fe188076253ba7e614b3a900c855d5ad Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Thu, 23 May 2013 00:02:41 +0000 Subject: set WATCH cursor when loading project --- (limited to 'turtleblocks.py') 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. ''' -- cgit v0.9.1