[gedit-latex] Setting Dummy actions as "not applicable" suppresses _most_ warnings



commit 1d197961c7c706822d63dc47231720017c4354e0
Author: Pietro Battiston <pbattiston src gnome org>
Date:   Sun May 1 10:09:18 2016 +0200

    Setting Dummy actions as "not applicable" suppresses _most_ warnings

 latex/latex/actions.py     |    2 ++
 latex/windowactivatable.py |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/latex/latex/actions.py b/latex/latex/actions.py
index f404cf3..1681692 100644
--- a/latex/latex/actions.py
+++ b/latex/latex/actions.py
@@ -524,9 +524,11 @@ class LaTeXEqnArrayAction(LaTeXTemplateAction):
 class FileDummyAction(Action):
     label = tooltip = stock_id = ''
     accelerator = None
+    extensions = []
 
 class ToolsDummyAction(Action):
     label = tooltip = stock_id = ''
     accelerator = None
+    extensions = []
 
 # ex:ts=4:et:
diff --git a/latex/windowactivatable.py b/latex/windowactivatable.py
index dcaa2ec..f7da1ae 100644
--- a/latex/windowactivatable.py
+++ b/latex/windowactivatable.py
@@ -421,7 +421,7 @@ class LaTeXWindowActivatable(GObject.Object, Gedit.WindowActivatable, PeasGtk.Co
                 # Show/hide the tool menu itself onlyif any action is shown:
                 menu_action = self.window.lookup_action('ToolsDummyAction')
                 # FIXME: This line spits "Gtk-WARNING"s which I really don't
-                # understand:
+                # understand (when "to_enable" is not empty):
                 # "Duplicate child name in GtkStack: LaTeX Tools"
                 menu_action.set_enabled(bool(to_enable))
         


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