GNOME Bugzilla – Bug 432996
glade doesn't allow adding other to Statusbar
Last modified: 2013-05-20 08:03:33 UTC
According to gtk docs, Statusbar is a HBox so it should be possible to pack other widgets inside it, yet glade doesn't allow this.
Actually you are able to add widgets to statusbar but the widgets (buttons, labels etc.) don't show up in your application. You can add widgets to statusbar by pointing "resize grip" portion of statusbar (first select widget from palette and then click resize grip portion of statusbar). The widgets will show up in glade but they are missing from your application. I don't know if this is glade bug or libglade bug. Perhaps libglade is not able to load and create all the widgets that are specified in *.glade files. I am using ubuntu feisty (7.04) and all the packages (gtk, glade, pygtk, python) are from official ubuntu repositories. This is example snippet from xml file produced by glade 3.2.0: ... <child> <widget class="GtkStatusbar" id="statusbar"> <property name="visible">True</property> <child> <widget class="GtkColorButton" id="colorbutton1"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="color">#000000000000</property> </widget> <packing> <property name="position">1</property> </packing> </child> <child> <widget class="GtkSpinButton" id="spinbutton1"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="adjustment">0 0 100 1 10 10</property> </widget> <packing> <property name="position">2</property> </packing> </child> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> <property name="position">3</property> </packing> </child> ... As you can see there are two widgets in statusbar (spinbutton and colorbutton). I can see these widgets in glade but not in my application when I run it from my python script. Teemu
I just wanted to add one more comment on this subject. I am able to add widgets to statusbar if I create GUI manually. Every thing works great! This has to be Glade/libglade problem. Teemu PS: I have tested Glade2 and Glade3 on linux and windows (+pygtk). There is no differences in behavior.
It is a bug in libglade. I have just posted it (#475213) with a fix. It is a one-line change so it shouldn't take long to get into release ;-) After this change to libglade, widgets added with glade3 are properly shown in statusbar. However, it is pretty tricky to add a widget into statusbar... I would never figure it out without hints form this bug. Regards
This works well with current git master & GtkBuilder. Closing.