From e543668d038fce64576b8750050a7c89d65d65b1 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Mon, 27 Jan 2014 02:55:09 +0000 Subject: Alan's patch to fix hover help in GNOME --- diff --git a/NEWS b/NEWS index 71d88a1..73cd30d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +198 + +BUG FIX: +* Fix bug with color constants when used with push/pop and boxes + 197 BUG FIX: diff --git a/activity/activity.info b/activity/activity.info index 316bd6e..2c11c09 100644 --- a/activity/activity.info +++ b/activity/activity.info @@ -1,6 +1,6 @@ [Activity] name = TurtleBlocks -activity_version = 197 +activity_version = 198 license = MIT bundle_id = org.laptop.TurtleArtActivity exec = sugar-activity TurtleArtActivity.TurtleArtActivity diff --git a/turtleblocks.py b/turtleblocks.py index 3483169..fa324ce 100755 --- a/turtleblocks.py +++ b/turtleblocks.py @@ -243,8 +243,7 @@ return %s(self)" % (p, P, P) if hasattr(self, 'client'): if self.client.get_int(self._HOVER_HELP) == 1: - self.hover.set_active(False) - self._do_hover_help_off_cb(None) + self._do_hover_help_off_cb() if not self.client.get_int(self._COORDINATE_SCALE) in [0, 1]: self.tw.coord_scale = 1 else: @@ -748,22 +747,18 @@ Would you like to save before quitting?')) ''' Toggle hover help on/off ''' self.tw.no_help = not self.tw.no_help if self.tw.no_help: - self._do_hover_help_off_cb(None) + self._do_hover_help_off_cb() else: - self._do_hover_help_on_cb(None) + self._do_hover_help_on_cb() - def _do_hover_help_on_cb(self, button): + def _do_hover_help_on_cb(self): ''' Turn hover help on ''' - self.tw.no_help = False self.hover.set_active(True) if hasattr(self, 'client'): self.client.set_int(self._HOVER_HELP, 0) - def _do_hover_help_off_cb(self, button): + def _do_hover_help_off_cb(self): ''' Turn hover help off ''' - if self.tw.no_help: # Debounce - return - self.tw.no_help = True self.tw.last_label = None if self.tw.status_spr is not None: self.tw.status_spr.hide() -- cgit v0.9.1