Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/AbiWordActivity.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-05-02 10:53:17 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-05-02 10:53:17 (GMT)
commitb5d73e8fd2584e51954ba5d722b3907461c5dee9 (patch)
tree38f6ef8fcfcc00475f245769de0436c39bae1bc3 /AbiWordActivity.py
parente87d9e0a7ea6932485d704dc02b272659ad3b7d1 (diff)
Use FontComboBox to show font previews - Sans selected by default fix SL #2759
'Times New Roman' was selected by default in AbiWord but the font is not available, then the information in the doc and the font combo was out of sync. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'AbiWordActivity.py')
-rw-r--r--AbiWordActivity.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/AbiWordActivity.py b/AbiWordActivity.py
index ed1a3f8..8e94205 100644
--- a/AbiWordActivity.py
+++ b/AbiWordActivity.py
@@ -207,6 +207,12 @@ class AbiWordActivity(activity.Activity):
self.abiword_canvas.invoke_cmd(
'com.abisource.abiword.loadbindings.fromURI',
keybindings_file, 0, 0)
+ # set default font
+ self.abiword_canvas.select_all()
+ # get_selection return content and length
+ if self.abiword_canvas.get_selection('text/plain')[1] == 0:
+ logging.error('Setting default font to Sans in new documents')
+ self.abiword_canvas.set_font_name('Sans')
def get_preview(self):
if not hasattr(self.abiword_canvas, 'render_page_to_image'):