From 481b464ca5dc6b0c46dc747c787046314434b545 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Wed, 23 Jan 2008 13:14:05 +0000 Subject: [PATCH] Modify the style editor to properly handle unicode style names. svn: r9918 --- ChangeLog | 5 +++++ src/ReportBase/_StyleComboBox.py | 2 +- src/ReportBase/_StyleEditor.py | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index de2c34e23..e3d83a613 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-01-23 Brian Matherly + * src/ReportBase/_StyleComboBox.py: + * src/ReportBase/_StyleEditor.py: + Modify the style editor to properly handle unicode style names. + 2008-01-22 Brian Matherly * src/plugins/KinshipReport.py: * src/plugins/DetDescendantReport.py: diff --git a/src/ReportBase/_StyleComboBox.py b/src/ReportBase/_StyleComboBox.py index 62d240f94..2091c5a36 100644 --- a/src/ReportBase/_StyleComboBox.py +++ b/src/ReportBase/_StyleComboBox.py @@ -84,7 +84,7 @@ class StyleComboBox(gtk.ComboBox): active = self.get_active() if active < 0: return None - key = self.store[active][0] + key = unicode(self.store[active][0]) if key == _('default'): key = "default" return (key,self.style_map[key]) diff --git a/src/ReportBase/_StyleEditor.py b/src/ReportBase/_StyleEditor.py index 382ff90d6..10f58f381 100644 --- a/src/ReportBase/_StyleEditor.py +++ b/src/ReportBase/_StyleEditor.py @@ -153,7 +153,7 @@ class StyleListDisplay: if not node: return - name = self.list.model.get_value(node, 0) + name = unicode(self.list.model.get_value(node, 0)) style = self.sheetlist.get_style_sheet(name) StyleEditor(name, style, self) @@ -162,7 +162,7 @@ class StyleListDisplay: store, node = self.list.selection.get_selected() if not node: return - name = self.list.model.get_value(node, 0) + name = unicode(self.list.model.get_value(node, 0)) self.sheetlist.delete_style_sheet(name) self.redraw()