Re: GtkUIManager comment



On Fri, 2004-11-12 at 13:05 +0100, Sven Neumann wrote:
> 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().

I think its a programming error, but I'm not 100% sure, thats why I
asked here.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a one-legged day-dreaming Green Beret haunted by memories of 'Nam. She's 
a tortured motormouth opera singer from aristocratic European stock. They 
fight crime! 




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