Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Area.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-10-25 12:09:42 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-10-25 12:09:42 (GMT)
commit8d5543a256a30df6eccefd1d3cf823b26b281600 (patch)
treea6a4454b4cd46dc58d2ca58da031d897f8350485 /Area.py
parent13c69be0bf904701cbad9c5f9584ba4ffdb298b1 (diff)
Resize the textview area when change font - SL #4078
This patch also solves a problem when close the activity while a text is being edited. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'Area.py')
-rw-r--r--Area.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Area.py b/Area.py
index f5d62e5..da55e36 100644
--- a/Area.py
+++ b/Area.py
@@ -225,6 +225,9 @@ class Area(Gtk.DrawingArea):
self._font_description = fd
self.activity.textview.modify_font(fd)
self.tool['font_description'] = fd.to_string()
+ if self.text_in_progress:
+ # set the focus in the textview to enable resize if needed
+ GObject.idle_add(self.activity.textview.grab_focus)
def get_font_description(self):
return Pango.FontDescription(self.tool['font_description'])