diff --git a/deluge/ui/gtk3/filtertreeview.py b/deluge/ui/gtk3/filtertreeview.py index dbbdd2c15..36daf5408 100644 --- a/deluge/ui/gtk3/filtertreeview.py +++ b/deluge/ui/gtk3/filtertreeview.py @@ -20,7 +20,7 @@ from gi.repository.GdkPixbuf import Pixbuf from gi.repository.Pango import EllipsizeMode import deluge.component as component -from deluge.common import TORRENT_STATE, resource_filename +from deluge.common import TORRENT_STATE, decode_bytes, resource_filename from deluge.configmanager import ConfigManager from deluge.ui.client import client @@ -224,7 +224,7 @@ class FilterTreeView(component.Component): def render_cell_data(self, column, cell, model, row, data): cat = model.get_value(row, 0) - label = model.get_value(row, 2) + label = decode_bytes(model.get_value(row, 2)) count = model.get_value(row, 3) # Supress Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed diff --git a/deluge/ui/gtk3/listview.py b/deluge/ui/gtk3/listview.py index d16ef7d64..666bb6731 100644 --- a/deluge/ui/gtk3/listview.py +++ b/deluge/ui/gtk3/listview.py @@ -266,7 +266,8 @@ class ListView(object): sort = None if self.model_filter: sort_id, order = self.model_filter.get_sort_column_id() - if self.get_column_name(sort_id) == column.get_title(): + col_title = decode_bytes(column.get_title()) + if self.get_column_name(sort_id) == col_title: sort = sort_id return ListViewColumnState( @@ -582,7 +583,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_bytes(column_state.name): # We found a loaded state column_in_state = True if column_state.width > 0: diff --git a/deluge/ui/gtk3/preferences.py b/deluge/ui/gtk3/preferences.py index fb3935a90..e5cb6ba9a 100644 --- a/deluge/ui/gtk3/preferences.py +++ b/deluge/ui/gtk3/preferences.py @@ -109,7 +109,8 @@ class Preferences(component.Component): # Add and set separator after Plugins. def set_separator(model, _iter, data=None): - if model.get_value(_iter, 1) == '_separator_': + entry = deluge.common.decode_bytes(model.get_value(_iter, 1)) + if entry == '_separator_': return True self.treeview.set_row_separator_func(set_separator, None) @@ -277,7 +278,7 @@ class Preferences(component.Component): self.iter_to_remove = None def on_foreach_row(model, path, _iter, user_data): - row_name = model.get_value(_iter, 1) + row_name = deluge.common.decode_bytes(model.get_value(_iter, 1)) if row_name == user_data: # This is the row we need to remove self.page_num_to_remove = model.get_value(_iter, 0)