Attempts to fix unicode column text
svn: r14153
This commit is contained in:
parent
3cadd4b099
commit
7dd2f83742
@ -91,15 +91,7 @@ class SimpleTable(object):
|
|||||||
"""
|
"""
|
||||||
Set the columns
|
Set the columns
|
||||||
"""
|
"""
|
||||||
# gtk tree doesn't like unicode?!
|
self.__columns = [unicode(col) for col in cols]
|
||||||
columns = []
|
|
||||||
for col in cols:
|
|
||||||
if type(col) == unicode:
|
|
||||||
columns.append(str(col))
|
|
||||||
else:
|
|
||||||
columns.append(col)
|
|
||||||
# end of unicode fix
|
|
||||||
self.__columns = list(copy.copy(columns))
|
|
||||||
self.__sort_vals = [[] for i in range(len(self.__columns))]
|
self.__sort_vals = [[] for i in range(len(self.__columns))]
|
||||||
|
|
||||||
def set_callback(self, which, callback):
|
def set_callback(self, which, callback):
|
||||||
@ -407,7 +399,7 @@ class SimpleTable(object):
|
|||||||
sort_data_types = []
|
sort_data_types = []
|
||||||
for col in self.__columns:
|
for col in self.__columns:
|
||||||
if self.get_cell_type(cnt) == "text":
|
if self.get_cell_type(cnt) == "text":
|
||||||
types.append(type(col))
|
types.append(str)
|
||||||
if self.get_cell_markup(cnt):
|
if self.get_cell_markup(cnt):
|
||||||
column = gtk.TreeViewColumn(col,renderer,markup=model_index)
|
column = gtk.TreeViewColumn(col,renderer,markup=model_index)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user