[PATCH 3/4] Add ability to manipulate container sizes directly.

Chris Lumens clumens at redhat.com
Thu May 2 18:48:09 UTC 2013


> diff --git a/pyanaconda/ui/gui/spokes/custom.glade b/pyanaconda/ui/gui/spokes/custom.glade
> index c969a86..7db9bf3 100644
> --- a/pyanaconda/ui/gui/spokes/custom.glade
> +++ b/pyanaconda/ui/gui/spokes/custom.glade
> @@ -636,6 +636,61 @@ use.  Try something else?</property>
>                  <property name="position">5</property>
>                </packing>
>              </child>
> +            <child>
> +              <object class="GtkBox" id="reservedSpaceBox">
> +                <property name="visible">True</property>
> +                <property name="can_focus">False</property>
> +                <property name="spacing">6</property>
> +                <child>
> +                  <object class="GtkLabel" id="containerSizeLabel">
> +                    <property name="visible">True</property>
> +                    <property name="can_focus">False</property>
> +                    <property name="label" translatable="yes">Size policy: </property>
> +                  </object>
> +                  <packing>
> +                    <property name="expand">False</property>
> +                    <property name="fill">True</property>
> +                    <property name="position">0</property>
> +                  </packing>
> +                </child>
> +                <child>
> +                  <object class="GtkComboBoxText" id="containerSizeCombo">
> +                    <property name="visible">True</property>
> +                    <property name="can_focus">False</property>
> +                    <property name="entry_text_column">0</property>
> +                    <property name="id_column">1</property>
> +                    <items>
> +                      <item translatable="yes">Automatic</item>
> +                      <item translatable="yes">As large as possible</item>
> +                      <item translatable="yes">Fixed</item>
> +                    </items>
> +                    <signal name="changed" handler="on_size_changed" swapped="no"/>
> +                  </object>

Remember to give containerSizeLabel an underline and then set
containerSizeCombo as its mnemonic widget.  You will probably also want
to get rid of that trailing space from containerSizeLabel, too.  The
spacing on the containing box should do all you need there.

> @@ -424,6 +426,26 @@ class ContainerDialog(GUIObject):
>          raidStoreFilter.refilter()
>          self._populate_raid()
>  
> +        size_policy_combo = self.builder.get_object("containerSizeCombo")
> +        size_entry = self.builder.get_object("containerSizeEntry")
> +        size_label = self.builder.get_object("containerSizeLabel")

You grab these objects several times in this class.  It'd be worth
doing so once and assigning them to variables.

- Chris


More information about the anaconda-patches mailing list