summaryrefslogtreecommitdiff
path: root/grc/gui/Port.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/gui/Port.py')
-rw-r--r--grc/gui/Port.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/grc/gui/Port.py b/grc/gui/Port.py
index eb15f6c788..fb1cd678cd 100644
--- a/grc/gui/Port.py
+++ b/grc/gui/Port.py
@@ -25,16 +25,14 @@ from gi.repository import Gtk, PangoCairo
from . import Actions, Colors, Utils
from .Constants import (
PORT_SEPARATION, PORT_SPACING, CONNECTOR_EXTENSION_MINIMAL,
- CONNECTOR_EXTENSION_INCREMENT, PORT_LABEL_PADDING, PORT_MIN_WIDTH, PORT_LABEL_HIDDEN_WIDTH, PORT_FONT
+ CONNECTOR_EXTENSION_INCREMENT, PORT_LABEL_PADDING, PORT_MIN_WIDTH,
+ PORT_LABEL_HIDDEN_WIDTH, PORT_FONT
)
from .Element import Element
from ..core.Constants import DEFAULT_DOMAIN, GR_MESSAGE_DOMAIN
from ..core.Port import Port as _Port
-PORT_MARKUP_TMPL="""\
-<span foreground="black" font_desc="$font">$encode($port.get_name())</span>"""
-
class Port(_Port, Element):
"""The graphical port."""
@@ -117,7 +115,9 @@ class Port(_Port, Element):
def create_labels(self):
"""Create the labels for the socket."""
- self.layout.set_markup(Utils.parse_template(PORT_MARKUP_TMPL, port=self, font=PORT_FONT))
+ self.layout.set_markup("""<span foreground="black" font_desc="{font}">{name}</span>""".format(
+ name=Utils.encode(self.get_name()), font=PORT_FONT
+ ))
def draw(self, widget, cr):
"""