[gedit-latex/pietro-on-jimmy-3-14: 2/3] minimal fix for 3.14
- From: Pietro Battiston <pbattiston src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-latex/pietro-on-jimmy-3-14: 2/3] minimal fix for 3.14
- Date: Thu, 2 Oct 2014 23:42:45 +0000 (UTC)
commit 019725bea02151a833835a9aba8c82a55cea57f8
Author: Aleksei Lissitsin <aldgracil gmail com>
Date: Thu Oct 2 17:45:39 2014 +0300
minimal fix for 3.14
latex/appactivatable.py | 2 +-
latex/tabdecorator.py | 4 ++--
latex/tools/__init__.py | 8 +++-----
3 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/latex/appactivatable.py b/latex/appactivatable.py
index 18ad709..9134bf3 100644
--- a/latex/appactivatable.py
+++ b/latex/appactivatable.py
@@ -61,7 +61,7 @@ class LaTeXAppActivatable(GObject.Object, Gedit.AppActivatable):
self.init_tools()
def add_latex_menu(self):
- self.menu_ext = self.extend_menu("tools-section")
+ self.menu_ext = self.extend_menu("preferences-section")
menu = Gio.MenuItem.new(_("LaTeX"))
container = Gio.Menu.new()
menu.set_submenu(container)
diff --git a/latex/tabdecorator.py b/latex/tabdecorator.py
index 9d48dd4..425f387 100644
--- a/latex/tabdecorator.py
+++ b/latex/tabdecorator.py
@@ -78,7 +78,7 @@ class GeditTabDecorator(object):
def tab(self):
return self._tab
- def _on_load(self, document, param):
+ def _on_load(self, document):
"""
A file has been loaded
"""
@@ -86,7 +86,7 @@ class GeditTabDecorator(object):
self._adjust_editor()
- def _on_save(self, document, param):
+ def _on_save(self, document):
"""
The file has been saved
"""
diff --git a/latex/tools/__init__.py b/latex/tools/__init__.py
index c990633..32b892d 100644
--- a/latex/tools/__init__.py
+++ b/latex/tools/__init__.py
@@ -123,13 +123,11 @@ class ToolAction(Action):
decorator = context._window_decorator
doc = decorator.window.get_active_document()
self.saving_id = doc.connect("saved",self.run_tool,context,doc)
- #FIXME Better would be to trigger a dialog if needed as was done before like this:
- #decorator.save_file()
- doc.save(0)
+ Gedit.commands_save_document(decorator.window, doc)
else:
LOG.error("tool activate: no active editor")
-
- def run_tool(self, document, other, context, doc):
+
+ def run_tool(self, document, context, doc):
tool_view = context.find_view(context.active_editor, "ToolView")
self._runner.run(context.active_editor.file, self._tool, tool_view)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]