I don't understand this...





In GtkPaned the following is done:
==================================

static GtkType
gtk_paned_child_type (GtkContainer *container)
{
  if (!GTK_PANED (container)->child1 || !GTK_PANED (container)->child2)
    return GTK_TYPE_WIDGET;
  else
    return GTK_TYPE_NONE;
}


Why isn't it this?:
===================
static GtkType
gtk_paned_child_type (GtkContainer *container)
{
  if (GTK_PANED (container)->child1 || GTK_PANED (container)->child2)
    return GTK_TYPE_WIDGET;
  else
    return GTK_TYPE_NONE;
}



I would think that you would want to return that it was GTK_TYPE_WIDGET 
if either of the children are attached/set/valid?

Could someone explain the reason that the first is correct?


Robert (learning GTK) Kallal



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