[Glade-devel] Re: [Glade3] GtkBoxes (eg vbox) not loading properly [PATCH]



--Boundary_(ID_lFBSjn36VsIw3nbbg4KTuQ)
Content-type: text/plain
Content-transfer-encoding: 7BIT

Patch is now attached! :)
-Shane

On Tue, 2004-05-18 at 16:37, Shane Butler wrote:
Hi guys,

Here is a patch to fix a problem in the loading of vboxes, etc. When
loading a .glade file that had a vbox you would get it would be bigger
than it should have been. Actually only gtkbox.xml had to be changed so
that the Default size of 3 was an OptionalDefault and the Min size was
1.

Can someone with CVS pls review.

Regards, Shane
-- 
Shane Butler <shane_b users sourceforge net>

--Boundary_(ID_lFBSjn36VsIw3nbbg4KTuQ)
Content-type: text/x-patch; name=glade3-vboxbug.patch; charset=UTF-8
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=glade3-vboxbug.patch

Index: glade3/ChangeLog
===================================================================
RCS file: /cvs/gnome/glade3/ChangeLog,v
retrieving revision 1.293
diff -u -r1.293 ChangeLog
--- glade3/ChangeLog    16 May 2004 19:40:04 -0000      1.293
+++ glade3/ChangeLog    18 May 2004 06:24:41 -0000
@@ -1,3 +1,7 @@
+2004-05-18  Shane Butler  <shane_b users sourceforge net>
+
+       * widgets/gtkbox.xml: Fixed bug with loading GtkBoxes where too many items were added. Changed the 
Default to an OptionalDefault and set the Min to 1.
+
 2004-05-16  Joaquin Cuenca Abela  <e98cuenc yahoo com>
 
        * src/glade-menu-editor.c, glade-project-window.c, glade-utils.[ch]:
Index: glade3/widgets/gtkbox.xml
===================================================================
RCS file: /cvs/gnome/glade3/widgets/gtkbox.xml,v
retrieving revision 1.9
diff -u -r1.9 gtkbox.xml
--- glade3/widgets/gtkbox.xml   1 May 2004 22:05:31 -0000       1.9
+++ glade3/widgets/gtkbox.xml   18 May 2004 06:24:41 -0000
@@ -5,11 +5,11 @@
 
   <Properties>
 
-    <Property Id="size" Name="Size" Default="3">
+    <Property Id="size" Name="Size" OptionalDefault="3">
       <Type>Integer</Type>
       <Tooltip>The number of items in the box</Tooltip>
       <Parameters>
-        <Parameter Key="Min" Value="0"/>
+        <Parameter Key="Min" Value="1"/>
         <Parameter Key="Max" Value="10000"/>
         <Parameter Key="StepIncrement" Value="1"/>
         <Parameter Key="PageIncrement" Value="10"/>

--Boundary_(ID_lFBSjn36VsIw3nbbg4KTuQ)
Content-type: text/xml; name=demo-of-problem.glade; charset=UTF-8
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=demo-of-problem.glade

<?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="window1">
  <property name="visible">True</property>
  <property name="title" translatable="yes">window1</property>
  <property name="type">GTK_WINDOW_TOPLEVEL</property>
  <property name="window_position">GTK_WIN_POS_NONE</property>
  <property name="modal">False</property>
  <property name="resizable">True</property>
  <property name="destroy_with_parent">False</property>

  <child>
    <widget class="GtkVBox" id="vbox3">
      <property name="visible">True</property>
      <property name="homogeneous">False</property>
      <property name="spacing">0</property>

      <child>
        <widget class="GtkButton" id="button11">
          <property name="visible">True</property>
          <property name="can_focus">True</property>
          <property name="label" translatable="yes">button11</property>
          <property name="use_underline">True</property>
          <property name="relief">GTK_RELIEF_NORMAL</property>
        </widget>
        <packing>
          <property name="padding">0</property>
          <property name="expand">False</property>
          <property name="fill">False</property>
        </packing>
      </child>
    </widget>
  </child>
</widget>

</glade-interface>

--Boundary_(ID_lFBSjn36VsIw3nbbg4KTuQ)--




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