Re: GtkUIManager comment



Hi,

Alexander Larsson <alexl redhat com> writes:

> I just wasted some time tracking down a bug due to the misstyping of a
> GtkUIManager path. Any chance something like this could be applied to
> avoid such problems in the future:
>
> diff -u -p -r1.62 gtkuimanager.c
> --- gtk/gtkuimanager.c  28 Oct 2004 15:00:05 -0000      1.62
> +++ gtk/gtkuimanager.c  12 Nov 2004 07:55:17 -0000
> @@ -1581,7 +1581,10 @@ gtk_ui_manager_add_ui (GtkUIManager     
>    node = get_node (self, path, NODE_TYPE_UNDECIDED, FALSE);
>    
>    if (node == NULL)
> -    return;
> +    {
> +      g_warning ("Trying to add UI to non-existing path '%s'", path); 
> +      return;
> +    }

Is this truly a programming error? Otherwise, g_printerr() would
probably be a better choice than g_warning().


Sven



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