Ticket #1957: 0001-Fix-crash-on-non-latin-1-named-column-active-state-c.patch

File 0001-Fix-crash-on-non-latin-1-named-column-active-state-c.patch, 971 bytes (added by Cas, 10 years ago)
  • deluge/ui/gtkui/listview.py

    From de21f086d6e97da90a41666ddf32303bb0679a75 Mon Sep 17 00:00:00 2001
    From: Serge Matveenko <s@matveenko.ru>
    Date: Tue, 25 Oct 2011 23:00:52 +0400
    Subject: [PATCH] Fix crash on non latin-1 named column active state change in
     list view.
    
    ---
     deluge/ui/gtkui/listview.py |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/deluge/ui/gtkui/listview.py b/deluge/ui/gtkui/listview.py
    index 869f970..52d764c 100644
    a b def get_state_field_column(self, field): 
    342342    def on_menuitem_toggled(self, widget): 
    343343        """Callback for the generated column menuitems.""" 
    344344        # Get the column name from the widget 
    345         name = widget.get_child().get_text() 
     345        name = unicode(widget.get_child().get_text()) 
    346346 
    347347        # Set the column's visibility based on the widgets active state 
    348348        self.columns[name].column.set_visible(widget.get_active())