[PATCH 2/5] Bonding support: GUI - add device dialog (glade) (#906263)

Chris Lumens clumens at redhat.com
Mon Mar 11 14:11:21 UTC 2013


> diff --git a/pyanaconda/ui/gui/spokes/network.glade b/pyanaconda/ui/gui/spokes/network.glade
> index 740b565..31b485a 100644
> --- a/pyanaconda/ui/gui/spokes/network.glade
> +++ b/pyanaconda/ui/gui/spokes/network.glade
> @@ -2,6 +2,120 @@
>  <interface>
>    <!-- interface-requires gtk+ 3.0 -->
>    <!-- interface-requires AnacondaWidgets 1.0 -->
> +  <object class="GtkListStore" id="liststore_add_device">
> +    <columns>
> +      <!-- column-name label -->
> +      <column type="gchararray"/>
> +      <!-- column-name type -->
> +      <column type="gchararray"/>
> +    </columns>
> +    <data>
> +      <row>
> +        <col id="0" translatable="yes">Bond</col>
> +        <col id="1" translatable="yes">bond</col>
> +      </row>
> +    </data>
> +  </object>
> +  <object class="GtkDialog" id="add_device_dialog">
> +    <property name="can_focus">False</property>
> +    <property name="border_width">5</property>
> +    <property name="title" translatable="yes">Add device</property>
> +    <property name="type_hint">dialog</property>

Remember to mark this dialog as decoratable=False.

> +        <child>
> +          <object class="GtkBox" id="box1">
> +            <property name="visible">True</property>
> +            <property name="can_focus">False</property>
> +            <property name="orientation">vertical</property>
> +            <child>
> +              <object class="GtkLabel" id="label_add_device">
> +                <property name="visible">True</property>
> +                <property name="can_focus">False</property>
> +                <property name="label" translatable="yes">Select the type of device you wish to add.</property>
> +              </object>
> +              <packing>
> +                <property name="expand">False</property>
> +                <property name="fill">True</property>
> +                <property name="position">0</property>
> +              </packing>
> +            </child>
> +            <child>
> +              <object class="GtkComboBox" id="combobox_add_device">
> +                <property name="visible">True</property>
> +                <property name="can_focus">False</property>
> +                <property name="model">liststore_add_device</property>
> +                <property name="active">0</property>
> +                <child>
> +                  <object class="GtkCellRendererText" id="cellrenderertext1"/>
> +                  <attributes>
> +                    <attribute name="text">0</attribute>
> +                  </attributes>
> +                </child>
> +              </object>

The label should be the mnemonic widget for the combo box so that it is
accessible via keyboard accelerator.  You can do that by assigning an
underscore to some letter in the label and picking "use underline", then
by setting "mnemonic widget" on the combo box to be the label.

- Chris


More information about the anaconda-patches mailing list