diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-16 12:57:33 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-16 12:57:33 +0000 |
commit | 7bef69b82182b32ec182b6fec218cb0903bb1234 (patch) | |
tree | f5dd07da625397e99624ca369ed5e1028fdad715 | |
parent | 2084b973467537c755b320a23c5f986c6da3c9c8 (diff) | |
download | gnunet-gtk-7bef69b82182b32ec182b6fec218cb0903bb1234.tar.gz gnunet-gtk-7bef69b82182b32ec182b6fec218cb0903bb1234.zip |
- more changes
-rw-r--r-- | contrib/gnunet_gns_gtk_main_window.glade | 8 | ||||
-rw-r--r-- | src/gns/gnunet-gns-gtk_zone.c | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/contrib/gnunet_gns_gtk_main_window.glade b/contrib/gnunet_gns_gtk_main_window.glade index 440bd3d8..17929559 100644 --- a/contrib/gnunet_gns_gtk_main_window.glade +++ b/contrib/gnunet_gns_gtk_main_window.glade | |||
@@ -234,10 +234,10 @@ | |||
234 | <property name="sort_column_id">0</property> | 234 | <property name="sort_column_id">0</property> |
235 | <child> | 235 | <child> |
236 | <object class="GtkCellRendererText" id="GNUNET_GNS_GTK_name_cellrenderertext"> | 236 | <object class="GtkCellRendererText" id="GNUNET_GNS_GTK_name_cellrenderertext"> |
237 | <property name="editable">True</property> | ||
238 | <signal name="edited" handler="GNUNET_GNS_GTK_name_cellrenderertext_edited_cb" swapped="no"/> | 237 | <signal name="edited" handler="GNUNET_GNS_GTK_name_cellrenderertext_edited_cb" swapped="no"/> |
239 | </object> | 238 | </object> |
240 | <attributes> | 239 | <attributes> |
240 | <attribute name="editable">9</attribute> | ||
241 | <attribute name="text">0</attribute> | 241 | <attribute name="text">0</attribute> |
242 | </attributes> | 242 | </attributes> |
243 | </child> | 243 | </child> |
@@ -275,6 +275,10 @@ | |||
275 | <property name="text_column">1</property> | 275 | <property name="text_column">1</property> |
276 | <signal name="changed" handler="GNUNET_GNS_GTK_type_cellrenderercombo_changed_cb" swapped="no"/> | 276 | <signal name="changed" handler="GNUNET_GNS_GTK_type_cellrenderercombo_changed_cb" swapped="no"/> |
277 | </object> | 277 | </object> |
278 | <attributes> | ||
279 | <attribute name="text">3</attribute> | ||
280 | <attribute name="has-entry">2</attribute> | ||
281 | </attributes> | ||
278 | </child> | 282 | </child> |
279 | </object> | 283 | </object> |
280 | </child> | 284 | </child> |
@@ -345,6 +349,8 @@ | |||
345 | <column type="gchararray"/> | 349 | <column type="gchararray"/> |
346 | <!-- column-name value_color --> | 350 | <!-- column-name value_color --> |
347 | <column type="gchararray"/> | 351 | <column type="gchararray"/> |
352 | <!-- column-name name_is_editable --> | ||
353 | <column type="gboolean"/> | ||
348 | </columns> | 354 | </columns> |
349 | </object> | 355 | </object> |
350 | <object class="GtkListStore" id="GNUNET_GNS_GTK_type_liststore"> | 356 | <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 1fcdef24..95e980e8 100644 --- a/src/gns/gnunet-gns-gtk_zone.c +++ b/src/gns/gnunet-gns-gtk_zone.c | |||
@@ -39,6 +39,7 @@ enum | |||
39 | TREE_COL_EXP_TIME_AS_STR, | 39 | TREE_COL_EXP_TIME_AS_STR, |
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 | }; | 43 | }; |
43 | 44 | ||
44 | /** | 45 | /** |
@@ -179,6 +180,7 @@ GNUNET_GNS_GTK_name_cellrenderertext_edited_cb (GtkCellRendererText *renderer, | |||
179 | gtk_tree_store_insert_with_values (gns->ts, &it,NULL, 0, | 180 | gtk_tree_store_insert_with_values (gns->ts, &it,NULL, 0, |
180 | TREE_COL_NAME, _(NEW_RECORD_STR), | 181 | TREE_COL_NAME, _(NEW_RECORD_STR), |
181 | TREE_COL_RECORD_TYPE, 1, | 182 | TREE_COL_RECORD_TYPE, 1, |
183 | TREE_COL_NAME_IS_EDITABLE, 1, | ||
182 | -1); | 184 | -1); |
183 | #if 0 | 185 | #if 0 |
184 | gtk_tree_store_append(gns->ts, &it, NULL); | 186 | gtk_tree_store_append(gns->ts, &it, NULL); |
@@ -266,8 +268,10 @@ void zone_iteration_proc (void *cls, | |||
266 | */ | 268 | */ |
267 | gtk_tree_store_set(zc_ctx->gns->ts, &iter_name, | 269 | gtk_tree_store_set(zc_ctx->gns->ts, &iter_name, |
268 | TREE_COL_NAME, name, | 270 | TREE_COL_NAME, name, |
271 | TREE_COL_NAME_IS_EDITABLE, 1, | ||
269 | -1); | 272 | -1); |
270 | 273 | ||
274 | |||
271 | /* Append elements for records */ | 275 | /* Append elements for records */ |
272 | for (c = 0; c < rd_count; c ++) | 276 | for (c = 0; c < rd_count; c ++) |
273 | { | 277 | { |
@@ -298,7 +302,8 @@ void zone_iteration_proc (void *cls, | |||
298 | 302 | ||
299 | gtk_tree_store_insert_with_values(zc_ctx->gns->ts, &iter_record , &iter_name, 0, | 303 | gtk_tree_store_insert_with_values(zc_ctx->gns->ts, &iter_record , &iter_name, 0, |
300 | TREE_COL_NAME, "", | 304 | TREE_COL_NAME, "", |
301 | TREE_COL_RECORD_TYPE, 4, | 305 | TREE_COL_RECORD_TYPE, rd[c].record_type, |
306 | TREE_COL_EXP_TIME_AS_STR, GNUNET_NAMESTORE_number_to_typename(rd[c].record_type), | ||
302 | TREE_COL_IS_PUBLIC, public, | 307 | TREE_COL_IS_PUBLIC, public, |
303 | TREE_COL_EXP_TIME_AS_STR, exp, | 308 | TREE_COL_EXP_TIME_AS_STR, exp, |
304 | TREE_COL_EXP_TIME_IS_REL, time_is_relative, | 309 | TREE_COL_EXP_TIME_IS_REL, time_is_relative, |
@@ -331,6 +336,7 @@ GNUNET_GNS_GTK_main_treeview_realize_cb (GtkWidget *widget, | |||
331 | gtk_tree_store_insert_with_values(gns->ts, &toplevel, NULL, 0, | 336 | gtk_tree_store_insert_with_values(gns->ts, &toplevel, NULL, 0, |
332 | TREE_COL_NAME, _(NEW_RECORD_STR), | 337 | TREE_COL_NAME, _(NEW_RECORD_STR), |
333 | TREE_COL_RECORD_TYPE, 1, | 338 | TREE_COL_RECORD_TYPE, 1, |
339 | TREE_COL_NAME_IS_EDITABLE, 1, | ||
334 | -1); | 340 | -1); |
335 | 341 | ||
336 | zc_ctx = GNUNET_malloc (sizeof (struct ZoneIteration_Context)); | 342 | zc_ctx = GNUNET_malloc (sizeof (struct ZoneIteration_Context)); |