gtk_button_arg



This is the Arg-function of the button widget (99.2):

static void
gtk_button_arg (GtkButton *button,
		GtkArg    *arg)
{
  if (strcmp (arg->name, "label") == 0)
    {
      GtkWidget *label;

      gtk_container_disable_resize (GTK_CONTAINER (button));

      if (button->child)
	gtk_widget_destroy (button->child);

      label = gtk_label_new (GTK_VALUE_STRING(*arg));
      gtk_widget_show (label);

      gtk_container_add (GTK_CONTAINER (button), label);
      gtk_container_enable_resize (GTK_CONTAINER (button));
    }
}

Is it correct, that the label argument of the button takes a string? I
would expect it to take a label widget. And I would expect the label
argument of gtk_label_arg function to take a string.

-- http://www.ping.de/sites/aibon/



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