From 8aacf43b3b4f21247a63b8301c952c6a8c98585e Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Fri, 18 Feb 2011 00:49:08 +0000 Subject: adding trackers now seems to work. change all tabs to whitespace. --- src/trg-model.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'src/trg-model.c') diff --git a/src/trg-model.c b/src/trg-model.c index 2d1ff67..e41c4b3 100644 --- a/src/trg-model.c +++ b/src/trg-model.c @@ -29,23 +29,23 @@ struct trg_model_remove_removed_foreachfunc_args { gboolean trg_model_remove_removed_foreachfunc(GtkTreeModel * model, - GtkTreePath * path G_GNUC_UNUSED, - GtkTreeIter * iter, gpointer data) + GtkTreePath * path G_GNUC_UNUSED, + GtkTreeIter * iter, gpointer data) { struct trg_model_remove_removed_foreachfunc_args *args = - (struct trg_model_remove_removed_foreachfunc_args *) data; + (struct trg_model_remove_removed_foreachfunc_args *) data; gint64 rowSerial; gtk_tree_model_get(model, iter, args->serial_column, &rowSerial, -1); if (rowSerial != args->currentSerial) - args->toRemove = - g_list_append(args->toRemove, gtk_tree_iter_copy(iter)); + args->toRemove = + g_list_append(args->toRemove, gtk_tree_iter_copy(iter)); return FALSE; } void trg_model_remove_removed(GtkListStore * model, gint serial_column, - gint64 currentSerial) + gint64 currentSerial) { struct trg_model_remove_removed_foreachfunc_args args; GList *li; @@ -54,14 +54,14 @@ trg_model_remove_removed(GtkListStore * model, gint serial_column, args.currentSerial = currentSerial; args.serial_column = serial_column; gtk_tree_model_foreach(GTK_TREE_MODEL(model), - trg_model_remove_removed_foreachfunc, &args); + trg_model_remove_removed_foreachfunc, &args); if (args.toRemove != NULL) { - for (li = g_list_last(args.toRemove); li != NULL; - li = g_list_previous(li)) { - gtk_list_store_remove(model, (GtkTreeIter *) li->data); - gtk_tree_iter_free((GtkTreeIter *) li->data); - } - g_list_free(args.toRemove); + for (li = g_list_last(args.toRemove); li != NULL; + li = g_list_previous(li)) { + gtk_list_store_remove(model, (GtkTreeIter *) li->data); + gtk_tree_iter_free((GtkTreeIter *) li->data); + } + g_list_free(args.toRemove); } } @@ -74,32 +74,32 @@ struct find_existing_item_foreach_args { static gboolean find_existing_item_foreachfunc(GtkTreeModel * model, - GtkTreePath * path G_GNUC_UNUSED, - GtkTreeIter * iter, gpointer data) + GtkTreePath * path G_GNUC_UNUSED, + GtkTreeIter * iter, gpointer data) { - struct find_existing_item_foreach_args *args = (struct find_existing_item_foreach_args *) data; + struct find_existing_item_foreach_args *args = + (struct find_existing_item_foreach_args *) data; gint64 currentId; gtk_tree_model_get(model, iter, args->search_column, ¤tId, -1); if (currentId == args->id) { - args->iter = iter; - return args->found = TRUE; + args->iter = iter; + return args->found = TRUE; } return FALSE; } gboolean -find_existing_model_item(GtkTreeModel * model, gint search_column, gint64 id, - GtkTreeIter * iter) +find_existing_model_item(GtkTreeModel * model, gint search_column, + gint64 id, GtkTreeIter * iter) { struct find_existing_item_foreach_args args; args.id = id; args.found = FALSE; args.search_column = search_column; - gtk_tree_model_foreach(model, - find_existing_item_foreachfunc, &args); + gtk_tree_model_foreach(model, find_existing_item_foreachfunc, &args); if (args.found == TRUE) - *iter = *(args.iter); + *iter = *(args.iter); return args.found; } -- cgit v1.2.3