Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/widgets.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@sugarlabs.org>2010-11-17 18:07:00 (GMT)
committer Gonzalo Odiard <godiard@sugarlabs.org>2010-11-17 18:07:00 (GMT)
commit89863c7b2188628a6da85bbe8666c49da1005898 (patch)
tree70f4584b77abb9c1bcbfa0bf5bfd9b21839cfc15 /widgets.py
parentba4c042918ff828c14ba18130bbeb70026129b8e (diff)
OLPC #10442 - Add the option to export to PDF
Don't set the activity metadata property when save PDF file because Write can save PDF files but can't open them.
Diffstat (limited to 'widgets.py')
-rw-r--r--widgets.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/widgets.py b/widgets.py
index 0d6b4aa..0a525bf 100644
--- a/widgets.py
+++ b/widgets.py
@@ -220,7 +220,11 @@ class ExportButton(ToolButton):
extension_or_mimetype=".txt")[:3000]
fileObject.metadata['icon-color'] = act_meta['icon-color']
- fileObject.metadata['activity'] = act_meta['activity']
+
+ # don't set application if PDF because Write can't open PDF files
+ if format['mime_type'] != 'application/pdf':
+ fileObject.metadata['activity'] = act_meta['activity']
+
fileObject.metadata['keep'] = act_meta['keep']
preview = activity.get_preview()