From 832acac4c9bccabd9e571bfb126838bec6d35b40 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 10 Jan 2009 16:26:24 +0000 Subject: [PATCH] fix for gtk not liking unicode? svn: r11603 --- src/Simple/_SimpleTable.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Simple/_SimpleTable.py b/src/Simple/_SimpleTable.py index 4574a91a8..2ca928784 100644 --- a/src/Simple/_SimpleTable.py +++ b/src/Simple/_SimpleTable.py @@ -56,10 +56,18 @@ class SimpleTable: def get_row_count(self): return len(self.__rows) - def columns(self, *columns): + def columns(self, *cols): """ Set the columns """ + # gtk tree doesn't like unicode?! + 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))]