#1957: Columns don't add resulting in keyerror for non-latin languages
-------------------+--------------------------------------------------------
 Reporter:  Cas    |       Owner:  Cas     
     Type:  bug    |      Status:  accepted
 Priority:  major  |   Milestone:  1.4.0   
Component:  gtkui  |     Version:  1.3.3   
 Keywords:         |  
-------------------+--------------------------------------------------------

Comment(by Cas):

 Could you try the following patch and whether you still see console
 errors.

 {{{
 diff --git a/deluge/ui/gtkui/listview.py b/deluge/ui/gtkui/listview.py
 index 887f2cb..72613b3 100644
 --- a/deluge/ui/gtkui/listview.py
 +++ b/deluge/ui/gtkui/listview.py
 @@ -333,10 +333,13 @@ def get_state_field_column(self, field):
      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):
 }}}

-- 
Ticket URL: <http://dev.deluge-torrent.org/ticket/1957#comment:5>
Deluge <http://deluge-torrent.org/>
Deluge project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-dev?hl=en.

Reply via email to