aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-03-16 14:42:12 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-03-16 14:42:12 +0000
commitd7478e3a7043849a3dadf13a8cf6715386470489 (patch)
treeb87d45484671d87d77f2528791a59cd994ec1522
parentc95431fb48da383d3c5ec84a0285384a71436f00 (diff)
downloadgnunet-gtk-d7478e3a7043849a3dadf13a8cf6715386470489.tar.gz
gnunet-gtk-d7478e3a7043849a3dadf13a8cf6715386470489.zip
- visibility changes for name row
-rw-r--r--contrib/gnunet_gns_gtk_main_window.glade5
-rw-r--r--src/gns/gnunet-gns-gtk_zone.c20
2 files changed, 18 insertions, 7 deletions
diff --git a/contrib/gnunet_gns_gtk_main_window.glade b/contrib/gnunet_gns_gtk_main_window.glade
index 649d5af7..165267c0 100644
--- a/contrib/gnunet_gns_gtk_main_window.glade
+++ b/contrib/gnunet_gns_gtk_main_window.glade
@@ -254,6 +254,7 @@
254 <signal name="toggled" handler="GNUNET_GNS_GTK_ispublic_cellrenderertoggle_toggled_cb" swapped="no"/> 254 <signal name="toggled" handler="GNUNET_GNS_GTK_ispublic_cellrenderertoggle_toggled_cb" swapped="no"/>
255 </object> 255 </object>
256 <attributes> 256 <attributes>
257 <attribute name="visible">10</attribute>
257 <attribute name="active">1</attribute> 258 <attribute name="active">1</attribute>
258 </attributes> 259 </attributes>
259 </child> 260 </child>
@@ -293,6 +294,7 @@
293 <signal name="edited" handler="GNUNET_GNS_GTK_expiration_cellrenderertext_edited_cb" swapped="no"/> 294 <signal name="edited" handler="GNUNET_GNS_GTK_expiration_cellrenderertext_edited_cb" swapped="no"/>
294 </object> 295 </object>
295 <attributes> 296 <attributes>
297 <attribute name="visible">10</attribute>
296 <attribute name="text">6</attribute> 298 <attribute name="text">6</attribute>
297 </attributes> 299 </attributes>
298 </child> 300 </child>
@@ -310,6 +312,7 @@
310 <signal name="edited" handler="GNUNET_GNS_GTK_value_cellrenderertext_edited_cb" swapped="no"/> 312 <signal name="edited" handler="GNUNET_GNS_GTK_value_cellrenderertext_edited_cb" swapped="no"/>
311 </object> 313 </object>
312 <attributes> 314 <attributes>
315 <attribute name="visible">10</attribute>
313 <attribute name="background">8</attribute> 316 <attribute name="background">8</attribute>
314 <attribute name="text">7</attribute> 317 <attribute name="text">7</attribute>
315 </attributes> 318 </attributes>
@@ -350,6 +353,8 @@
350 <column type="gchararray"/> 353 <column type="gchararray"/>
351 <!-- column-name name_is_editable --> 354 <!-- column-name name_is_editable -->
352 <column type="gboolean"/> 355 <column type="gboolean"/>
356 <!-- column-name name_row -->
357 <column type="gboolean"/>
353 </columns> 358 </columns>
354 </object> 359 </object>
355 <object class="GtkListStore" id="GNUNET_GNS_GTK_type_liststore"> 360 <object class="GtkListStore" id="GNUNET_GNS_GTK_type_liststore">
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
45enum 46enum
@@ -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);