self.updated_thread_highlight(column, cell, model, iter)
column_num = ThreadListModel.column_names.index(column_name)
value = model.get_value(iter, column_num)
- if model.get_column_type(column_num) == gobject.TYPE_INT:
+ if model.get_column_type(column_num) \
+ in (gobject.TYPE_INT, gobject.TYPE_DOUBLE):
if value == 0:
cell.set_property("text", "")
else:
class ThreadListModel(gtk.GenericTreeModel):
- column_types = (str, int, str, int, int, int, int)
+ column_types = (str, int, str, int, int, int, float)
column_names = ["id", "num", "title", "res", "lineCount",
"lastModified", "average"]
column_width = [0, 30, 330, 50, 50, 200, 50]
return 1
elif v2 == 0:
return -1
- return v1 - v2
+ if v1 > v2:
+ return 1
+ elif v1 < v2:
+ return -1
+ else:
+ return 0
def get_sort(self):
return self.sort_column_name, self.sort_reverse