From ab4c839d0955e0b0f093da8b456f5b72cfe8f041 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Thu, 19 Dec 2013 11:44:10 +0000 Subject: 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 --- 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 -- cgit v0.9.1