projects
/
psensor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4e7224b
)
style
author
Jean-Philippe Orsini
<jeanfi@gmail.com>
Mon, 1 Apr 2013 09:39:47 +0000
(09:39 +0000)
committer
Jean-Philippe Orsini
<jeanfi@gmail.com>
Mon, 1 Apr 2013 09:39:47 +0000
(09:39 +0000)
src/ui_sensorlist.c
patch
|
blob
|
history
diff --git
a/src/ui_sensorlist.c
b/src/ui_sensorlist.c
index
3a9e988
..
3de10f7
100644
(file)
--- 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)
{
*/
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)))
if (x >= colx &&
x < (colx + gtk_tree_view_column_get_width(checkcol)))