diff options
author | Lucas Rocha <lucasr@gnome.org> | 2008-04-10 09:57:14 +0000 |
---|---|---|
committer | Lucas Almeida Rocha <lucasr@src.gnome.org> | 2008-04-10 09:57:14 +0000 |
commit | a740e32652506eb82fd2a20623dd996ed3bd1ae7 (patch) | |
tree | ca3db547571bf260fe1e73d38d300632a33f415a | |
parent | fix memory leak on custom labels (Fixes bug #526627). Patch by (diff) | |
download | zenity-a740e32652506eb82fd2a20623dd996ed3bd1ae7.tar.gz zenity-a740e32652506eb82fd2a20623dd996ed3bd1ae7.tar.bz2 zenity-a740e32652506eb82fd2a20623dd996ed3bd1ae7.zip |
use g_value_dup_string when applicable (Fixes bug #527258). Patch from
2008-04-10 Lucas Rocha <lucasr@gnome.org>
* src/tree.c (zenity_tree_dialog_get_selected,
zenity_tree_dialog_toggle_get_selected): use g_value_dup_string when
applicable (Fixes bug #527258). Patch from kraai@ftbfs.org.
svn path=/trunk/; revision=1352
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/tree.c | 8 |
2 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,9 @@ +2008-04-10 Lucas Rocha <lucasr@gnome.org> + + * src/tree.c (zenity_tree_dialog_get_selected, + zenity_tree_dialog_toggle_get_selected): use g_value_dup_string when + applicable (Fixes bug #527258). Patch from kraai@ftbfs.org. + 2008-03-30 Lucas Rocha <lucasr@gnome.org> * src/msg.c (zenity_msg_construct_question_dialog): fix memory leak on @@ -516,7 +516,7 @@ zenity_tree_dialog_get_selected (GtkTreeModel *model, GtkTreePath *path_buf, Gtk for (i = 0; i < n_columns; i++) { gtk_tree_model_get_value (model, iter, i, &value); - selected = g_slist_append (selected, g_strdup (g_value_get_string (&value))); + selected = g_slist_append (selected, g_value_dup_string (&value)); g_value_unset (&value); } return; @@ -525,7 +525,7 @@ zenity_tree_dialog_get_selected (GtkTreeModel *model, GtkTreePath *path_buf, Gtk for (i = 0; print_columns[i] != 0; i++) { gtk_tree_model_get_value (model, iter, print_columns[i] - 1, &value); - selected = g_slist_append (selected, g_strdup (g_value_get_string (&value))); + selected = g_slist_append (selected, g_value_dup_string (&value)); g_value_unset (&value); } } @@ -547,7 +547,7 @@ zenity_tree_dialog_toggle_get_selected (GtkTreeModel *model, GtkTreePath *path, for (i = 1; i < n_columns; i++) { gtk_tree_model_get_value (model, iter, i, &value); - selected = g_slist_append (selected, g_strdup (g_value_get_string (&value))); + selected = g_slist_append (selected, g_value_dup_string (&value)); g_value_unset (&value); } g_value_unset (&toggle_value); @@ -557,7 +557,7 @@ zenity_tree_dialog_toggle_get_selected (GtkTreeModel *model, GtkTreePath *path, for (i = 0; print_columns[i] != 0; i++) { gtk_tree_model_get_value (model, iter, print_columns[i] - 1, &value); - selected = g_slist_append (selected, g_strdup (g_value_get_string (&value))); + selected = g_slist_append (selected, g_value_dup_string (&value)); g_value_unset (&value); } } |