<object class="GtkTreeSelection" id="treeview-selection1"/>
</child>
<child>
- <object class="GtkTreeViewColumn" id="sensor_name1">
+ <object class="GtkTreeViewColumn" id="sensor_name_col">
<property name="title" translatable="yes">Name</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext1"/>
</object>
<object class="GtkListStore" id="sensors_liststore">
<columns>
- <!-- column-name Sensor Name -->
+ <!-- column-name Name -->
<column type="gchararray"/>
+ <!-- column-name Sensor -->
+ <column type="gpointer"/>
</columns>
</object>
</interface>
#endif
enum {
- COL_NAME = 0
+ COL_NAME = 0,
+ COL_SENSOR
};
struct sensor_pref {
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);