[gedit-latex] Move the Template class to an standalone file
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-latex] Move the Template class to an standalone file
- Date: Wed, 5 Oct 2011 10:42:00 +0000 (UTC)
commit 8d828e10ce92e1e975a36205d7b68e709229ddc8
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Oct 5 12:39:26 2011 +0200
Move the Template class to an standalone file
latex/Makefile.am | 1 +
latex/base/__init__.py | 14 --------------
latex/base/templates.py | 2 +-
latex/bibtex/completion.py | 2 +-
latex/editor.py | 2 +-
latex/latex/actions.py | 2 +-
latex/latex/completion.py | 2 +-
latex/latex/dialogs.py | 2 +-
latex/template.py | 39 +++++++++++++++++++++++++++++++++++++++
9 files changed, 46 insertions(+), 20 deletions(-)
---
diff --git a/latex/Makefile.am b/latex/Makefile.am
index e3de146..558985e 100644
--- a/latex/Makefile.am
+++ b/latex/Makefile.am
@@ -15,6 +15,7 @@ plugin_PYTHON = \
resources.py \
singleton.py \
snippetmanager.py \
+ template.py \
util.py \
views.py \
windowactivatable.py
diff --git a/latex/base/__init__.py b/latex/base/__init__.py
index 17f9b89..11f7fe7 100644
--- a/latex/base/__init__.py
+++ b/latex/base/__init__.py
@@ -32,20 +32,6 @@ from ..file import File
LOG = logging.getLogger(__name__)
-class Template(object):
- """
- This one is exposed and should be used by the 'real' plugin code
- """
- def __init__(self, expression):
- self._expression = expression
-
- @property
- def expression(self):
- return self._expression
-
- def __str__(self):
- return self._expression
-
class WindowContext(object):
"""
diff --git a/latex/base/templates.py b/latex/base/templates.py
index 5b1de69..2806025 100644
--- a/latex/base/templates.py
+++ b/latex/base/templates.py
@@ -264,7 +264,7 @@ class TemplateCompiler(object):
from gi.repository import Gdk
-from . import Template
+from ..template import Template
from ..preferences import Preferences
diff --git a/latex/bibtex/completion.py b/latex/bibtex/completion.py
index 6db4f95..200d225 100644
--- a/latex/bibtex/completion.py
+++ b/latex/bibtex/completion.py
@@ -28,7 +28,7 @@ from gi.repository import Gdk, GdkPixbuf
from ..preferences import Preferences
from ..resources import Resources
-from ..base import Template
+from ..template import Template
from ..base.completion import ICompletionHandler, Proposal
from ..issues import MockIssueHandler
from model import BibTeXModel
diff --git a/latex/editor.py b/latex/editor.py
index b2f11c7..3d056fc 100644
--- a/latex/editor.py
+++ b/latex/editor.py
@@ -27,7 +27,7 @@ from gi.repository import GObject, Gtk, Gdk
from .base.completion import CompletionDistributor
from .base.templates import TemplateDelegate
-from .base import Template
+from .template import Template
LOG = logging.getLogger(__name__)
diff --git a/latex/latex/actions.py b/latex/latex/actions.py
index eaf9cd4..55fb8e5 100644
--- a/latex/latex/actions.py
+++ b/latex/latex/actions.py
@@ -25,7 +25,7 @@ from gi.repository import Gtk
from logging import getLogger
-from ..base import Template
+from ..template import Template
from ..base.action import Action, IconAction
from ..preferences import Preferences
from ..issues import MockIssueHandler
diff --git a/latex/latex/completion.py b/latex/latex/completion.py
index 44ea7cc..fc1b072 100644
--- a/latex/latex/completion.py
+++ b/latex/latex/completion.py
@@ -28,7 +28,7 @@ from logging import getLogger
from gi.repository import Gdk, GdkPixbuf
from ..resources import Resources
-from ..base import Template
+from ..template import Template
from ..base.completion import ICompletionHandler, Proposal
diff --git a/latex/latex/dialogs.py b/latex/latex/dialogs.py
index 22e8f13..bc06142 100644
--- a/latex/latex/dialogs.py
+++ b/latex/latex/dialogs.py
@@ -34,7 +34,7 @@ from ..preferences import Preferences
from ..util import GladeInterface
from ..resources import Resources
from ..file import File, Folder
-from ..base import Template
+from ..template import Template
from .preview import PreviewRenderer, ImageToolGenerator
from .environment import Environment
diff --git a/latex/template.py b/latex/template.py
new file mode 100644
index 0000000..05c760f
--- /dev/null
+++ b/latex/template.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+
+# This file is part of the Gedit LaTeX Plugin
+#
+# Copyright (C) 2010 Michael Zeising
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public Licence as published by the Free Software
+# Foundation; either version 2 of the Licence, or (at your option) any later
+# version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public Licence for more
+# details.
+#
+# You should have received a copy of the GNU General Public Licence along with
+# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
+# Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+import logging
+
+LOG = logging.getLogger(__name__)
+
+class Template(object):
+ """
+ This one is exposed and should be used by the 'real' plugin code
+ """
+ def __init__(self, expression):
+ self._expression = expression
+
+ @property
+ def expression(self):
+ return self._expression
+
+ def __str__(self):
+ return self._expression
+
+# ex:ts=4:et:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]