From f25b1350150f0b2db51115362bbb4d3da3a8ef08 Mon Sep 17 00:00:00 2001 From: Huang Peng Date: Mon, 25 Aug 2008 08:34:01 +0800 Subject: Fix problem when font_name has unicode char. --- setup/main.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'setup') diff --git a/setup/main.py b/setup/main.py index b7bead3..f3e0f54 100644 --- a/setup/main.py +++ b/setup/main.py @@ -124,6 +124,7 @@ class Setup(object): else: self.__fontbutton_custom_font.set_sensitive(False) font_name = gtk.settings_get_default().get_property("gtk-font-name") + font_name = unicode(font_name, "utf-8") font_name = self.__bus.config_get_value(CONFIG_PANEL_CUSTOM_FONT, font_name) self.__fontbutton_custom_font.connect("notify::font-name", self.__fontbutton_custom_font_notify_cb) self.__fontbutton_custom_font.set_font_name(font_name) @@ -411,6 +412,7 @@ class Setup(object): def __fontbutton_custom_font_notify_cb(self, button, arg): font_name = self.__fontbutton_custom_font.get_font_name() + font_name = unicode(font_name, "utf-8") self.__bus.config_set_value(CONFIG_PANEL_CUSTOM_FONT, font_name) def __config_value_changed_cb(self, bus, key, value): -- cgit