From 10ae727aa16aa832755c809109dd5e240c0f478b Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Wed, 23 Jan 2008 13:35:33 +0000 Subject: [PATCH] 2008-01-23 Brian Matherly Benny Malengier : backport trunk * src/ReportBase/_StyleComboBox.py: * src/ReportBase/_StyleEditor.py: Modify the style editor to properly handle unicode style names. svn: r9919 --- ChangeLog | 6 ++++++ src/ReportBase/_StyleComboBox.py | 2 +- src/ReportBase/_StyleEditor.py | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c0b0eac06..d8f1bee42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-01-23 Brian Matherly + Benny Malengier : backport trunk + * src/ReportBase/_StyleComboBox.py: + * src/ReportBase/_StyleEditor.py: + Modify the style editor to properly handle unicode style names. + 2008-01-22 Benny Malengier * src/Editors/_EditPerson.py: callback for gallerytab no longer needed diff --git a/src/ReportBase/_StyleComboBox.py b/src/ReportBase/_StyleComboBox.py index 0478ec025..b14f62c97 100644 --- a/src/ReportBase/_StyleComboBox.py +++ b/src/ReportBase/_StyleComboBox.py @@ -83,7 +83,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 a2475fb56..60dd5d6cb 100644 --- a/src/ReportBase/_StyleEditor.py +++ b/src/ReportBase/_StyleEditor.py @@ -149,7 +149,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) @@ -158,7 +158,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()