diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-21 09:35:37 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-21 09:35:37 +0000 |
commit | 1771ddaa99b514314cd82f799a518271110466a4 (patch) | |
tree | 734016191eb84e2b12b286695d1d58e505a63c6b | |
parent | 4f5db899f8adcd9715bdd3926ae78e6db52d4c77 (diff) | |
download | gnunet-gtk-1771ddaa99b514314cd82f799a518271110466a4.tar.gz gnunet-gtk-1771ddaa99b514314cd82f799a518271110466a4.zip |
- storibng name in record + name visibility
-rw-r--r-- | src/gns/gnunet-gns-gtk_zone.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gns/gnunet-gns-gtk_zone.c b/src/gns/gnunet-gns-gtk_zone.c index 4f5989e4..1ab55cd4 100644 --- a/src/gns/gnunet-gns-gtk_zone.c +++ b/src/gns/gnunet-gns-gtk_zone.c | |||
@@ -40,7 +40,7 @@ enum | |||
40 | TREE_COL_EXP_TIME_AS_STR, | 40 | TREE_COL_EXP_TIME_AS_STR, |
41 | TREE_COL_VAL_AS_STR, | 41 | TREE_COL_VAL_AS_STR, |
42 | TREE_COL_VAL_COLOR, | 42 | TREE_COL_VAL_COLOR, |
43 | TREE_COL_NAME_IS_EDITABLE, | 43 | TREE_COL_NAME_IS_VISIBLE, |
44 | TREE_COL_IS_RECORD_ROW, | 44 | TREE_COL_IS_RECORD_ROW, |
45 | TREE_COL_NOT_DUMMY_ROW | 45 | TREE_COL_NOT_DUMMY_ROW |
46 | }; | 46 | }; |
@@ -100,6 +100,8 @@ GNUNET_GNS_GTK_type_cellrenderercombo_changed_cb (GtkCellRendererCombo *combo, | |||
100 | { | 100 | { |
101 | /* Adding a new record */ | 101 | /* Adding a new record */ |
102 | gtk_tree_store_insert_with_values(gns->ts, &child , &it, 0, | 102 | gtk_tree_store_insert_with_values(gns->ts, &child , &it, 0, |
103 | TREE_COL_NAME, name_str, | ||
104 | TREE_COL_NAME_IS_VISIBLE, FALSE, | ||
103 | TREE_COL_RECORD_TYPE, type, | 105 | TREE_COL_RECORD_TYPE, type, |
104 | TREE_COL_RECORD_TYPE_AS_STR, type_str, | 106 | TREE_COL_RECORD_TYPE_AS_STR, type_str, |
105 | TREE_COL_EXP_TIME_AS_STR, GNUNET_STRINGS_absolute_time_to_string (GNUNET_TIME_absolute_get_forever()), | 107 | TREE_COL_EXP_TIME_AS_STR, GNUNET_STRINGS_absolute_time_to_string (GNUNET_TIME_absolute_get_forever()), |
@@ -263,8 +265,9 @@ GNUNET_GNS_GTK_name_cellrenderertext_edited_cb (GtkCellRendererText *renderer, | |||
263 | /* add a new dummy line */ | 265 | /* add a new dummy line */ |
264 | gtk_tree_store_insert_with_values (gns->ts, &it,NULL, 0, | 266 | gtk_tree_store_insert_with_values (gns->ts, &it,NULL, 0, |
265 | TREE_COL_NAME, _(NEW_NAME_STR), | 267 | TREE_COL_NAME, _(NEW_NAME_STR), |
268 | TREE_COL_NAME_IS_VISIBLE, TRUE, | ||
266 | TREE_COL_RECORD_TYPE, 1, | 269 | TREE_COL_RECORD_TYPE, 1, |
267 | TREE_COL_NAME_IS_EDITABLE, 1, | 270 | TREE_COL_NAME_IS_VISIBLE, 1, |
268 | TREE_COL_NOT_DUMMY_ROW, GNUNET_NO, | 271 | TREE_COL_NOT_DUMMY_ROW, GNUNET_NO, |
269 | TREE_COL_IS_RECORD_ROW, GNUNET_NO, | 272 | TREE_COL_IS_RECORD_ROW, GNUNET_NO, |
270 | -1); | 273 | -1); |
@@ -565,7 +568,7 @@ void zone_iteration_proc (void *cls, | |||
565 | gtk_tree_store_append(zc_ctx->gns->ts, &iter_name, NULL); | 568 | gtk_tree_store_append(zc_ctx->gns->ts, &iter_name, NULL); |
566 | gtk_tree_store_set(zc_ctx->gns->ts, &iter_name, | 569 | gtk_tree_store_set(zc_ctx->gns->ts, &iter_name, |
567 | TREE_COL_NAME, name, | 570 | TREE_COL_NAME, name, |
568 | TREE_COL_NAME_IS_EDITABLE, 1, | 571 | TREE_COL_NAME_IS_VISIBLE, TRUE, |
569 | TREE_COL_RECORD_TYPE_AS_STR, _(NEW_RECORD_STR), | 572 | TREE_COL_RECORD_TYPE_AS_STR, _(NEW_RECORD_STR), |
570 | TREE_COL_IS_RECORD_ROW, GNUNET_NO, | 573 | TREE_COL_IS_RECORD_ROW, GNUNET_NO, |
571 | TREE_COL_NOT_DUMMY_ROW, GNUNET_YES, | 574 | TREE_COL_NOT_DUMMY_ROW, GNUNET_YES, |
@@ -607,7 +610,8 @@ void zone_iteration_proc (void *cls, | |||
607 | rd[c].data, | 610 | rd[c].data, |
608 | rd[c].data_size); | 611 | rd[c].data_size); |
609 | gtk_tree_store_insert_with_values(zc_ctx->gns->ts, &iter_record , &iter_name, 0, | 612 | gtk_tree_store_insert_with_values(zc_ctx->gns->ts, &iter_record , &iter_name, 0, |
610 | TREE_COL_NAME, "", | 613 | TREE_COL_NAME, name, |
614 | TREE_COL_NAME_IS_VISIBLE, FALSE, | ||
611 | TREE_COL_RECORD_TYPE, rd[c].record_type, | 615 | TREE_COL_RECORD_TYPE, rd[c].record_type, |
612 | TREE_COL_RECORD_TYPE_AS_STR, GNUNET_NAMESTORE_number_to_typename(rd[c].record_type), | 616 | TREE_COL_RECORD_TYPE_AS_STR, GNUNET_NAMESTORE_number_to_typename(rd[c].record_type), |
613 | TREE_COL_IS_PUBLIC, public, | 617 | TREE_COL_IS_PUBLIC, public, |
@@ -642,8 +646,8 @@ GNUNET_GNS_GTK_main_treeview_realize_cb (GtkWidget *widget, | |||
642 | /* Append a top level row and leave it empty */ | 646 | /* Append a top level row and leave it empty */ |
643 | gtk_tree_store_insert_with_values(gns->ts, &toplevel, NULL, 0, | 647 | gtk_tree_store_insert_with_values(gns->ts, &toplevel, NULL, 0, |
644 | TREE_COL_NAME, _(NEW_NAME_STR), | 648 | TREE_COL_NAME, _(NEW_NAME_STR), |
649 | TREE_COL_NAME_IS_VISIBLE, TRUE, | ||
645 | TREE_COL_RECORD_TYPE, 1, | 650 | TREE_COL_RECORD_TYPE, 1, |
646 | TREE_COL_NAME_IS_EDITABLE, 1, | ||
647 | TREE_COL_IS_RECORD_ROW, GNUNET_NO, | 651 | TREE_COL_IS_RECORD_ROW, GNUNET_NO, |
648 | TREE_COL_NOT_DUMMY_ROW, GNUNET_NO, | 652 | TREE_COL_NOT_DUMMY_ROW, GNUNET_NO, |
649 | -1); | 653 | -1); |