diff options
author | Jonathan Blandford <jrb@redhat.com> | 2000-10-13 00:34:38 +0000 |
---|---|---|
committer | Jonathan Blandford <jrb@src.gnome.org> | 2000-10-13 00:34:38 +0000 |
commit | 829872e94821c1abfb5c5a8b6dcd383c18302474 (patch) | |
tree | a09889ffde9b3aedadc3eabe27d5f98a938d819a /gtk/gtktreedatalist.c | |
parent | c659596e223245c7253ca2f65e9bdbc5df10789e (diff) | |
download | gtk+-829872e94821c1abfb5c5a8b6dcd383c18302474.tar.gz |
Added values other then G_TYPE_STRING. Minor commenting updates. Format
2000-10-12 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreedatalist.[ch] (gtk_tree_data_list_value_to_node): Added
values other then G_TYPE_STRING.
* gtk/gtktreeselection.c: Minor commenting updates.
* gtk/gtktreeview.c: Format updates.
Diffstat (limited to 'gtk/gtktreedatalist.c')
-rw-r--r-- | gtk/gtktreedatalist.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gtk/gtktreedatalist.c b/gtk/gtktreedatalist.c index 47f022fc1c..e8a1cab7ae 100644 --- a/gtk/gtktreedatalist.c +++ b/gtk/gtktreedatalist.c @@ -136,9 +136,30 @@ gtk_tree_data_list_node_to_value (GtkTreeDataList *list, switch (type) { + case G_TYPE_BOOLEAN: + g_value_set_boolean (value, (gboolean) list->data.v_int); + break; + case G_TYPE_CHAR: + g_value_set_char (value, list->data.v_char); + break; + case G_TYPE_UCHAR: + g_value_set_uchar (value, list->data.v_uchar); + break; + case G_TYPE_INT: + g_value_set_int (value, list->data.v_int); + break; + case G_TYPE_UINT: + g_value_set_uint (value, list->data.v_uint); + break; + case G_TYPE_FLOAT: + g_value_set_float (value, list->data.v_float); + break; case G_TYPE_STRING: g_value_set_string (value, (gchar *) list->data.v_pointer); break; + case G_TYPE_OBJECT: + g_value_set_object (value, (GObject *) list->data.v_pointer); + break; } } @@ -148,12 +169,34 @@ gtk_tree_data_list_value_to_node (GtkTreeDataList *list, { switch (value->g_type) { + case G_TYPE_BOOLEAN: + list->data.v_int = g_value_get_boolean (value); + break; + case G_TYPE_CHAR: + list->data.v_char = g_value_get_char (value); + break; + case G_TYPE_UCHAR: + list->data.v_uchar = g_value_get_uchar (value); + break; + case G_TYPE_INT: + list->data.v_int = g_value_get_int (value); + break; + case G_TYPE_UINT: + list->data.v_uint = g_value_get_uint (value); + break; + case G_TYPE_FLOAT: + list->data.v_float = g_value_get_float (value); + break; case G_TYPE_STRING: list->data.v_pointer = g_value_dup_string (value); break; + case G_TYPE_OBJECT: + list->data.v_pointer = g_value_dup_object (value); + break; default: g_warning ("Unsupported type (%s) stored.", g_type_name (value->g_type)); return; } } + |