This is a report of bugs in Glade 0.6.4 (and possibly libglade 0.17)
under Red Hat 8.0.  I observed them while my friend Rob Landley and I
were using Glade to build a GUI for a DNS configuration editor.  I
have enclosed my Glade spec and the Python driver program that runs it
so you can reproduce these.

Yes, we have RTFM, including:

The PyGTK docs at <http://www.gnome.org/~james/pygtk-docs/>.  Generated
from the C documentation, and (as the author notes) both incorrect and
incomplete.

The PyGnome/PyGTK/Libglade Tutorial at
<http://sjbrown.geeky.net/metagame-sector/tutorial.html>, with its
actively misleading example code.

The Libglade programming notes at
<http://developer.gnome.org/doc/API/libglade/libglade-notes.html#LIBGLADE-BASICS>, 
which might actually have been useful if I were programming in C.

The PyGnome tutorial at
<http://laguna.fmedic.unam.mx/~daniel/pygtutorial/pygtutorial/>,
which was the best of the lot (though that's not saying much; it is woefully
incomplete).

We're not just bitching about the docs without being willing to pitch
in.  Rob has started work on a Python-and-Glade tutorial, so what we
learn from experience and the answers to these reports will go into that.

Glade bugs, in decreasing severity order:

1. Tooltips on text-view widgets seem not to work during editing.
   That is, filling in the tooltip has no effect.  I was able to invoke 
   tootips to all my other widgets with a tooltip field successfully.

   To reproduce, move the mouse over the commentview widget in the
   editor diplay.  Note that no tooltip comes up.  Select it and
   verify that the tootip property is nonempty. 

2. Tooltips on list/tree widgets display in the editor interface, but
   not when an instance is actually running.  

   To reproduce, note that the domain_tree and properties widgets have 
   tooltips.  Then run oakum.py and hover the mouse over them.  Nothing
   happens.

3. Pixel position of panes defaults to enabled and 1 by default. 
   This makes paned interfaces look broken on startup if the user hasn't 
   manually set the position to something reasonable, an easy thing to 
   forget to do. The default should be 50% of the appropriate dimension
   (stored scaled, see feature request #1).

4. There are bad redraw artifacts when modifying fill and expand on 
   button rows.  They manifest as the widget select box not getting
   erased properly.  

   Alas, I can no longer reproduce this.  It used to happen with the
   button row on the main window.  I don't know what I changed that
   is now masking the bug.

Glade features needed:

1. All pixel positions should be specifiable as a decimal fraction or
   percent of the enclosing widget size, so that layouts make sense at
   any window size.  Absolute, unscaled pixel positions are bugs waiting
   to happen, and the fact that the Glade interface requires them is a bug.

2. The editing interface should have undo.  The lack of it makes
   experimentation too risky, especially when deleting widgets.
   The absence of this feature is a serious design-level bug.

3. In the tree view, it should be possible to drag a widget subtree out of
   its container widget into a new one (so, e.g, you can get rid of an 
   unwanted container by lifting its children up a level and then deleting it).
   Without this feature one is forced to hand-hack the XML.

3. Dragging a pane boundary in the Glade editor should change the pixel 
   position default for that pane (and it should be stored scaled, see
   feature request #1).

4. Convenience feature: add "Select parent widget" in right-click menu.  
   Yes, I know, it's easily done in the widget-tree view.

5. I think the widget-tree view should be on by default.  This is
   an interface style issue, not a feature request per se.

libglade/gtk bugs (?):

1. When I run my code, I get 16 repetitions of the following message:

(oakum.py:822): libglade-WARNING **: unknown property `stock_item' for class 
`GtkImageMenuItem'

   What is going on here?  Where did that bogus large line number come from?
   What is `stock_item', what do I have to do about it, and why does none of
   the existing documentation mention this issue?  In general, how do I trace
   these runtime messages back to a problem I can fix?

The combination of Glade and Python looks like it has the potential to be an
amazingly powerful tool.  Once the rough edges are smoothed a bit...

FYI, our intention is to build a GUI configuration editor that will allow 
end-users to hack DNS zone configurations without shooting themselves
in the foot or having to comprehend zone file syntax.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>
<?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="main_window">
  <property name="width_request">600</property>
  <property name="height_request">530</property>
  <property name="visible">True</property>
  <property name="title" translatable="yes">Oakum main window</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>
  <signal name="destroy" handler="on_window1_destroy" last_modification_time="Wed, 19 
Feb 2003 00:30:15 GMT"/>

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

      <child>
        <widget class="GtkMenuBar" id="menubar">
          <property name="visible">True</property>

          <child>
            <widget class="GtkImageMenuItem" id="file1">
              <property name="visible">True</property>
              <property name="stock_item">GNOMEUIINFO_MENU_FILE_TREE</property>

              <child>
                <widget class="GtkMenu" id="file1_menu">

                  <child>
                    <widget class="GtkImageMenuItem" id="new1">
                      <property name="visible">True</property>
                      <property name="stock_item">GNOMEUIINFO_MENU_NEW_ITEM</property>
                      <property name="label" translatable="yes">_New</property>
                      <property name="use_underline">True</property>
                      <signal name="activate" handler="on_new1_activate" 
last_modification_time="Wed, 19 Feb 2003 00:48:29 GMT"/>
                    </widget>
                  </child>

                  <child>
                    <widget class="GtkImageMenuItem" id="open1">
                      <property name="visible">True</property>
                      <property name="stock_item">GNOMEUIINFO_MENU_OPEN_ITEM</property>
                      <signal name="activate" handler="on_open1_activate" 
last_modification_time="Wed, 19 Feb 2003 00:48:29 GMT"/>
                    </widget>
                  </child>

                  <child>
                    <widget class="GtkImageMenuItem" id="save1">
                      <property name="visible">True</property>
                      <property name="stock_item">GNOMEUIINFO_MENU_SAVE_ITEM</property>
                      <signal name="activate" handler="on_save1_activate" 
last_modification_time="Wed, 19 Feb 2003 00:48:29 GMT"/>
                    </widget>
                  </child>

                  <child>
                    <widget class="GtkImageMenuItem" id="save_as1">
                      <property name="visible">True</property>
                      <property 
name="stock_item">GNOMEUIINFO_MENU_SAVE_AS_ITEM</property>
                      <signal name="activate" handler="on_save_as1_activate" 
last_modification_time="Wed, 19 Feb 2003 00:48:29 GMT"/>
                    </widget>
                  </child>

                  <child>
                    <widget class="GtkSeparatorMenuItem" id="separator1">
                      <property name="visible">True</property>
                    </widget>
                  </child>

                  <child>
                    <widget class="GtkImageMenuItem" id="quit1">
                      <property name="visible">True</property>
                      <property name="stock_item">GNOMEUIINFO_MENU_EXIT_ITEM</property>
                      <signal name="activate" handler="on_quit1_activate" 
last_modification_time="Wed, 19 Feb 2003 00:48:29 GMT"/>
                    </widget>
                  </child>
                </widget>
              </child>
            </widget>
          </child>

          <child>
            <widget class="GtkImageMenuItem" id="edit1">
              <property name="visible">True</property>
              <property name="stock_item">GNOMEUIINFO_MENU_EDIT_TREE</property>

              <child>
                <widget class="GtkMenu" id="edit1_menu">

                  <child>
                    <widget class="GtkImageMenuItem" id="cut1">
                      <property name="visible">True</property>
                      <property name="stock_item">GNOMEUIINFO_MENU_CUT_ITEM</property>
                      <signal name="activate" handler="on_cut1_activate" 
last_modification_time="Wed, 19 Feb 2003 00:48:29 GMT"/>
                    </widget>
                  </child>

                  <child>
                    <widget class="GtkImageMenuItem" id="copy1">
                      <property name="visible">True</property>
                      <property name="stock_item">GNOMEUIINFO_MENU_COPY_ITEM</property>
                      <signal name="activate" handler="on_copy1_activate" 
last_modification_time="Wed, 19 Feb 2003 00:48:29 GMT"/>
                    </widget>
                  </child>

                  <child>
                    <widget class="GtkImageMenuItem" id="paste1">
                      <property name="visible">True</property>
                      <property 
name="stock_item">GNOMEUIINFO_MENU_PASTE_ITEM</property>
                      <signal name="activate" handler="on_paste1_activate" 
last_modification_time="Wed, 19 Feb 2003 00:48:29 GMT"/>
                    </widget>
                  </child>

                  <child>
                    <widget class="GtkImageMenuItem" id="clear1">
                      <property name="visible">True</property>
                      <property 
name="stock_item">GNOMEUIINFO_MENU_CLEAR_ITEM</property>
                      <signal name="activate" handler="on_clear1_activate" 
last_modification_time="Wed, 19 Feb 2003 00:48:29 GMT"/>
                    </widget>
                  </child>

                  <child>
                    <widget class="GtkSeparatorMenuItem" id="separator2">
                      <property name="visible">True</property>
                    </widget>
                  </child>

                  <child>
                    <widget class="GtkImageMenuItem" id="properties1">
                      <property name="visible">True</property>
                      <property 
name="stock_item">GNOMEUIINFO_MENU_PROPERTIES_ITEM</property>
                      <signal name="activate" handler="on_properties1_activate" 
last_modification_time="Wed, 19 Feb 2003 00:48:29 GMT"/>
                    </widget>
                  </child>

                  <child>
                    <widget class="GtkSeparatorMenuItem" id="separator3">
                      <property name="visible">True</property>
                    </widget>
                  </child>

                  <child>
                    <widget class="GtkImageMenuItem" id="preferences1">
                      <property name="visible">True</property>
                      <property 
name="stock_item">GNOMEUIINFO_MENU_PREFERENCES_ITEM</property>
                      <signal name="activate" handler="on_preferences1_activate" 
last_modification_time="Wed, 19 Feb 2003 00:48:29 GMT"/>
                    </widget>
                  </child>
                </widget>
              </child>
            </widget>
          </child>

          <child>
            <widget class="GtkImageMenuItem" id="view1">
              <property name="visible">True</property>
              <property name="stock_item">GNOMEUIINFO_MENU_VIEW_TREE</property>

              <child>
                <widget class="GtkMenu" id="view1_menu">
                </widget>
              </child>
            </widget>
          </child>

          <child>
            <widget class="GtkImageMenuItem" id="help1">
              <property name="visible">True</property>
              <property name="stock_item">GNOMEUIINFO_MENU_HELP_TREE</property>

              <child>
                <widget class="GtkMenu" id="help1_menu">

                  <child>
                    <widget class="GtkImageMenuItem" id="about1">
                      <property name="visible">True</property>
                      <property 
name="stock_item">GNOMEUIINFO_MENU_ABOUT_ITEM</property>
                      <signal name="activate" handler="on_about1_activate" 
last_modification_time="Wed, 19 Feb 2003 00:48:29 GMT"/>
                    </widget>
                  </child>
                </widget>
              </child>
            </widget>
          </child>
        </widget>
        <packing>
          <property name="padding">0</property>
          <property name="expand">False</property>
          <property name="fill">False</property>
        </packing>
      </child>

      <child>
        <widget class="GtkFrame" id="optionframe">
          <property name="visible">True</property>
          <property name="label_xalign">0</property>
          <property name="label_yalign">0.5</property>
          <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>

          <child>
            <widget class="GtkCheckButton" id="recursion_checkbox">
              <property name="visible">True</property>
              <property name="tooltip" translatable="yes">Check rthis box to permit 
recursive queries through your DNS server.</property>
              <property name="can_focus">True</property>
              <property name="label" translatable="yes">Allow recursive 
queries?</property>
              <property name="use_underline">True</property>
              <property name="relief">GTK_RELIEF_NORMAL</property>
              <property name="active">True</property>
              <property name="inconsistent">False</property>
              <property name="draw_indicator">True</property>
            </widget>
          </child>

          <child>
            <widget class="GtkLabel" id="resolver_options_frame">
              <property name="visible">True</property>
              <property name="label" translatable="yes">Resolver Options</property>
              <property name="use_underline">False</property>
              <property name="use_markup">False</property>
              <property name="justify">GTK_JUSTIFY_LEFT</property>
              <property name="wrap">False</property>
              <property name="selectable">False</property>
              <property name="xalign">0.5</property>
              <property name="yalign">0.5</property>
              <property name="xpad">0</property>
              <property name="ypad">0</property>
            </widget>
            <packing>
              <property name="type">label_item</property>
            </packing>
          </child>
        </widget>
        <packing>
          <property name="padding">0</property>
          <property name="expand">False</property>
          <property name="fill">False</property>
        </packing>
      </child>

      <child>
        <widget class="GtkHPaned" id="horizontal_pane">
          <property name="visible">True</property>
          <property name="can_focus">True</property>
          <property name="position">300</property>

          <child>
            <widget class="GtkFrame" id="treeframe">
              <property name="visible">True</property>
              <property name="label_xalign">0</property>
              <property name="label_yalign">0.5</property>
              <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>

              <child>
                <widget class="GtkScrolledWindow" id="domain_window">
                  <property name="visible">True</property>
                  <property name="can_focus">True</property>
                  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
                  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
                  <property name="shadow_type">GTK_SHADOW_NONE</property>
                  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>

                  <child>
                    <widget class="GtkTreeView" id="domain_tree">
                      <property name="visible">True</property>
                      <property name="tooltip" translatable="yes">This is a tree view 
of the portion of the DNS namespace described by your configuration.</property>
                      <property name="can_focus">True</property>
                      <property name="headers_visible">False</property>
                      <property name="rules_hint">False</property>
                      <property name="reorderable">False</property>
                      <property name="enable_search">True</property>
                    </widget>
                  </child>
                </widget>
              </child>

              <child>
                <widget class="GtkLabel" id="tree_label">
                  <property name="visible">True</property>
                  <property name="label" translatable="yes">Domain View:</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                  <property name="wrap">False</property>
                  <property name="selectable">False</property>
                  <property name="xalign">0.5</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
                </widget>
                <packing>
                  <property name="type">label_item</property>
                </packing>
              </child>
            </widget>
            <packing>
              <property name="shrink">True</property>
              <property name="resize">False</property>
            </packing>
          </child>

          <child>
            <widget class="GtkFrame" id="detailframe">
              <property name="border_width">5</property>
              <property name="visible">True</property>
              <property name="label_xalign">0</property>
              <property name="label_yalign">0.5</property>
              <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>

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

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

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

                          <child>
                            <widget class="GtkLabel" id="name_label">
                              <property name="visible">True</property>
                              <property name="label" 
translatable="yes">Name:</property>
                              <property name="use_underline">False</property>
                              <property name="use_markup">False</property>
                              <property name="justify">GTK_JUSTIFY_LEFT</property>
                              <property name="wrap">False</property>
                              <property name="selectable">False</property>
                              <property name="xalign">0.5</property>
                              <property name="yalign">0.5</property>
                              <property name="xpad">0</property>
                              <property name="ypad">0</property>
                            </widget>
                            <packing>
                              <property name="padding">0</property>
                              <property name="expand">False</property>
                              <property name="fill">False</property>
                            </packing>
                          </child>

                          <child>
                            <widget class="GtkEntry" id="name_entry">
                              <property name="visible">True</property>
                              <property name="tooltip" translatable="yes">Edit the 
currently selected DNS name here.</property>
                              <property name="can_focus">True</property>
                              <property name="editable">True</property>
                              <property name="visibility">True</property>
                              <property name="max_length">0</property>
                              <property name="text" translatable="yes"></property>
                              <property name="has_frame">True</property>
                              <property name="invisible_char" 
translatable="yes">*</property>
                              <property name="activates_default">False</property>
                            </widget>
                            <packing>
                              <property name="padding">0</property>
                              <property name="expand">True</property>
                              <property name="fill">True</property>
                            </packing>
                          </child>
                        </widget>
                        <packing>
                          <property name="padding">0</property>
                          <property name="expand">True</property>
                          <property name="fill">True</property>
                        </packing>
                      </child>

                      <child>
                        <widget class="GtkHButtonBox" id="entry_buttonbox">
                          <property name="visible">True</property>
                          <property 
name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
                          <property name="spacing">0</property>

                          <child>
                            <widget class="GtkButton" id="add_button">
                              <property name="visible">True</property>
                              <property name="tooltip" translatable="yes">Add a 
subdomain under the currently selected DNS name.</property>
                              <property name="can_default">True</property>
                              <property name="can_focus">True</property>
                              <property name="label" translatable="yes">Add 
Child</property>
                              <property name="use_underline">True</property>
                              <property name="relief">GTK_RELIEF_NORMAL</property>
                            </widget>
                          </child>

                          <child>
                            <widget class="GtkButton" id="tuning_button">
                              <property name="visible">True</property>
                              <property name="tooltip" translatable="yes">Edit 
parameters that tune the caching behavor of the currently selected zone.</property>
                              <property name="can_default">True</property>
                              <property name="can_focus">True</property>
                              <property name="label" 
translatable="yes">Tuning</property>
                              <property name="use_underline">True</property>
                              <property name="relief">GTK_RELIEF_NORMAL</property>
                            </widget>
                          </child>

                          <child>
                            <widget class="GtkButton" id="delete_button">
                              <property name="visible">True</property>
                              <property name="tooltip" translatable="yes">Delete rhe 
currently selected DNS name.</property>
                              <property name="can_default">True</property>
                              <property name="can_focus">True</property>
                              <property name="label" translatable="yes">Delete 
This</property>
                              <property name="use_underline">True</property>
                              <property name="relief">GTK_RELIEF_NORMAL</property>
                            </widget>
                          </child>
                        </widget>
                        <packing>
                          <property name="padding">6</property>
                          <property name="expand">False</property>
                          <property name="fill">False</property>
                        </packing>
                      </child>
                    </widget>
                    <packing>
                      <property name="padding">0</property>
                      <property name="expand">False</property>
                      <property name="fill">True</property>
                    </packing>
                  </child>

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

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

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

                              <child>
                                <widget class="GtkLabel" id="newentry_label">
                                  <property name="visible">True</property>
                                  <property name="label" 
translatable="yes">Entry:</property>
                                  <property name="use_underline">False</property>
                                  <property name="use_markup">False</property>
                                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                                  <property name="wrap">False</property>
                                  <property name="selectable">False</property>
                                  <property name="xalign">0.5</property>
                                  <property name="yalign">0.5</property>
                                  <property name="xpad">0</property>
                                  <property name="ypad">0</property>
                                </widget>
                                <packing>
                                  <property name="padding">0</property>
                                  <property name="expand">False</property>
                                  <property name="fill">False</property>
                                </packing>
                              </child>

                              <child>
                                <widget class="GtkEntry" id="newentry_entry">
                                  <property name="visible">True</property>
                                  <property name="tooltip" translatable="yes">Edit the 
currently selected property here.</property>
                                  <property name="can_focus">True</property>
                                  <property name="editable">True</property>
                                  <property name="visibility">True</property>
                                  <property name="max_length">0</property>
                                  <property name="text" translatable="yes"></property>
                                  <property name="has_frame">True</property>
                                  <property name="invisible_char" 
translatable="yes">*</property>
                                  <property name="activates_default">False</property>
                                </widget>
                                <packing>
                                  <property name="padding">0</property>
                                  <property name="expand">True</property>
                                  <property name="fill">True</property>
                                </packing>
                              </child>
                            </widget>
                            <packing>
                              <property name="padding">5</property>
                              <property name="expand">False</property>
                              <property name="fill">False</property>
                            </packing>
                          </child>

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

                              <child>
                                <widget class="GtkScrolledWindow" id="scrolledwindow4">
                                  <property name="visible">True</property>
                                  <property name="can_focus">True</property>
                                  <property 
name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
                                  <property 
name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
                                  <property 
name="shadow_type">GTK_SHADOW_NONE</property>
                                  <property 
name="window_placement">GTK_CORNER_TOP_LEFT</property>

                                  <child>
                                    <widget class="GtkTreeView" id="properties">
                                      <property name="visible">True</property>
                                      <property name="tooltip" translatable="yes">The 
list of properties associated with the currently selected domain name.</property>
                                      <property name="can_focus">True</property>
                                      <property name="headers_visible">False</property>
                                      <property name="rules_hint">False</property>
                                      <property name="reorderable">False</property>
                                      <property name="enable_search">True</property>
                                    </widget>
                                  </child>
                                </widget>
                                <packing>
                                  <property name="padding">0</property>
                                  <property name="expand">True</property>
                                  <property name="fill">True</property>
                                </packing>
                              </child>

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

                                  <child>
                                    <widget class="GtkVButtonBox" 
id="entry_action_box">
                                      <property name="visible">True</property>
                                      <property 
name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
                                      <property name="spacing">0</property>

                                      <child>
                                        <widget class="GtkButton" id="newentry_button">
                                          <property name="visible">True</property>
                                          <property name="tooltip" 
translatable="yes">Add a new, blank property to the DNS name currently selected in the 
Domain View.</property>
                                          <property name="can_default">True</property>
                                          <property name="can_focus">True</property>
                                          <property name="label" 
translatable="yes">New</property>
                                          <property 
name="use_underline">True</property>
                                          <property 
name="relief">GTK_RELIEF_NORMAL</property>
                                          <signal name="clicked" 
handler="on_newentry_button_clicked" last_modification_time="Wed, 19 Feb 2003 00:34:32 
GMT"/>
                                        </widget>
                                      </child>

                                      <child>
                                        <widget class="GtkButton" 
id="deleteentry_button">
                                          <property name="visible">True</property>
                                          <property name="tooltip" 
translatable="yes">Delete the property selected in Properties of the DNS name selected 
in Domain View.</property>
                                          <property name="can_default">True</property>
                                          <property name="can_focus">True</property>
                                          <property name="label" 
translatable="yes">Delete</property>
                                          <property 
name="use_underline">True</property>
                                          <property 
name="relief">GTK_RELIEF_NORMAL</property>
                                        </widget>
                                      </child>
                                    </widget>
                                    <packing>
                                      <property name="padding">15</property>
                                      <property name="expand">False</property>
                                      <property name="fill">True</property>
                                    </packing>
                                  </child>

                                  <child>
                                    <widget class="GtkRadioButton" id="a_radiobutton">
                                      <property name="visible">True</property>
                                      <property name="tooltip" translatable="yes">Add 
an IP address property (known as an A record) to the DNS name selected in the Domain 
View.</property>
                                      <property name="can_focus">True</property>
                                      <property name="label" translatable="yes">IP 
Address</property>
                                      <property name="use_underline">True</property>
                                      <property 
name="relief">GTK_RELIEF_NORMAL</property>
                                      <property name="active">False</property>
                                      <property name="inconsistent">False</property>
                                      <property name="draw_indicator">True</property>
                                    </widget>
                                    <packing>
                                      <property name="padding">0</property>
                                      <property name="expand">False</property>
                                      <property name="fill">False</property>
                                    </packing>
                                  </child>

                                  <child>
                                    <widget class="GtkRadioButton" id="mx_radiobutton">
                                      <property name="visible">True</property>
                                      <property name="tooltip" translatable="yes">Add 
a mailserver property (part of an MX record) for the DNS name specified in the Domain 
View.</property>
                                      <property name="can_focus">True</property>
                                      <property name="label" 
translatable="yes">Mailserver</property>
                                      <property name="use_underline">True</property>
                                      <property 
name="relief">GTK_RELIEF_NORMAL</property>
                                      <property name="active">False</property>
                                      <property name="inconsistent">False</property>
                                      <property name="draw_indicator">True</property>
                                      <property name="group">a_radiobutton</property>
                                    </widget>
                                    <packing>
                                      <property name="padding">0</property>
                                      <property name="expand">False</property>
                                      <property name="fill">False</property>
                                    </packing>
                                  </child>

                                  <child>
                                    <widget class="GtkRadioButton" id="cname_button">
                                      <property name="visible">True</property>
                                      <property name="tooltip" translatable="yes">Add 
an alias property (a CNAME record) for the DNS name specified in the Domain 
View.</property>
                                      <property name="can_focus">True</property>
                                      <property name="label" 
translatable="yes">Redirection</property>
                                      <property name="use_underline">True</property>
                                      <property 
name="relief">GTK_RELIEF_NORMAL</property>
                                      <property name="active">False</property>
                                      <property name="inconsistent">False</property>
                                      <property name="draw_indicator">True</property>
                                      <property name="group">a_radiobutton</property>
                                    </widget>
                                    <packing>
                                      <property name="padding">0</property>
                                      <property name="expand">False</property>
                                      <property name="fill">False</property>
                                    </packing>
                                  </child>

                                  <child>
                                    <widget class="GtkRadioButton" id="ns_button">
                                      <property name="visible">True</property>
                                      <property name="tooltip" translatable="yes">Add 
a delegation property (an NS record) to the DNS name specified in the Domain 
View.</property>
                                      <property name="can_focus">True</property>
                                      <property name="label" translatable="yes"> 
Delegation</property>
                                      <property name="use_underline">True</property>
                                      <property 
name="relief">GTK_RELIEF_NORMAL</property>
                                      <property name="active">False</property>
                                      <property name="inconsistent">False</property>
                                      <property name="draw_indicator">True</property>
                                      <property name="group">a_radiobutton</property>
                                    </widget>
                                    <packing>
                                      <property name="padding">0</property>
                                      <property name="expand">False</property>
                                      <property name="fill">False</property>
                                    </packing>
                                  </child>
                                </widget>
                                <packing>
                                  <property name="padding">15</property>
                                  <property name="expand">False</property>
                                  <property name="fill">True</property>
                                </packing>
                              </child>
                            </widget>
                            <packing>
                              <property name="padding">0</property>
                              <property name="expand">True</property>
                              <property name="fill">True</property>
                            </packing>
                          </child>
                        </widget>
                        <packing>
                          <property name="padding">0</property>
                          <property name="expand">True</property>
                          <property name="fill">True</property>
                        </packing>
                      </child>
                    </widget>
                    <packing>
                      <property name="padding">0</property>
                      <property name="expand">True</property>
                      <property name="fill">True</property>
                    </packing>
                  </child>

                  <child>
                    <widget class="GtkFrame" id="commentframe">
                      <property name="visible">True</property>
                      <property name="label_xalign">0</property>
                      <property name="label_yalign">0.5</property>
                      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>

                      <child>
                        <widget class="GtkScrolledWindow" id="commentwindow">
                          <property name="visible">True</property>
                          <property name="can_focus">True</property>
                          <property 
name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
                          <property 
name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
                          <property name="shadow_type">GTK_SHADOW_NONE</property>
                          <property 
name="window_placement">GTK_CORNER_TOP_LEFT</property>

                          <child>
                            <widget class="GtkTextView" id="commentview">
                              <property name="visible">True</property>
                              <property name="tooltip" translatable="yes">Edit a 
comment (a TXT record) to be associated with the DNS name selected in the Domain 
View.</property>
                              <property name="can_focus">True</property>
                              <property name="editable">True</property>
                              <property 
name="justification">GTK_JUSTIFY_LEFT</property>
                              <property name="wrap_mode">GTK_WRAP_NONE</property>
                              <property name="cursor_visible">True</property>
                              <property name="pixels_above_lines">0</property>
                              <property name="pixels_below_lines">0</property>
                              <property name="pixels_inside_wrap">0</property>
                              <property name="left_margin">0</property>
                              <property name="right_margin">0</property>
                              <property name="indent">0</property>
                              <property name="text" translatable="yes"></property>
                            </widget>
                          </child>
                        </widget>
                      </child>

                      <child>
                        <widget class="GtkLabel" id="comment_label">
                          <property name="visible">True</property>
                          <property name="label" translatable="yes">Comment:</property>
                          <property name="use_underline">False</property>
                          <property name="use_markup">False</property>
                          <property name="justify">GTK_JUSTIFY_LEFT</property>
                          <property name="wrap">False</property>
                          <property name="selectable">False</property>
                          <property name="xalign">0.5</property>
                          <property name="yalign">0.5</property>
                          <property name="xpad">0</property>
                          <property name="ypad">0</property>
                        </widget>
                        <packing>
                          <property name="type">label_item</property>
                        </packing>
                      </child>
                    </widget>
                    <packing>
                      <property name="padding">0</property>
                      <property name="expand">False</property>
                      <property name="fill">True</property>
                    </packing>
                  </child>
                </widget>
              </child>

              <child>
                <widget class="GtkLabel" id="properties_label">
                  <property name="visible">True</property>
                  <property name="label" translatable="yes">Properties:</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                  <property name="wrap">False</property>
                  <property name="selectable">False</property>
                  <property name="xalign">0.5</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
                </widget>
                <packing>
                  <property name="type">label_item</property>
                </packing>
              </child>
            </widget>
            <packing>
              <property name="shrink">True</property>
              <property name="resize">True</property>
            </packing>
          </child>
        </widget>
        <packing>
          <property name="padding">0</property>
          <property name="expand">True</property>
          <property name="fill">True</property>
        </packing>
      </child>
    </widget>
  </child>
</widget>

<widget class="GtkDialog" id="soa_tuning">
  <property name="title" translatable="yes">SOA tuning information</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">False</property>
  <property name="destroy_with_parent">False</property>
  <property name="has_separator">True</property>

  <child internal-child="vbox">
    <widget class="GtkVBox" id="dialog-vbox1">
      <property name="visible">True</property>
      <property name="homogeneous">False</property>
      <property name="spacing">0</property>

      <child internal-child="action_area">
        <widget class="GtkHButtonBox" id="dialog-action_area1">
          <property name="visible">True</property>
          <property name="layout_style">GTK_BUTTONBOX_END</property>

          <child>
            <widget class="GtkButton" id="cancelbutton1">
              <property name="visible">True</property>
              <property name="can_default">True</property>
              <property name="can_focus">True</property>
              <property name="label">gtk-cancel</property>
              <property name="use_stock">True</property>
              <property name="relief">GTK_RELIEF_NORMAL</property>
              <property name="response_id">-6</property>
            </widget>
          </child>

          <child>
            <widget class="GtkButton" id="applybutton1">
              <property name="visible">True</property>
              <property name="can_default">True</property>
              <property name="can_focus">True</property>
              <property name="label">gtk-apply</property>
              <property name="use_stock">True</property>
              <property name="relief">GTK_RELIEF_NORMAL</property>
              <property name="response_id">-10</property>
            </widget>
          </child>

          <child>
            <widget class="GtkButton" id="okbutton1">
              <property name="visible">True</property>
              <property name="can_default">True</property>
              <property name="can_focus">True</property>
              <property name="label">gtk-ok</property>
              <property name="use_stock">True</property>
              <property name="relief">GTK_RELIEF_NORMAL</property>
              <property name="response_id">-5</property>
            </widget>
          </child>
        </widget>
        <packing>
          <property name="padding">0</property>
          <property name="expand">False</property>
          <property name="fill">True</property>
          <property name="pack_type">GTK_PACK_END</property>
        </packing>
      </child>

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

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

              <child>
                <widget class="GtkLabel" id="label2">
                  <property name="visible">True</property>
                  <property name="label" translatable="yes">Tuning parameters for: 
</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                  <property name="wrap">False</property>
                  <property name="selectable">False</property>
                  <property name="xalign">0.5</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
                </widget>
                <packing>
                  <property name="padding">0</property>
                  <property name="expand">False</property>
                  <property name="fill">False</property>
                </packing>
              </child>

              <child>
                <widget class="GtkEntry" id="tuning_domain">
                  <property name="visible">True</property>
                  <property name="can_focus">True</property>
                  <property name="editable">False</property>
                  <property name="visibility">True</property>
                  <property name="max_length">0</property>
                  <property name="text" translatable="yes"></property>
                  <property name="has_frame">True</property>
                  <property name="invisible_char" translatable="yes">*</property>
                  <property name="activates_default">False</property>
                </widget>
                <packing>
                  <property name="padding">0</property>
                  <property name="expand">False</property>
                  <property name="fill">False</property>
                </packing>
              </child>
            </widget>
            <packing>
              <property name="padding">0</property>
              <property name="expand">True</property>
              <property name="fill">True</property>
            </packing>
          </child>

          <child>
            <widget class="GtkTable" id="tuning_params">
              <property name="visible">True</property>
              <property name="n_rows">6</property>
              <property name="n_columns">2</property>
              <property name="homogeneous">False</property>
              <property name="row_spacing">0</property>
              <property name="column_spacing">0</property>

              <child>
                <widget class="GtkLabel" id="nameserver_label">
                  <property name="visible">True</property>
                  <property name="label" translatable="yes">Authoritative nameserver: 
</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                  <property name="wrap">False</property>
                  <property name="selectable">False</property>
                  <property name="xalign">0</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
                </widget>
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
                  <property name="top_attach">0</property>
                  <property name="bottom_attach">1</property>
                  <property name="x_options">fill</property>
                  <property name="y_options"></property>
                </packing>
              </child>

              <child>
                <widget class="GtkLabel" id="contact_label">
                  <property name="visible">True</property>
                  <property name="label" translatable="yes">Zone contact address: 
</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                  <property name="wrap">False</property>
                  <property name="selectable">False</property>
                  <property name="xalign">0</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
                </widget>
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
                  <property name="top_attach">1</property>
                  <property name="bottom_attach">2</property>
                  <property name="x_options">fill</property>
                  <property name="y_options"></property>
                </packing>
              </child>

              <child>
                <widget class="GtkLabel" id="refresh_label">
                  <property name="visible">True</property>
                  <property name="label" translatable="yes">Refresh time 
(seconds):</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                  <property name="wrap">False</property>
                  <property name="selectable">False</property>
                  <property name="xalign">0</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
                </widget>
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
                  <property name="top_attach">2</property>
                  <property name="bottom_attach">3</property>
                  <property name="x_options">fill</property>
                  <property name="y_options"></property>
                </packing>
              </child>

              <child>
                <widget class="GtkLabel" id="retry_label">
                  <property name="visible">True</property>
                  <property name="label" translatable="yes">Retry time 
(seconds):</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                  <property name="wrap">False</property>
                  <property name="selectable">False</property>
                  <property name="xalign">0</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
                </widget>
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
                  <property name="top_attach">3</property>
                  <property name="bottom_attach">4</property>
                  <property name="x_options">fill</property>
                  <property name="y_options"></property>
                </packing>
              </child>

              <child>
                <widget class="GtkLabel" id="expire_label">
                  <property name="visible">True</property>
                  <property name="label" translatable="yes">Expire time (seconds): 
</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                  <property name="wrap">False</property>
                  <property name="selectable">False</property>
                  <property name="xalign">0</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
                </widget>
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
                  <property name="top_attach">4</property>
                  <property name="bottom_attach">5</property>
                  <property name="x_options">fill</property>
                  <property name="y_options"></property>
                </packing>
              </child>

              <child>
                <widget class="GtkLabel" id="minimum_label">
                  <property name="visible">True</property>
                  <property name="label" translatable="yes">Minimum time (seconds): 
</property>
                  <property name="use_underline">False</property>
                  <property name="use_markup">False</property>
                  <property name="justify">GTK_JUSTIFY_LEFT</property>
                  <property name="wrap">False</property>
                  <property name="selectable">False</property>
                  <property name="xalign">0</property>
                  <property name="yalign">0.5</property>
                  <property name="xpad">0</property>
                  <property name="ypad">0</property>
                </widget>
                <packing>
                  <property name="left_attach">0</property>
                  <property name="right_attach">1</property>
                  <property name="top_attach">5</property>
                  <property name="bottom_attach">6</property>
                  <property name="x_options">fill</property>
                  <property name="y_options"></property>
                </packing>
              </child>

              <child>
                <widget class="GtkEntry" id="namserver_entry">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Name of the 
authoritative nameserver for this domain.</property>
                  <property name="can_focus">True</property>
                  <property name="editable">True</property>
                  <property name="visibility">True</property>
                  <property name="max_length">0</property>
                  <property name="text" translatable="yes"></property>
                  <property name="has_frame">True</property>
                  <property name="invisible_char" translatable="yes">*</property>
                  <property name="activates_default">False</property>
                </widget>
                <packing>
                  <property name="left_attach">1</property>
                  <property name="right_attach">2</property>
                  <property name="top_attach">0</property>
                  <property name="bottom_attach">1</property>
                  <property name="y_options"></property>
                </packing>
              </child>

              <child>
                <widget class="GtkEntry" id="contact_entry">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Email address of the 
zone administrative contact.</property>
                  <property name="can_focus">True</property>
                  <property name="editable">True</property>
                  <property name="visibility">True</property>
                  <property name="max_length">0</property>
                  <property name="text" translatable="yes"></property>
                  <property name="has_frame">True</property>
                  <property name="invisible_char" translatable="yes">*</property>
                  <property name="activates_default">False</property>
                </widget>
                <packing>
                  <property name="left_attach">1</property>
                  <property name="right_attach">2</property>
                  <property name="top_attach">1</property>
                  <property name="bottom_attach">2</property>
                  <property name="y_options">expand</property>
                </packing>
              </child>

              <child>
                <widget class="GtkSpinButton" id="refresh_spin">
                  <property name="visible">True</property>
                  <property name="can_focus">True</property>
                  <property name="climb_rate">1</property>
                  <property name="digits">0</property>
                  <property name="numeric">False</property>
                  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
                  <property name="snap_to_ticks">False</property>
                  <property name="wrap">False</property>
                  <property name="adjustment">1 0 100 1 10 10</property>
                </widget>
                <packing>
                  <property name="left_attach">1</property>
                  <property name="right_attach">2</property>
                  <property name="top_attach">2</property>
                  <property name="bottom_attach">3</property>
                  <property name="y_options">expand</property>
                </packing>
              </child>

              <child>
                <widget class="GtkSpinButton" id="retry_spin">
                  <property name="visible">True</property>
                  <property name="can_focus">True</property>
                  <property name="climb_rate">1</property>
                  <property name="digits">0</property>
                  <property name="numeric">False</property>
                  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
                  <property name="snap_to_ticks">False</property>
                  <property name="wrap">False</property>
                  <property name="adjustment">1 0 100 1 10 10</property>
                </widget>
                <packing>
                  <property name="left_attach">1</property>
                  <property name="right_attach">2</property>
                  <property name="top_attach">3</property>
                  <property name="bottom_attach">4</property>
                  <property name="y_options">expand</property>
                </packing>
              </child>

              <child>
                <widget class="GtkSpinButton" id="expire_spin">
                  <property name="visible">True</property>
                  <property name="tooltip" translatable="yes">Interval after which 
this record becomes invalid.</property>
                  <property name="can_focus">True</property>
                  <property name="climb_rate">1</property>
                  <property name="digits">0</property>
                  <property name="numeric">False</property>
                  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
                  <property name="snap_to_ticks">False</property>
                  <property name="wrap">False</property>
                  <property name="adjustment">1 0 100 1 10 10</property>
                </widget>
                <packing>
                  <property name="left_attach">1</property>
                  <property name="right_attach">2</property>
                  <property name="top_attach">4</property>
                  <property name="bottom_attach">5</property>
                  <property name="y_options">expand</property>
                </packing>
              </child>

              <child>
                <widget class="GtkSpinButton" id="minimum_spin">
                  <property name="visible">True</property>
                  <property name="can_focus">True</property>
                  <property name="climb_rate">1</property>
                  <property name="digits">0</property>
                  <property name="numeric">False</property>
                  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
                  <property name="snap_to_ticks">False</property>
                  <property name="wrap">False</property>
                  <property name="adjustment">1 0 100 1 10 10</property>
                </widget>
                <packing>
                  <property name="left_attach">1</property>
                  <property name="right_attach">2</property>
                  <property name="top_attach">5</property>
                  <property name="bottom_attach">6</property>
                  <property name="y_options">expand</property>
                </packing>
              </child>
            </widget>
            <packing>
              <property name="padding">9</property>
              <property name="expand">True</property>
              <property name="fill">True</property>
            </packing>
          </child>
        </widget>
        <packing>
          <property name="padding">0</property>
          <property name="expand">True</property>
          <property name="fill">True</property>
        </packing>
      </child>
    </widget>
  </child>
</widget>

<widget class="GtkFileSelection" id="config_file_selection">
  <property name="border_width">10</property>
  <property name="title" translatable="yes">Select DNS configuration File</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">True</property>
  <property name="show_fileops">True</property>

  <child internal-child="cancel_button">
    <widget class="GtkButton" id="cancel_button1">
      <property name="visible">True</property>
      <property name="can_default">True</property>
      <property name="can_focus">True</property>
      <property name="relief">GTK_RELIEF_NORMAL</property>
    </widget>
  </child>

  <child internal-child="ok_button">
    <widget class="GtkButton" id="ok_button1">
      <property name="visible">True</property>
      <property name="can_default">True</property>
      <property name="can_focus">True</property>
      <property name="relief">GTK_RELIEF_NORMAL</property>
    </widget>
  </child>
</widget>

</glade-interface>
#!/usr/bin/env python

import os, sys, time
from gtk import *
from gtk.glade import *

class Oakum:
    def __init__(self):
        self.wtree = XML("oakum.glade") # Actually instantiates the widgets.
        dict = {}
        for key in dir(self.__class__):
            dict[key] = getattr(self, key)
        self.wtree.signal_autoconnect(dict)
    def on_window1_destroy(self, obj):
        mainquit()
    def on_newentry_button_clicked(self, obj):
        print "New button clicked"
    def on_save1_activate(self, obj):
        pass
    def on_preferences1_activate(self, obj):
        pass
    def on_quit11_activate(self, obj):
        pass
    def on_about1_activate(self, obj):
        pass
    def on_open1_activate(self, obj):
        pass
    def on_paste1_activate(self, obj):
        pass
    def on_clear1_activate(self, obj):
        pass
    def on_save_as1_activate(self, obj):
        pass
    def on_properties1_activate(self, obj):
        pass
    def on_copy1_activate(self, obj):
        pass
    def on_quit1_activate(self, obj):
        pass
    def on_cut1_activate(self, obj):
        pass
    def on_new1_activate(self, obj):
        pass

if __name__ == "__main__":
    Oakum()
    mainloop()

# End

Reply via email to