diff options
Diffstat (limited to 'src/gns/gnunet-gns-gtk_zone.c')
-rw-r--r-- | src/gns/gnunet-gns-gtk_zone.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/gns/gnunet-gns-gtk_zone.c b/src/gns/gnunet-gns-gtk_zone.c index 319061ef..90a7f76f 100644 --- a/src/gns/gnunet-gns-gtk_zone.c +++ b/src/gns/gnunet-gns-gtk_zone.c | |||
@@ -40,6 +40,7 @@ enum | |||
40 | TREE_COL_VAL_AS_STR, | 40 | TREE_COL_VAL_AS_STR, |
41 | TREE_COL_VAL_COLOR, | 41 | TREE_COL_VAL_COLOR, |
42 | TREE_COL_NAME_IS_EDITABLE, | 42 | TREE_COL_NAME_IS_EDITABLE, |
43 | TREE_COL_IS_NAME_ROW, | ||
43 | }; | 44 | }; |
44 | 45 | ||
45 | enum | 46 | enum |
@@ -85,13 +86,16 @@ GNUNET_GNS_GTK_type_cellrenderercombo_changed_cb (GtkCellRendererCombo *combo, | |||
85 | 86 | ||
86 | /* check if value is still valid */ | 87 | /* check if value is still valid */ |
87 | gtk_tree_model_get(tm, &it, TREE_COL_VAL_AS_STR, &value_str, -1); | 88 | gtk_tree_model_get(tm, &it, TREE_COL_VAL_AS_STR, &value_str, -1); |
88 | if (GNUNET_OK != GNUNET_NAMESTORE_string_to_value (type, | 89 | if (NULL != value_str) |
89 | value_str, | 90 | { |
90 | &data, | 91 | if (GNUNET_OK != GNUNET_NAMESTORE_string_to_value (type, |
91 | &data_size)) | 92 | value_str, |
92 | gtk_tree_store_set (gns->ts, &it, TREE_COL_VAL_COLOR, "red", -1); | 93 | &data, |
93 | else | 94 | &data_size)) |
94 | gtk_tree_store_set (gns->ts, &it, TREE_COL_VAL_COLOR, NULL, -1); | 95 | gtk_tree_store_set (gns->ts, &it, TREE_COL_VAL_COLOR, "red", -1); |
96 | else | ||
97 | gtk_tree_store_set (gns->ts, &it, TREE_COL_VAL_COLOR, NULL, -1); | ||
98 | } | ||
95 | } | 99 | } |
96 | 100 | ||
97 | 101 | ||
@@ -303,6 +307,7 @@ void zone_iteration_proc (void *cls, | |||
303 | gtk_tree_store_set(zc_ctx->gns->ts, &iter_name, | 307 | gtk_tree_store_set(zc_ctx->gns->ts, &iter_name, |
304 | TREE_COL_NAME, name, | 308 | TREE_COL_NAME, name, |
305 | TREE_COL_NAME_IS_EDITABLE, 1, | 309 | TREE_COL_NAME_IS_EDITABLE, 1, |
310 | TREE_COL_IS_NAME_ROW, 1 | ||
306 | -1); | 311 | -1); |
307 | 312 | ||
308 | 313 | ||
@@ -342,6 +347,7 @@ void zone_iteration_proc (void *cls, | |||
342 | TREE_COL_EXP_TIME_AS_STR, exp, | 347 | TREE_COL_EXP_TIME_AS_STR, exp, |
343 | TREE_COL_EXP_TIME_IS_REL, time_is_relative, | 348 | TREE_COL_EXP_TIME_IS_REL, time_is_relative, |
344 | TREE_COL_VAL_AS_STR, val, | 349 | TREE_COL_VAL_AS_STR, val, |
350 | TREE_COL_IS_NAME_ROW, 0 | ||
345 | -1); | 351 | -1); |
346 | 352 | ||
347 | GNUNET_free (exp); | 353 | GNUNET_free (exp); |