Re: GtkExpander label widgets (using buttons as)



David Caldwell wrote:
[...]
Can you reproduce this misbehaviour in a brief code segment and post
it ?

My last snippet was perhaps too snipped. Here is a complete program you should
just be able to compile up and test.

Indeed its broken,

Strangely, when I do these steps in the builder (experimental glade-3):
    o Create an expander
    o Delete the label widget
    o Add a hbox in its place
    o Add a label and two buttons

The buttons work fine... BUT, if I save & reload the project
then I experience the same problem as in your test case...

So I tried adding this hack to your program:

==========================================
gboolean
hacked_idle (GtkWidget *hbox)
{
    g_object_ref (G_OBJECT (hbox));
    gtk_expander_set_label_widget (GTK_EXPANDER (expander), NULL);

    gtk_expander_set_label_widget (GTK_EXPANDER (expander), hbox);
    g_object_unref (G_OBJECT (hbox));

    return FALSE;
}
==========================================

By removing and re-adding the hbox *after* realization time we can
work around the problem (it works now).

Can you do us all a favor and enter a bug at bugzilla.gnome.org
under GTK+ and put down these details ?

Cheers,
                                  -Tristan



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