[Glade-users] glade 2.0.1 open .glade file skips width_request and height_request
Kevin R. Bulgrien
kbulgrien@worldnet.att.net
Thu, 2 Sep 2004 11:57:54 -0500
On Thursday 02 September 2004 08:17, Damon Chaplin wrote:
> On Wed, 2004-09-01 at 17:15, Kevin R. Bulgrien wrote:
> > I've searched around and am surprised not to have found any previous
> > posts for this issue. The only ones I saw were related to glade--.
> >
> > I am using 2.0.1 that comes on Mandrake 10.0 Official, and I've tried
> > compiling 2.5, but it doesn't care for gtk+2.0-2.2.4-9 and I don't really
> > feel energetic enough to upgrade GTK today.
> >
> > I created a test project to learn how to use Glade, and have quickly
> > realized that you really have to do all your tweaking in one session
> > because when you shutdown and come back later, glade will not read
> > back the project as I left it.
> >
> > Here is a snippet from my project .glade file.
> >
> > <child>
> > <widget class="GtkButton" id="pushbutton">
> > <property name="width_request">50</property>
> > <property name="height_request">29</property>
> > <property name="visible">True</property>
> > <property name="can_default">True</property>
> > <property name="can_focus">True</property>
> > <property name="label"
> > translatable="yes">Push</property>
> > <property name="use_underline">True</property>
> > <property
> > name="relief">GTK_RELIEF_NORMAL</property> <accessibility>
> > <atkrelation target="huhbutton"
> > type="controller-for"/>
> > </accessibility>
> > <signal name="clicked"
> > handler="on_pushbutton_clicked" last_modification_time="Tue, 31 Aug 200
> > 4 03:05:04 GMT"/>
> > </widget>
> > </child>
> >
> > The width_request and height_request entries will not get loaded into
> > the properties dialog. If you twiddle with the widget and save it again,
> > the .glade file is overwritten and that widget's height and width
> > settings will be gone.
>
> I can't reproduce this yet. What container widget is the button in?
> (A GtkHBox/GtkTable/GtkFixed?)
>
> Damon
GtkHButtonBox, here is the basic structure of the file.
It also turns out that the size information is not loaded for the button box
either... not just the buttons inside it.
I don't mind forwarding the entire file (13K). I have two of them in
the file, and the buttons inside them both exhibit this behavior.
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
<widget class="GtkWindow" id="window">
<child>
<widget class="GtkVBox" id="vbox1">
<child>
<widget class="GtkMenuBar" id="menubar">
<child>
<widget class="GtkMenuItem" id="filemenu">
<child>
<widget class="GtkMenu" id="filemenu_menu">
<child>
<widget class="GtkImageMenuItem" id="quit">
<child>
<widget class="GtkMenuItem" id="helpmenu">
<child>
<widget class="GtkMenu" id="helpmenu_menu">
<child>
<widget class="GtkMenuItem" id="about">
<child>
<widget class="GtkHBox" id="hbox1">
<child>
<widget class="GtkHBox" id="hbox3">
<child>
<widget class="GtkHButtonBox" id="hbuttonbox1">
<child>
<widget class="GtkButton" id="pushbutton">
<child>
<widget class="GtkButton" id="huhbutton">
<child>
<widget class="GtkButton" id="yeahbutton">
<child>
<widget class="GtkVBox" id="vbox4">
<child>
<widget class="GtkLabel" id="label1">
<child>
<widget class="GtkLabel" id="label2">
<child>
<widget class="GtkHButtonBox" id="hbuttonbox2">
<child>
<widget class="GtkButton" id="whatbutton">
<child>
<widget class="GtkButton" id="andbutton">
<child>
<widget class="GtkButton" id="whobutton">
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow7">
<child>
<widget class="GtkViewport" id="viewport1">
<child>
<widget class="GtkImage" id="image1">
<child>
<widget class="GtkHBox" id="hbox2">
<child>
<widget class="GtkVBox" id="vbox3">
<child>
<widget class="GtkLabel" id="label3">
<child>
<widget class="GtkLabel" id="label4">