gnome-glade-gtk-perl layout convergence issue



I've got a glade app (bins-edit-gui, next version) that isn't doing
what I think it should, and I'm looking for suggestions as to how to
deal with the problem...  I've experimented some but not gotten much
change.

The key part of the app (full widget hierarchy at the end of this
message) is a display of an image (digital photo) and a list of
attributes of the photo.

+-GtkVbox---------------------------------------------------+
| GtkMenuBar                                                |
+-GtkHbox---------------------------------------------------+
|+-----------------------+---------------------------------+|
||+-GtkClist------------+|+-GtkVbox-----------------------+||
|||                     ||| GtkLabel                      |||
|||                     ||| +--AspectFrame-------------+  |||
|||                     ||| |                          |  |||
|||                     ||| |      GtkPixmap           |AA|||
|||                     ||| |                          |  |||
|||                     ||| +--------------------------+  |||
||+---------------------+|+-------------------------------+||
|+-----------------------+---------------------------------+|
+-GtkHbox---------------------------------------------------+
| Label           Label                                     |
| GnomeEntry      GnomeEntry                                |
+-----------------------------------------------------------+

AspectFrame has a <ratio> of 1, ie. square.  The abstract goal is to
devote the largest possible area to the Pixmap, and then give the rest
to the Clist.  The pixmaps are, in practice, either 4:3 or 3:4, and
a typical screen (and thus a maximized window) is usually of a similar
ratio, so this scaling works out.  Having the square aspectFrame
leaves us with consistent image "size" ie. area, without having to
be too creative with varying image sizes.

However, it doesn't quite work: I end up with blank space at AA.  It
does apear that the label is centered in the vbox, rather than above
the frame, since image_filename_label is GTK_JUSTIFY_LEFT, I assume
that the child:padding/expand/fill settings of the vbox are causing
this.  This space doesn't show in glade, which just gives the twho
halves of the hbox equal space - actually putting something in the
gtkpixmap is what changes things, it looks like.

This may also tie in with something I mentioned earlier about getting
the interface to converge -- I want GTK to figure out how much
viewport I have, and then I'll put an image into it.  Instead, that
seems to trigger further resizing, unless I explicitly prevent loops
in the expose_event handler...

What I'm looking for, I think, is some suggestion that indicates what
mistake I've made in the window layout, or what assumption I'm
violating, or something like that -- something I can fix :-)


  GtkWindow
    GtkVBox
      GtkMenuBar
        GtkMenuItem
          GtkMenu
            GtkPixmapMenuItem
            GtkPixmapMenuItem
            GtkPixmapMenuItem
            GtkPixmapMenuItem
        GtkMenuItem
          GtkMenu
            GtkPixmapMenuItem
            GtkPixmapMenuItem
            GtkPixmapMenuItem
            GtkPixmapMenuItem
            GtkPixmapMenuItem
            GtkPixmapMenuItem
        GtkMenuItem
          GtkMenu
            GtkPixmapMenuItem
            GtkPixmapMenuItem
            GtkPixmapMenuItem
            GtkPixmapMenuItem
        GtkMenuItem
          GtkMenu
            GtkPixmapMenuItem
            GtkPixmapMenuItem
      GtkHBox
        GtkScrolledWindow
          GtkCList
            GtkLabel
            GtkLabel
        GtkVBox
          GtkLabel
          GtkAspectFrame
            GtkPixmap
      GtkHBox
        GtkVBox
          GtkLabel
          GnomeEntry
            GtkEntry
        GtkVBox
          GtkLabel
          GnomeEntry
            GtkEntry
      GtkStatusbar

-- uncut bins-edit-gui.glade follows. --
<?xml version="1.0"?>
<GTK-Interface>

<project>
  <name>Bins-edit</name>
  <program_name>bins-edit</program_name>
  <directory></directory>
  <source_directory>src</source_directory>
  <pixmaps_directory>pixmaps</pixmaps_directory>
  <language>Perl</language>
  <gnome_support>True</gnome_support>
  <gettext_support>True</gettext_support>
  <use_widget_names>True</use_widget_names>
</project>

<widget>
  <class>GtkWindow</class>
  <name>image_edit_top</name>
  <title>BINS Image Property Editor</title>
  <type>GTK_WINDOW_TOPLEVEL</type>
  <position>GTK_WIN_POS_NONE</position>
  <modal>False</modal>
  <allow_shrink>False</allow_shrink>
  <allow_grow>True</allow_grow>
  <auto_shrink>False</auto_shrink>

  <widget>
    <class>GtkVBox</class>
    <name>vbox3</name>
    <homogeneous>False</homogeneous>
    <spacing>0</spacing>

    <widget>
      <class>GtkMenuBar</class>
      <name>menubar2</name>
      <shadow_type>GTK_SHADOW_OUT</shadow_type>
      <child>
        <padding>0</padding>
        <expand>False</expand>
        <fill>False</fill>
      </child>

      <widget>
        <class>GtkMenuItem</class>
        <name>file2</name>
        <stock_item>GNOMEUIINFO_MENU_FILE_TREE</stock_item>

        <widget>
          <class>GtkMenu</class>
          <name>file2_menu</name>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>save1</name>
            <signal>
              <name>activate</name>
              <handler>on_save1_activate</handler>
              <last_modification_time>Wed, 01 May 2002 14:29:53 GMT</last_modification_time>
            </signal>
            <stock_item>GNOMEUIINFO_MENU_SAVE_ITEM</stock_item>
          </widget>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>open2</name>
            <signal>
              <name>activate</name>
              <handler>on_open2_activate</handler>
              <last_modification_time>Wed, 01 May 2002 14:29:53 GMT</last_modification_time>
            </signal>
            <stock_item>GNOMEUIINFO_MENU_OPEN_ITEM</stock_item>
          </widget>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>revert1</name>
            <signal>
              <name>activate</name>
              <handler>on_revert1_activate</handler>
              <last_modification_time>Wed, 01 May 2002 14:29:53 GMT</last_modification_time>
            </signal>
            <stock_item>GNOMEUIINFO_MENU_REVERT_ITEM</stock_item>
          </widget>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>exit1</name>
            <signal>
              <name>activate</name>
              <handler>on_exit1_activate</handler>
              <last_modification_time>Thu, 02 May 2002 16:04:05 GMT</last_modification_time>
            </signal>
            <stock_item>GNOMEUIINFO_MENU_EXIT_ITEM</stock_item>
          </widget>
        </widget>
      </widget>

      <widget>
        <class>GtkMenuItem</class>
        <name>go1</name>
        <label>_Go</label>
        <right_justify>False</right_justify>

        <widget>
          <class>GtkMenu</class>
          <name>go1_menu</name>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>next_file1</name>
            <tooltip>Save this file and load the next one.</tooltip>
            <accelerator>
              <modifiers>GDK_CONTROL_MASK</modifiers>
              <key>GDK_n</key>
              <signal>activate</signal>
            </accelerator>
            <signal>
              <name>activate</name>
              <handler>on_next_file1_activate</handler>
              <last_modification_time>Mon, 06 May 2002 21:18:06 GMT</last_modification_time>
            </signal>
            <label>_Next File</label>
            <right_justify>False</right_justify>
            <stock_icon>GNOME_STOCK_MENU_FORWARD</stock_icon>
          </widget>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>forward_10</name>
            <accelerator>
              <modifiers>GDK_MOD1_MASK</modifiers>
              <key>GDK_Page_Down</key>
              <signal>activate</signal>
            </accelerator>
            <signal>
              <name>activate</name>
              <handler>on_forward_10_activate</handler>
              <last_modification_time>Sun, 12 May 2002 21:26:57 GMT</last_modification_time>
            </signal>
            <label>Forward 10</label>
            <right_justify>False</right_justify>
            <stock_icon>GNOME_STOCK_MENU_DOWN</stock_icon>
          </widget>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>prev_file1</name>
            <tooltip>Save this file and load the previous one.</tooltip>
            <accelerator>
              <modifiers>GDK_CONTROL_MASK</modifiers>
              <key>GDK_p</key>
              <signal>activate</signal>
            </accelerator>
            <signal>
              <name>activate</name>
              <handler>on_prev_file1_activate</handler>
              <last_modification_time>Mon, 06 May 2002 21:18:06 GMT</last_modification_time>
            </signal>
            <label>_Previous File</label>
            <right_justify>False</right_justify>
            <stock_icon>GNOME_STOCK_MENU_BACK</stock_icon>
          </widget>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>back_10</name>
            <accelerator>
              <modifiers>GDK_MOD1_MASK</modifiers>
              <key>GDK_Page_Up</key>
              <signal>activate</signal>
            </accelerator>
            <signal>
              <name>activate</name>
              <handler>on_back_10_activate</handler>
              <last_modification_time>Sun, 12 May 2002 21:26:57 GMT</last_modification_time>
            </signal>
            <label>Back 10</label>
            <right_justify>False</right_justify>
            <stock_icon>GNOME_STOCK_MENU_UP</stock_icon>
          </widget>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>start_of_list1</name>
            <accelerator>
              <modifiers>GDK_MOD1_MASK</modifiers>
              <key>GDK_Home</key>
              <signal>activate</signal>
            </accelerator>
            <signal>
              <name>activate</name>
              <handler>on_start_of_list1_activate</handler>
              <last_modification_time>Sun, 12 May 2002 21:26:57 GMT</last_modification_time>
            </signal>
            <label>Start of List</label>
            <right_justify>False</right_justify>
            <stock_icon>GNOME_STOCK_MENU_FIRST</stock_icon>
          </widget>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>end_of_list1</name>
            <accelerator>
              <modifiers>GDK_MOD1_MASK</modifiers>
              <key>GDK_End</key>
              <signal>activate</signal>
            </accelerator>
            <signal>
              <name>activate</name>
              <handler>on_end_of_list1_activate</handler>
              <last_modification_time>Sun, 12 May 2002 21:26:57 GMT</last_modification_time>
            </signal>
            <label>End of List</label>
            <right_justify>False</right_justify>
            <stock_icon>GNOME_STOCK_MENU_LAST</stock_icon>
          </widget>
        </widget>
      </widget>

      <widget>
        <class>GtkMenuItem</class>
        <name>edit1</name>
        <stock_item>GNOMEUIINFO_MENU_EDIT_TREE</stock_item>

        <widget>
          <class>GtkMenu</class>
          <name>edit1_menu</name>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>auto_fill1</name>
            <tooltip>Fill in blank fields from most recently seen image.</tooltip>
            <accelerator>
              <modifiers>GDK_MOD1_MASK</modifiers>
              <key>GDK_a</key>
              <signal>activate</signal>
            </accelerator>
            <signal>
              <name>activate</name>
              <handler>on_auto_fill1_activate</handler>
              <last_modification_time>Wed, 08 May 2002 18:43:48 GMT</last_modification_time>
            </signal>
            <label>Auto _Fill</label>
            <right_justify>False</right_justify>
            <stock_icon>GNOME_STOCK_MENU_CONVERT</stock_icon>
          </widget>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>rotate_right_cw1</name>
            <tooltip>Rotate image to the Right (Clockwise)</tooltip>
            <accelerator>
              <modifiers>GDK_SHIFT_MASK</modifiers>
              <key>GDK_greater</key>
              <signal>activate</signal>
            </accelerator>
            <signal>
              <name>activate</name>
              <handler>on_rotate_right_cw1_activate</handler>
              <last_modification_time>Sun, 19 May 2002 00:11:57 GMT</last_modification_time>
            </signal>
            <label>Rotate _Right</label>
            <right_justify>False</right_justify>
            <stock_icon>GNOME_STOCK_MENU_REDO</stock_icon>
          </widget>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>rotate_left1</name>
            <tooltip>Rotate image to the Left (Counter Clockwise)</tooltip>
            <accelerator>
              <modifiers>GDK_SHIFT_MASK</modifiers>
              <key>GDK_less</key>
              <signal>activate</signal>
            </accelerator>
            <signal>
              <name>activate</name>
              <handler>on_rotate_left1_activate</handler>
              <last_modification_time>Sun, 19 May 2002 00:11:57 GMT</last_modification_time>
            </signal>
            <label>Rotate _Left</label>
            <right_justify>False</right_justify>
            <stock_icon>GNOME_STOCK_MENU_UNDO</stock_icon>
          </widget>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>cancel_rotation1</name>
            <tooltip>Restore original orientation (based on the EXIF tags, if any)</tooltip>
            <signal>
              <name>activate</name>
              <handler>on_cancel_rotation1_activate</handler>
              <last_modification_time>Sun, 19 May 2002 00:11:57 GMT</last_modification_time>
            </signal>
            <label>_Cancel Rotation</label>
            <right_justify>False</right_justify>
            <stock_icon>GNOME_STOCK_MENU_STOP</stock_icon>
          </widget>
        </widget>
      </widget>

      <widget>
        <class>GtkMenuItem</class>
        <name>help2</name>
        <stock_item>GNOMEUIINFO_MENU_HELP_TREE</stock_item>

        <widget>
          <class>GtkMenu</class>
          <name>help2_menu</name>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>about2</name>
            <signal>
              <name>activate</name>
              <handler>on_about2_activate</handler>
              <last_modification_time>Wed, 01 May 2002 14:29:53 GMT</last_modification_time>
            </signal>
            <stock_item>GNOMEUIINFO_MENU_ABOUT_ITEM</stock_item>
          </widget>

          <widget>
            <class>GtkPixmapMenuItem</class>
            <name>license1</name>
            <tooltip>GPL</tooltip>
            <signal>
              <name>activate</name>
              <handler>on_license1_activate</handler>
              <last_modification_time>Fri, 10 May 2002 04:50:31 GMT</last_modification_time>
            </signal>
            <label>_License</label>
            <right_justify>False</right_justify>
            <stock_icon>GNOME_STOCK_MENU_BOOK_OPEN</stock_icon>
          </widget>
        </widget>
      </widget>
    </widget>

    <widget>
      <class>GtkHBox</class>
      <name>hbox2</name>
      <homogeneous>False</homogeneous>
      <spacing>0</spacing>
      <child>
        <padding>0</padding>
        <expand>True</expand>
        <fill>True</fill>
      </child>

      <widget>
        <class>GtkScrolledWindow</class>
        <name>scrolledwindow2</name>
        <hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
        <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
        <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
        <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
        <child>
          <padding>0</padding>
          <expand>True</expand>
          <fill>True</fill>
        </child>

        <widget>
          <class>GtkCList</class>
          <name>image_prop_list</name>
          <can_focus>True</can_focus>
          <columns>2</columns>
          <column_widths>80,80</column_widths>
          <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
          <show_titles>True</show_titles>
          <shadow_type>GTK_SHADOW_IN</shadow_type>

          <widget>
            <class>GtkLabel</class>
            <child_name>CList:title</child_name>
            <name>label4</name>
            <label>Property</label>
            <justify>GTK_JUSTIFY_CENTER</justify>
            <wrap>False</wrap>
            <xalign>0.5</xalign>
            <yalign>0.5</yalign>
            <xpad>0</xpad>
            <ypad>0</ypad>
          </widget>

          <widget>
            <class>GtkLabel</class>
            <child_name>CList:title</child_name>
            <name>label5</name>
            <label>Value</label>
            <justify>GTK_JUSTIFY_CENTER</justify>
            <wrap>False</wrap>
            <xalign>0.5</xalign>
            <yalign>0.5</yalign>
            <xpad>0</xpad>
            <ypad>0</ypad>
          </widget>
        </widget>
      </widget>

      <widget>
        <class>GtkVBox</class>
        <name>vbox6</name>
        <homogeneous>False</homogeneous>
        <spacing>0</spacing>
        <child>
          <padding>0</padding>
          <expand>True</expand>
          <fill>True</fill>
        </child>

        <widget>
          <class>GtkLabel</class>
          <name>image_filename_label</name>
          <label></label>
          <justify>GTK_JUSTIFY_LEFT</justify>
          <wrap>False</wrap>
          <xalign>0.5</xalign>
          <yalign>0.5</yalign>
          <xpad>0</xpad>
          <ypad>0</ypad>
          <child>
            <padding>0</padding>
            <expand>False</expand>
            <fill>False</fill>
          </child>
        </widget>

        <widget>
          <class>GtkAspectFrame</class>
          <name>aspectframe1</name>
          <label_xalign>0</label_xalign>
          <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
          <xalign>0</xalign>
          <yalign>0</yalign>
          <ratio>1</ratio>
          <obey_child>False</obey_child>
          <child>
            <padding>0</padding>
            <expand>True</expand>
            <fill>True</fill>
            <pack>GTK_PACK_END</pack>
          </child>
 
          <widget>
            <class>GtkPixmap</class>
            <name>image_edit_pixmap</name>
            <xalign>0</xalign>
            <yalign>0</yalign>
            <xpad>0</xpad>
            <ypad>0</ypad>
            <build_insensitive>True</build_insensitive>
          </widget>
        </widget>
      </widget>
    </widget>

    <widget>
      <class>GtkHBox</class>
      <name>fixed1</name>
      <homogeneous>False</homogeneous>
      <spacing>0</spacing>
      <child>
        <padding>0</padding>
        <expand>False</expand>
        <fill>False</fill>
      </child>

      <widget>
        <class>GtkVBox</class>
        <name>vbox4</name>
        <homogeneous>False</homogeneous>
        <spacing>0</spacing>
        <child>
          <padding>0</padding>
          <expand>False</expand>
          <fill>False</fill>
        </child>

        <widget>
          <class>GtkLabel</class>
          <name>label6</name>
          <label>Property Name:</label>
          <justify>GTK_JUSTIFY_LEFT</justify>
          <wrap>False</wrap>
          <xalign>0.5</xalign>
          <yalign>0.5</yalign>
          <xpad>0</xpad>
          <ypad>0</ypad>
          <child>
            <padding>0</padding>
            <expand>False</expand>
            <fill>False</fill>
          </child>
        </widget>

        <widget>
          <class>GnomeEntry</class>
          <name>field_name_entry</name>
          <width>175</width>
          <max_saved>15</max_saved>
          <child>
            <padding>0</padding>
            <expand>True</expand>
            <fill>True</fill>
          </child>

          <widget>
            <class>GtkEntry</class>
            <child_name>GnomeEntry:entry</child_name>
            <name>combo-entry1</name>
            <can_focus>True</can_focus>
            <editable>True</editable>
            <text_visible>True</text_visible>
            <text_max_length>0</text_max_length>
            <text></text>
          </widget>
        </widget>
      </widget>

      <widget>
        <class>GtkVBox</class>
        <name>vbox5</name>
        <homogeneous>False</homogeneous>
        <spacing>0</spacing>
        <child>
          <padding>0</padding>
          <expand>True</expand>
          <fill>True</fill>
        </child>

        <widget>
          <class>GtkLabel</class>
          <name>label7</name>
          <label>Value:</label>
          <justify>GTK_JUSTIFY_LEFT</justify>
          <wrap>False</wrap>
          <xalign>0.5</xalign>
          <yalign>0.5</yalign>
          <xpad>0</xpad>
          <ypad>0</ypad>
          <child>
            <padding>0</padding>
            <expand>False</expand>
            <fill>False</fill>
          </child>
        </widget>

        <widget>
          <class>GnomeEntry</class>
          <name>field_value_entry</name>
          <max_saved>10</max_saved>
          <child>
            <padding>0</padding>
            <expand>True</expand>
            <fill>True</fill>
          </child>

          <widget>
            <class>GtkEntry</class>
            <child_name>GnomeEntry:entry</child_name>
            <name>combo-entry2</name>
            <can_focus>True</can_focus>
            <editable>True</editable>
            <text_visible>True</text_visible>
            <text_max_length>0</text_max_length>
            <text></text>
          </widget>
        </widget>
      </widget>
    </widget>

    <widget>
      <class>GtkStatusbar</class>
      <name>statusbar1</name>
      <child>
        <padding>0</padding>
        <expand>False</expand>
        <fill>False</fill>
      </child>
    </widget>
  </widget>
</widget>

<widget>
  <class>GtkDialog</class>
  <name>license_box</name>
  <visible>False</visible>
  <title>BINS License</title>
  <type>GTK_WINDOW_DIALOG</type>
  <position>GTK_WIN_POS_NONE</position>
  <modal>True</modal>
  <allow_shrink>True</allow_shrink>
  <allow_grow>True</allow_grow>
  <auto_shrink>False</auto_shrink>

  <widget>
    <class>GtkVBox</class>
    <child_name>Dialog:vbox</child_name>
    <name>dialog-vbox1</name>
    <homogeneous>False</homogeneous>
    <spacing>0</spacing>

    <widget>
      <class>GtkHBox</class>
      <child_name>Dialog:action_area</child_name>
      <name>dialog-action_area1</name>
      <border_width>10</border_width>
      <homogeneous>True</homogeneous>
      <spacing>5</spacing>
      <child>
        <padding>0</padding>
        <expand>False</expand>
        <fill>True</fill>
        <pack>GTK_PACK_END</pack>
      </child>

      <widget>
        <class>GtkHButtonBox</class>
        <name>hbuttonbox1</name>
        <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
        <spacing>30</spacing>
        <child_min_width>85</child_min_width>
        <child_min_height>27</child_min_height>
        <child_ipad_x>7</child_ipad_x>
        <child_ipad_y>0</child_ipad_y>
        <child>
          <padding>0</padding>
          <expand>True</expand>
          <fill>True</fill>
        </child>

        <widget>
          <class>GtkButton</class>
          <name>dismiss_about</name>
          <can_default>True</can_default>
          <can_focus>True</can_focus>
          <signal>
            <name>clicked</name>
            <handler>on_dismiss_about_clicked</handler>
            <last_modification_time>Fri, 10 May 2002 05:07:03 GMT</last_modification_time>
          </signal>
          <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
          <relief>GTK_RELIEF_NORMAL</relief>
        </widget>
      </widget>
    </widget>

    <widget>
      <class>GtkScrolledWindow</class>
      <name>scrolledwindow3</name>
      <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
      <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
      <child>
        <padding>0</padding>
        <expand>True</expand>
        <fill>True</fill>
      </child>

      <widget>
        <class>GtkText</class>
        <name>license_text</name>
        <can_focus>True</can_focus>
        <editable>False</editable>
        <text></text>
      </widget>
    </widget>
  </widget>
</widget>

<widget>
  <class>GnomeAbout</class>
  <name>about_box</name>
  <visible>False</visible>
  <modal>True</modal>
  <copyright>Copyright 2002 Mark W. Eichin &lt;eichin thok org&gt;</copyright>
  <authors>Mark W. Eichin &lt;eichin thok org&gt;
The Herd Of Kittens
</authors>
  <comments>See bins-edit-gui(1) and bins_edit(1) for details.</comments>
</widget>

</GTK-Interface>



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