From: Neil Brown Date: Thu, 28 Aug 2008 11:32:36 +0000 (+1000) Subject: Auto-select text mode on a tap X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=cfd6f477eaea7005eb8009d3ee0e2d16e61c5371;p=scribble.git Auto-select text mode on a tap Don't require 'tap', then 'T'. Just a tap will do. And when we flush text for any reason, disable text mode, otherwise we end up over-writing the last text. --- diff --git a/scribble.py b/scribble.py index b1cafcc..aa23e1f 100755 --- a/scribble.py +++ b/scribble.py @@ -815,6 +815,7 @@ class ScribblePad: # new text, self.textpos = self.line[1] self.texttoggle.set_sensitive(True) + self.texttoggle.set_active(True) c.window.draw_rectangle(self.colour_textmode, True, int(ev.x),int(ev.y), 2,2) self.line = None @@ -905,6 +906,7 @@ class ScribblePad: l = [self.colourname, self.textpos, self.textstr] self.lines.append(l) self.textstr = None + self.texttoggle.set_active(False) def draw_text(self, pos, colour, str, cursor = None): layout = self.page.create_pango_layout(str)