[gedit-latex] Do not use the scope word for vars.



commit 5c5a27afeb1bc89f550a5e7cf3ad339f0d2b5e5a
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Thu Oct 6 15:55:08 2011 +0200

    Do not use the scope word for vars.
    
    The scopes were removed already, the reason for that was that
    everything was either for bibtex or for latex and the views
    should not be used in any other context.

 latex/config.py            |    6 +++---
 latex/editor.py            |    6 +++---
 latex/windowactivatable.py |   10 +++++-----
 latex/windowcontext.py     |   18 +++++++++---------
 4 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/latex/config.py b/latex/config.py
index ae49084..dd880ff 100644
--- a/latex/config.py
+++ b/latex/config.py
@@ -62,13 +62,13 @@ from .preferences import Preferences
 LATEX_EXTENSIONS = Preferences().get("latex-extensions").split(",")
 BIBTEX_EXTENSIONS = [".bib"]
 
-EDITOR_SCOPE_VIEWS = {}
+EDITOR_VIEWS = {}
 
 for e in LATEX_EXTENSIONS:
-    EDITOR_SCOPE_VIEWS[e] = {"IssueView": IssueView, "LaTeXOutlineView": LaTeXOutlineView, "LaTeXSymbolMapView": LaTeXSymbolMapView, "ToolView": ToolView}
+    EDITOR_VIEWS[e] = {"IssueView": IssueView, "LaTeXOutlineView": LaTeXOutlineView, "LaTeXSymbolMapView": LaTeXSymbolMapView, "ToolView": ToolView}
 
 for e in BIBTEX_EXTENSIONS:
-    EDITOR_SCOPE_VIEWS[e] = {"IssueView": IssueView, "BibTeXOutlineView": BibTeXOutlineView, "ToolView": ToolView}
+    EDITOR_VIEWS[e] = {"IssueView": IssueView, "BibTeXOutlineView": BibTeXOutlineView, "ToolView": ToolView}
 
 
 # editors
diff --git a/latex/editor.py b/latex/editor.py
index 76950e2..5a23be0 100644
--- a/latex/editor.py
+++ b/latex/editor.py
@@ -580,9 +580,9 @@ class Editor(object):
             table.remove(tag)
 
         # destroy the views associated to this editor
-        for i in self._window_context.editor_scope_views[self]:
-            self._window_context.editor_scope_views[self][i].destroy()
-        del self._window_context.editor_scope_views[self]
+        for i in self._window_context.editor_views[self]:
+            self._window_context.editor_views[self][i].destroy()
+        del self._window_context.editor_views[self]
 
         # unreference the tab decorator
         del self._tab_decorator
diff --git a/latex/windowactivatable.py b/latex/windowactivatable.py
index 97b1a4e..b811080 100644
--- a/latex/windowactivatable.py
+++ b/latex/windowactivatable.py
@@ -34,7 +34,7 @@ from .tools import ToolAction
 from .resources import Resources
 from .file import File
 from .panelview import PanelView
-from .config import EDITOR_SCOPE_VIEWS, ACTIONS
+from .config import EDITOR_VIEWS, ACTIONS
 from .tabdecorator import GeditTabDecorator
 from .windowcontext import WindowContext
 
@@ -82,7 +82,7 @@ class LaTeXWindowActivatable(GObject.Object, Gedit.WindowActivatable, PeasGtk.Co
         #
         # initialize context object
         #
-        self._window_context = WindowContext(self, EDITOR_SCOPE_VIEWS)
+        self._window_context = WindowContext(self, EDITOR_VIEWS)
 
         # the order is important!
         self._init_actions()
@@ -154,7 +154,7 @@ class LaTeXWindowActivatable(GObject.Object, Gedit.WindowActivatable, PeasGtk.Co
         self._selected_bottom_views = {}
         self._selected_side_views = {}
 
-        # currently hooked editor-scope views
+        # currently hooked editor views
         self._side_views = []
         self._bottom_views = []
 
@@ -421,7 +421,7 @@ class LaTeXWindowActivatable(GObject.Object, Gedit.WindowActivatable, PeasGtk.Co
             self.hide_toolbar()
 
         #
-        # adjust editor-scope views
+        # adjust editor views
         #
 
         # determine set of side/bottom views BEFORE
@@ -435,7 +435,7 @@ class LaTeXWindowActivatable(GObject.Object, Gedit.WindowActivatable, PeasGtk.Co
         after_bottom_views = set()
 
         if tab_decorator.editor:
-            editor_views = self._window_context.editor_scope_views[tab_decorator.editor]
+            editor_views = self._window_context.editor_views[tab_decorator.editor]
             for id, view in editor_views.iteritems():
                 if isinstance(view, PanelView):
                     if view.get_orientation() == Gtk.Orientation.HORIZONTAL:
diff --git a/latex/windowcontext.py b/latex/windowcontext.py
index a065bc0..cc9af01 100644
--- a/latex/windowcontext.py
+++ b/latex/windowcontext.py
@@ -43,15 +43,15 @@ class WindowContext(object):
     This also creates and destroys the View instances.
     """
 
-    def __init__(self, window_decorator, editor_scope_view_classes):
+    def __init__(self, window_decorator, editor_view_classes):
         """
         @param window_decorator: the GeditWindowDecorator this context corresponds to
-        @param editor_scope_view_classes: a map from extension to list of View classes
+        @param editor_view_classes: a map from extension to list of View classes
         """
         self._window_decorator = window_decorator
-        self._editor_scope_view_classes = editor_scope_view_classes
+        self._editor_view_classes = editor_view_classes
 
-        self.editor_scope_views = {}    # maps Editor object to a map from ID to View object
+        self.editor_views = {}    # maps Editor object to a map from ID to View object
 
     def create_editor_views(self, editor, file):
         """
@@ -60,11 +60,11 @@ class WindowContext(object):
 
         Called by Editor base class
         """
-        self.editor_scope_views[editor] = {}
+        self.editor_views[editor] = {}
         try:
-            for id, clazz in self._editor_scope_view_classes[file.extension].iteritems():
+            for id, clazz in self._editor_view_classes[file.extension].iteritems():
                 # create View instance and add it to the map
-                self.editor_scope_views[editor][id] = clazz(self, editor)
+                self.editor_views[editor][id] = clazz(self, editor)
 
                 LOG.debug("Created view " + id)
         except KeyError:
@@ -97,11 +97,11 @@ class WindowContext(object):
         Return a View object
         """
         try:
-            return self.editor_scope_views[editor][view_id]
+            return self.editor_views[editor][view_id]
         except KeyError:
             LOG.critical("Unknown view id: %s (we have: %s)" % (
                     view_id,
-                    ",".join(self.editor_scope_views.get(editor,{}).keys())))
+                    ",".join(self.editor_views.get(editor,{}).keys())))
 
     def set_action_enabled(self, action_id, enabled):
         """



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