From 2a05d2c097a57b33c203e9e14fe51887c7456ead Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Tue, 2 Apr 2013 06:59:38 +0000 Subject: [PATCH] added col with a pointer to the sensor struct --- src/glade/sensor-edit.glade | 6 ++++-- src/ui_sensorpref.c | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/glade/sensor-edit.glade b/src/glade/sensor-edit.glade index 5c98616..a2b6b34 100644 --- a/src/glade/sensor-edit.glade +++ b/src/glade/sensor-edit.glade @@ -82,7 +82,7 @@ - + Name @@ -569,8 +569,10 @@ - + + + diff --git a/src/ui_sensorpref.c b/src/ui_sensorpref.c index 01ea462..c9f31b3 100644 --- a/src/ui_sensorpref.c +++ b/src/ui_sensorpref.c @@ -31,7 +31,8 @@ #endif enum { - COL_NAME = 0 + COL_NAME = 0, + COL_SENSOR }; struct sensor_pref { @@ -526,7 +527,10 @@ void ui_sensorpref_dialog_run(struct psensor *sensor, struct ui_psensor *ui) for (s_cur = ui->sensors; *s_cur; s_cur++) { s = *s_cur; gtk_list_store_append(store, &iter); - gtk_list_store_set(store, &iter, COL_NAME, s->name, -1); + gtk_list_store_set(store, &iter, + COL_NAME, s->name, + COL_SENSOR, s, + -1); } selection = gtk_tree_view_get_selection(w_sensors_list); -- 2.7.4