summaryrefslogtreecommitdiff
path: root/grc/gui/Utils.py
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2016-04-26 21:53:30 +0200
committerSebastian Koslowski <koslowski@kit.edu>2016-05-30 14:05:10 +0200
commit593ce05e7ea74871c23fa48a9a2486a157c5cfee (patch)
tree6d439e9997f144506e0c1429d38875505c65f77e /grc/gui/Utils.py
parent31eb4e89dc6f3b1deb12175b10127967cdb7407c (diff)
grc: remove all Cheetah templates from GUI
Diffstat (limited to 'grc/gui/Utils.py')
-rw-r--r--grc/gui/Utils.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/grc/gui/Utils.py b/grc/gui/Utils.py
index 054af57c51..e5d69bcf54 100644
--- a/grc/gui/Utils.py
+++ b/grc/gui/Utils.py
@@ -25,8 +25,6 @@ from gi.repository import GdkPixbuf
from gi.repository import GObject
from gi.repository import GLib
-from Cheetah.Template import Template
-
from Constants import POSSIBLE_ROTATIONS, CANVAS_GRID_SIZE
@@ -104,28 +102,6 @@ def encode(value):
return GLib.markup_escape_text(valid_utf8)
-class TemplateParser(object):
- def __init__(self):
- self.cache = {}
-
- def __call__(self, tmpl_str, **kwargs):
- """
- Parse the template string with the given args.
- Pass in the xml encode method for pango escape chars.
-
- Args:
- tmpl_str: the template as a string
-
- Returns:
- a string of the parsed template
- """
- kwargs['encode'] = encode
- template = self.cache.setdefault(tmpl_str, Template.compile(tmpl_str))
- return str(template(namespaces=kwargs))
-
-parse_template = TemplateParser()
-
-
def align_to_grid(coor, mode=round):
def align(value):
return int(mode(value / (1.0 * CANVAS_GRID_SIZE)) * CANVAS_GRID_SIZE)