summaryrefslogtreecommitdiff
path: root/src/trg-model.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-02-18 00:49:08 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-02-18 00:49:08 +0000
commit8aacf43b3b4f21247a63b8301c952c6a8c98585e (patch)
treed2dc275b7d2672390ab9eeb1adffaf5953a4981d /src/trg-model.c
parentbfff941cb7fdb428de57971831e39e3cf660112b (diff)
adding trackers now seems to work. change all tabs to whitespace.
Diffstat (limited to 'src/trg-model.c')
-rw-r--r--src/trg-model.c46
1 files changed, 23 insertions, 23 deletions
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, &currentId, -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;
}