Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2013-12-19 11:44:10 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2013-12-19 11:44:10 (GMT)
commitab4c839d0955e0b0f093da8b456f5b72cfe8f041 (patch)
tree174ee6bd69aadc6ddaecbd6610dd8fa890714294
parent30d13ed03812dd4a06421ebc834594f42178000e (diff)
Disable saving the document content as text if abi version == 3.0
This is because of http://bugzilla.abisource.com/show_bug.cgi?id=13585 and should be reverted when is fixed Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r--AbiWordActivity.py7
-rw-r--r--widgets.py5
2 files changed, 10 insertions, 2 deletions
diff --git a/AbiWordActivity.py b/AbiWordActivity.py
index 546e267..cabcc30 100644
--- a/AbiWordActivity.py
+++ b/AbiWordActivity.py
@@ -452,8 +452,11 @@ class AbiWordActivity(activity.Activity):
self.abiword_canvas.save('file://' + file_path,
self.metadata['mime_type'], '')
- self.metadata['fulltext'] = self.abiword_canvas.get_content(
- 'text/plain', None)[:3000]
+
+ # due to http://bugzilla.abisource.com/show_bug.cgi?id=13585
+ if self.abiword_canvas.get_version() != '3.0':
+ self.metadata['fulltext'] = self.abiword_canvas.get_content(
+ 'text/plain', None)[:3000]
def _is_plain_text(self, mime_type):
# These types have 'text/plain' in their mime_parents but we need
diff --git a/widgets.py b/widgets.py
index 019a233..55bd511 100644
--- a/widgets.py
+++ b/widgets.py
@@ -259,3 +259,8 @@ class DocumentView(Abi.Widget):
self.dy = 0
self.queue_resize()
return True
+
+ def get_version(self):
+ version = Abi._version
+ logging.error('Abiword version %s', version)
+ return version