Merge pull request #469 from RichardHitt/banlist-datesort
Fix datesort problem after new column in banlist
This commit is contained in:
commit
e0bb6ff0cc
@ -621,8 +621,8 @@ banlist_date_sort (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer
|
||||
time_t t1, t2;
|
||||
char *time1, *time2;
|
||||
|
||||
gtk_tree_model_get(model, a, 2, &time1, -1);
|
||||
gtk_tree_model_get(model, b, 2, &time2, -1);
|
||||
gtk_tree_model_get(model, a, DATE_COLUMN, &time1, -1);
|
||||
gtk_tree_model_get(model, b, DATE_COLUMN, &time2, -1);
|
||||
strptime (time1, &tm1);
|
||||
strptime (time2, &tm2);
|
||||
t1 = mktime (&tm1);
|
||||
@ -647,7 +647,7 @@ banlist_treeview_new (GtkWidget *box, banlist_info *banl)
|
||||
g_return_val_if_fail (store != NULL, NULL);
|
||||
|
||||
sortable = GTK_TREE_SORTABLE (store);
|
||||
gtk_tree_sortable_set_sort_func (sortable, 2, banlist_date_sort, GINT_TO_POINTER (2), NULL);
|
||||
gtk_tree_sortable_set_sort_func (sortable, DATE_COLUMN, banlist_date_sort, GINT_TO_POINTER (DATE_COLUMN), NULL);
|
||||
|
||||
view = gtkutil_treeview_new (box, GTK_TREE_MODEL (store), NULL,
|
||||
TYPE_COLUMN, _("Type"),
|
||||
|
Loading…
Reference in New Issue
Block a user