diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2016-11-11 21:27:31 +0000 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2016-11-11 22:22:50 +0000 |
commit | 441861786b02a00c95e9d485b8a814ece43edd50 (patch) | |
tree | 00b7529ae7de04bbe7983d82c4b7bd6e01ecf3c3 | |
parent | 0cdf0230e9ed25bae37766b44cf081db4d845cf0 (diff) | |
download | deluge-441861786b02a00c95e9d485b8a814ece43edd50.tar.gz deluge-441861786b02a00c95e9d485b8a814ece43edd50.tar.bz2 deluge-441861786b02a00c95e9d485b8a814ece43edd50.zip |
[GTKUI] Add decode_string to column name comparison
* Strings from GTK are returned utf8 encoded so require decoding if
comparing with unicode strings passed around in python code.
-rw-r--r-- | deluge/ui/gtkui/listview.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/deluge/ui/gtkui/listview.py b/deluge/ui/gtkui/listview.py index 9f49792a4..21946f513 100644 --- a/deluge/ui/gtkui/listview.py +++ b/deluge/ui/gtkui/listview.py @@ -13,6 +13,7 @@ import gtk from gobject import SIGNAL_RUN_LAST, TYPE_NONE, signal_new from gtk.gdk import Event # pylint: disable=ungrouped-imports +from deluge.common import decode_string from deluge.ui.gtkui.common import load_pickled_state_file, save_pickled_state_file signal_new('button-press-event', gtk.TreeViewColumn, SIGNAL_RUN_LAST, TYPE_NONE, (Event,)) @@ -530,7 +531,7 @@ class ListView(object): column_in_state = False if self.state is not None: for column_state in self.state: - if header == column_state.name: + if header == decode_string(column_state.name): # We found a loaded state column_in_state = True if column_state.width > 0: |