From ce01d9f98a0d71340b2dfacd2f2af2dab7a454f9 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Wed, 18 Dec 2013 22:27:27 +0000 Subject: some small tweaks from the Turtle Confusion upgrade --- (limited to 'turtleblocks.py') diff --git a/turtleblocks.py b/turtleblocks.py index 051d447..01ddbd3 100755 --- a/turtleblocks.py +++ b/turtleblocks.py @@ -517,7 +517,8 @@ return %s(self)" % (p, P, P) elif resp == gtk.RESPONSE_CANCEL: return - self.client.set_int(self._ORIENTATION, self.tw.orientation) + if hasattr(self, 'client'): + self.client.set_int(self._ORIENTATION, self.tw.orientation) for plugin in self.tw.turtleart_plugins: if hasattr(plugin, 'quit'): @@ -719,7 +720,9 @@ Would you like to save before quitting?')) default_values['arc'] = [90, 100] default_values['setpensize'] = [5] self.tw.turtles.get_active_turtle().set_pen_size(5) - self.client.set_int(self._COORDINATE_SCALE, int(self.tw.coord_scale)) + if hasattr(self, 'client'): + self.client.set_int(self._COORDINATE_SCALE, + int(self.tw.coord_scale)) def _do_toggle_hover_help_cb(self, button): ''' Toggle hover help on/off ''' -- cgit v0.9.1