From 781fdffbb2c5e66c10a58b9deef9c909f6b070b4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Mon, 1 Apr 2013 09:39:47 +0000 Subject: [PATCH] style --- src/ui_sensorlist.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ui_sensorlist.c b/src/ui_sensorlist.c index 3a9e988..3de10f7 100644 --- a/src/ui_sensorlist.c +++ b/src/ui_sensorlist.c @@ -141,13 +141,15 @@ get_sensor_at_pos(GtkTreeView *view, int x, int y, struct ui_psensor *ui) */ static int get_col_index_at_pos(GtkTreeView *view, int x) { - GList *columns = gtk_tree_view_get_columns(view); - GList *node; - int colx = 0; - int coli = 0; - - for (node = columns; node; node = node->next) { - GtkTreeViewColumn *checkcol = (GtkTreeViewColumn *) node->data; + GList *cols, *node; + int colx, coli; + GtkTreeViewColumn *checkcol; + + cols = gtk_tree_view_get_columns(view); + colx = 0; + coli = 0; + for (node = cols; node; node = node->next) { + checkcol = (GtkTreeViewColumn *) node->data; if (x >= colx && x < (colx + gtk_tree_view_column_get_width(checkcol))) -- 2.7.4