[gedit-latex] Get the document to be saved from the decorator, not from Gedit.App - fix Bugzilla bug #676085



commit 98dc2e06caaa2581208b33035ed02a6c01510405
Author: Pietro Battiston <me pietrobattiston it>
Date:   Wed Jun 6 18:12:15 2012 +0200

    Get the document to be saved from the decorator, not from Gedit.App - fix Bugzilla bug #676085

 latex/tools/__init__.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/latex/tools/__init__.py b/latex/tools/__init__.py
index 6c483c3..8ffbcd4 100644
--- a/latex/tools/__init__.py
+++ b/latex/tools/__init__.py
@@ -120,9 +120,10 @@ class ToolAction(Action):
         LOG.debug("tool activate: %s" % self._tool)
 
         if context.active_editor:
-            doc = Gedit.App.get_default().get_active_window().get_active_document()
+            decorator = context._window_decorator
+            doc = decorator.window.get_active_document()
             self.saving_id = doc.connect("saved",self.run_tool,context,doc)
-            context._window_decorator.save_file()
+            decorator.save_file()
         else:
             LOG.error("tool activate: no active editor")
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]