[PATCH 1/2] Add viewports for the ListBoxes in the software spoke.

Vratislav Podzimek vpodzime at redhat.com
Fri Apr 25 08:08:43 UTC 2014


On Thu, 2014-04-24 at 14:54 -0400, David Shea wrote:
> We had been defining the GtkListBox objects as direct children of the
> GtkScrolledWindows, since an automatic viewport was added this way and
> using an explict viewport broke the keyboard bindings. However, glade
> seriously did not like this, and the bug in gtk appears to be fixed, so
> adding explicit viewports.
> ---
>  pyanaconda/ui/gui/spokes/software.glade | 22 ++++++++++++++++++----
>  1 file changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/pyanaconda/ui/gui/spokes/software.glade b/pyanaconda/ui/gui/spokes/software.glade
> index 2a2acd8..179ac7c 100644
> --- a/pyanaconda/ui/gui/spokes/software.glade
> +++ b/pyanaconda/ui/gui/spokes/software.glade
> @@ -105,11 +105,18 @@
>                          <property name="hscrollbar_policy">never</property>
>                          <property name="shadow_type">in</property>
>                          <child>
> -                          <object class="GtkListBox" id="addonListBox">
> +                          <object class="GtkViewport" id="addonViewport">
>                              <property name="width_request">250</property>
>                              <property name="visible">True</property>
>                              <property name="can_focus">False</property>
> -                            <signal name="row-activated" handler="on_addon_activated" swapped="no"/>
> +                            <child>
> +                              <object class="GtkListBox" id="addonListBox">
> +                                <property name="visible">True</property>
> +                                <property name="can_focus">False</property>
> +                                <property name="hexpand">True</property>
> +                                <signal name="row-activated" handler="on_addon_activated" swapped="no"/>
> +                              </object>
> +                            </child>
>                            </object>
>                          </child>
>                        </object>
> @@ -130,11 +137,18 @@
>                          <property name="hscrollbar_policy">never</property>
>                          <property name="shadow_type">in</property>
>                          <child>
> -                          <object class="GtkListBox" id="environmentListBox">
> +                          <object class="GtkViewport" id="environmentViewport">
>                              <property name="width_request">250</property>
>                              <property name="visible">True</property>
>                              <property name="can_focus">False</property>
> -                            <signal name="row-activated" handler="on_environment_activated" swapped="no"/>
> +                            <child>
> +                              <object class="GtkListBox" id="environmentListBox">
> +                                <property name="visible">True</property>
> +                                <property name="can_focus">False</property>
> +                                <property name="hexpand">True</property>
> +                                <signal name="row-activated" handler="on_environment_activated" swapped="no"/>
> +                              </object>
> +                            </child>
>                            </object>
>                          </child>
>                        </object>
This one looks good to me and I'd also go with the other one. If there
are some troubles, we can always fix or revert it.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list