[gedit-latex] Use snippets from latex/dialogs.py and remove Templates code



commit bc619b4863270b455acc47516516a89a60a91c92
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Wed Oct 5 18:24:23 2011 +0200

    Use snippets from latex/dialogs.py and remove Templates code

 latex/Makefile.am      |    2 -
 latex/latex/dialogs.py |    7 +-
 latex/template.py      |   39 ---
 latex/templates.py     |  610 ------------------------------------------------
 4 files changed, 3 insertions(+), 655 deletions(-)
---
diff --git a/latex/Makefile.am b/latex/Makefile.am
index 5b0cb96..77f4f50 100644
--- a/latex/Makefile.am
+++ b/latex/Makefile.am
@@ -19,8 +19,6 @@ plugin_PYTHON = \
 	singleton.py \
 	snippetmanager.py \
 	tabdecorator.py \
-	template.py \
-	templates.py \
 	util.py \
 	views.py \
 	windowactivatable.py \
diff --git a/latex/latex/dialogs.py b/latex/latex/dialogs.py
index bc06142..e15f5ea 100644
--- a/latex/latex/dialogs.py
+++ b/latex/latex/dialogs.py
@@ -34,7 +34,6 @@ from ..preferences import Preferences
 from ..util import GladeInterface
 from ..resources import Resources
 from ..file import File, Folder
-from ..template import Template
 
 from .preview import PreviewRenderer, ImageToolGenerator
 from .environment import Environment
@@ -862,7 +861,7 @@ class InsertTableDialog(GladeInterface):
                 s = "\\begin{%s}%s\n\\end{%s}" % (environ, self.__build_table_body(rows, cols, "\t\t"), environ)
                 packages = ["amsmath"]
 
-            source = LaTeXSource(Template(s), packages)
+            source = LaTeXSource(s, packages)
 
         dialog.hide()
 
@@ -967,9 +966,9 @@ class InsertListingDialog(GladeInterface):
                 source = "%s\\lstinputlisting%s{%s}" % (lstset, options, relative_filename)
 
             else:
-                source = "%s\\begin{lstlisting}%s\n\t$_\n\\end{lstlisting}" % (lstset, options)
+                source = "%s\\begin{lstlisting}%s\n\t$0\n\\end{lstlisting}" % (lstset, options)
 
-            source = LaTeXSource(Template(source), ["listings"])
+            source = LaTeXSource(source, ["listings"])
 
         dialog.hide()
 



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