Re: Outstanding patches, #58330



"Matthias Clasen" <matthiasc poet de> writes:

> ----- Original Message -----
> From: "Tim Janik" <timj gtk org>
> To: "Matthias Clasen" <matthiasc poet de>
> Cc: "Gtk+ Developers" <gtk-devel-list gnome org>
> Sent: Monday, August 13, 2001 12:39 PM
> Subject: Re: Outstanding patches, #58330
> 
> 
> > On Mon, 13 Aug 2001, Matthias Clasen wrote:
> >
> > > Here is a patch removing unused debug flags, parallel to the
> debugging.txt
> > > update.
> > > Doing this lead to the discovery that some of the seemingly unused debug
> > > flags
> > > are in fact used only via GDK_NOTE/GTK_NOTE.
> >
> > actually pretty much all debug stuff should go through G?K_NOTE().
> 
> I guess some knowledge about this has been lost...
> the two major new widgets in gtk+-2.0 are the major violators of this rule:

Well, the thing is, these widgets mostly are using the debug flags
for validity checking, not messages.

Replacing:

  if (gtk_debug_flags & GTK_DEBUG_TEXT)
    _gtk_text_btree_check (tree);

With:

 GTK_NOTE (TEXT, _gtk_text_btree_check (tree));

Actually would work, since the defnition is:

#define GTK_NOTE(type,action)                G_STMT_START { \
    if (gtk_debug_flags & GTK_DEBUG_##type)                 \
       { action; };                          } G_STMT_END

But the name is more than a little confusing. What it was
meant for, was stuff like:

  GTK_NOTE(PLUGSOCKET,
	   g_message ("GtkSocket: Sending XEMBED message of type %d", message));
  
 
We always used gtk_debug_flags & ... for multiline checks and anything
more complicated than a g_message(). 

I don't see the current situation as a major problem ; we
could rename GTK_NOTE() to GTK_DEBUG(), and add a 
GTK_DEBUGGING() macro to allow us to write:

 if (GTK_DEBUGGING (TREE))

which would clean things up a bit, but doesn't really seem
that worth the work.

Regards,
                                        Owen

> gtkliststore.c:  if (gtk_debug_flags & GTK_DEBUG_TREE)
> gtkrbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TREE)
> gtkrbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TREE)
> gtkrbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TREE)
> gtkrbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TREE)
> gtkrbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TREE)
> gtkrbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TREE)
> gtkrbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TREE)
> gtkrbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TREE)
> gtkrbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TREE)
> gtktextbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextbtree.c:      if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextbtree.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextiter.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextsegment.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextsegment.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextsegment.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextsegment.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextsegment.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextsegment.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktextsegment.c:  if (gtk_debug_flags & GTK_DEBUG_TEXT)
> gtktreestore.c:  if (gtk_debug_flags & GTK_DEBUG_TREE)




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