[Sugar-devel] [PATCH sugar-toolkit v2] Add TODOs reminding us to escape labels by default
Sascha Silbe
silbe at activitycentral.com
Mon Sep 26 09:06:12 EDT 2011
Changing API now to escape labels by default would be more trouble than it's
worth (all activities would need changing, distinguishing between pre and
post API change sugar-toolkit versions). The upcoming GTK-3 port, however,
is a nice opportunity for this kind of change.
Signed-off-by: Sascha Silbe <silbe at activitycentral.com>
---
src/sugar/graphics/palette.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/sugar/graphics/palette.py b/src/sugar/graphics/palette.py
index 46f167b..c68185f 100644
--- a/src/sugar/graphics/palette.py
+++ b/src/sugar/graphics/palette.py
@@ -231,6 +231,8 @@ class Palette(PaletteWindow):
self._label.props.accel_widget = self.props.invoker.props.widget
def set_primary_text(self, label, accel_path=None):
+ # TODO: for the GTK-3 port we should escape the label by default and
+ # add API for the rare case somebody actually wants to use markup.
self._primary_text = label
if label is not None:
@@ -245,6 +247,8 @@ class Palette(PaletteWindow):
setter=set_primary_text)
def set_secondary_text(self, label):
+ # TODO: for the GTK-3 port we should escape the label by default and
+ # add API for the rare case somebody actually wants to use markup.
if label is not None:
label = label.split('\n', 1)[0]
self._secondary_text = label
--
1.7.6.3
More information about the Sugar-devel
mailing list