Re: gtk-demo's patch



German Poo Caaman~o <gpoo ubiobio cl> writes:

> I was following the editable_cells.c code of gtk-demo to implement
> a GtkTreeView editable.  After fight a little, I was discover a
> little bug on definition of old_text variable.  However, it doesn't
> have a useful in the program, but confuse.
> 
> May I commit?

This chnage looks right. But old_text will need to be freed afterwords
as well.  
                                        Owen

> Index: editable_cells.c
> ===================================================================
> RCS file: /cvs/gnome/gtk+/demos/gtk-demo/editable_cells.c,v
> retrieving revision 1.2
> diff -u -3 -r1.2 editable_cells.c
> --- editable_cells.c	2001/11/28 21:19:39	1.2
> +++ editable_cells.c	2002/01/13 02:27:10
> @@ -152,13 +152,13 @@
>    GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
>    GtkTreeIter iter;
>    
> -  gchar old_text[256]; /* ugly? */
> +  gchar *old_text;
>    gint *column;
>    
>    column = g_object_get_data (G_OBJECT (cell), "column");
>  
>    gtk_tree_model_get_iter (model, &iter, path);
> -  gtk_tree_model_get (model, &iter, column, old_text, -1);
> +  gtk_tree_model_get (model, &iter, column, &old_text, -1);
>  
>    switch ((gint) column)
>      {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]