From 4d77241603ecf8b6c687bbc15a19598a85d3a767 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 10 Mar 2012 22:13:52 +0000 Subject: [PATCH] Modified fix for #1957 non-acsii columns --- deluge/ui/gtkui/listview.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deluge/ui/gtkui/listview.py b/deluge/ui/gtkui/listview.py index 887f2cb00..72613b3ed 100644 --- a/deluge/ui/gtkui/listview.py +++ b/deluge/ui/gtkui/listview.py @@ -333,10 +333,13 @@ class ListView: def on_menuitem_toggled(self, widget): """Callback for the generated column menuitems.""" # Get the column name from the widget - name = unicode(widget.get_child().get_text()) + name = widget.get_child().get_text() # Set the column's visibility based on the widgets active state - self.columns[name].column.set_visible(widget.get_active()) + try: + self.columns[name].column.set_visible(widget.get_active()) + except KeyError: + self.columns[unicode(name)].column.set_visible(widget.get_active()) return def on_treeview_header_right_clicked(self, column, event):