[PATCH master] network spoke: clear device info if no network devices are found (#853903)

Vratislav Podzimek vpodzime at redhat.com
Fri Sep 7 08:45:22 UTC 2012


This looks good to me except one thing we have discussed face to face --
patching status property to return "No network devices available" in
such cases.

On Thu, 2012-09-06 at 16:00 +0200, Radek Vykydal wrote:
> before: http://rvykydal.fedorapeople.org/nonic1.png
> after:  http://rvykydal.fedorapeople.org/nonic3.png
> 
> I was also thinking of making network spoke not ready if there are no network
> devices but it would prevent continuing installation and wouldn't take care
> of standalone spoke (probably). For now I'd go with this. We may consider
> disabling of network spoke button (with sorting out spokes dependency logic)
> later.
> 
> ---
>  pyanaconda/ui/gui/spokes/network.glade |   47 ++++++++++++++++++++++++++++---
>  pyanaconda/ui/gui/spokes/network.py    |    3 ++
>  2 files changed, 45 insertions(+), 5 deletions(-)
> 
> diff --git a/pyanaconda/ui/gui/spokes/network.glade b/pyanaconda/ui/gui/spokes/network.glade
> index 49c75c2..88b0d7c 100644
> --- a/pyanaconda/ui/gui/spokes/network.glade
> +++ b/pyanaconda/ui/gui/spokes/network.glade
> @@ -1729,7 +1729,7 @@ updates available for you.</property>
>                                      </child>
>                                    </object>
>                                    <packing>
> -                                    <property name="position">2</property>
> +                                    <property name="position">3</property>
>                                    </packing>
>                                  </child>
>                                  <child type="tab">
> @@ -1739,7 +1739,7 @@ updates available for you.</property>
>                                      <property name="label">vpn</property>
>                                    </object>
>                                    <packing>
> -                                    <property name="position">2</property>
> +                                    <property name="position">3</property>
>                                      <property name="tab_fill">False</property>
>                                    </packing>
>                                  </child>
> @@ -2097,7 +2097,7 @@ updates available for you.</property>
>                                      </child>
>                                    </object>
>                                    <packing>
> -                                    <property name="position">2</property>
> +                                    <property name="position">4</property>
>                                    </packing>
>                                  </child>
>                                  <child type="tab">
> @@ -2107,7 +2107,44 @@ updates available for you.</property>
>                                      <property name="label">proxy</property>
>                                    </object>
>                                    <packing>
> -                                    <property name="position">2</property>
> +                                    <property name="position">4</property>
> +                                    <property name="tab_fill">False</property>
> +                                  </packing>
> +                                </child>
> +                                <child>
> +                                  <object class="GtkVBox" id="vboxNodevice">
> +                                    <property name="visible">True</property>
> +                                    <property name="can_focus">False</property>
> +                                    <property name="border_width">12</property>
> +                                    <property name="spacing">6</property>
> +                                    <child>
> +                                      <object class="GtkLabel" id="label2">
> +                                        <property name="visible">True</property>
> +                                        <property name="can_focus">False</property>
> +                                        <property name="label" translatable="yes">No network devices available</property>
> +                                      </object>
> +                                      <packing>
> +                                        <property name="expand">False</property>
> +                                        <property name="fill">False</property>
> +                                        <property name="position">0</property>
> +                                      </packing>
> +                                    </child>
> +                                    <child>
> +                                      <placeholder/>
> +                                    </child>
> +                                  </object>
> +                                  <packing>
> +                                    <property name="position">5</property>
> +                                  </packing>
> +                                </child>
> +                                <child type="tab">
> +                                  <object class="GtkLabel" id="label1">
> +                                    <property name="visible">True</property>
> +                                    <property name="can_focus">False</property>
> +                                    <property name="label">nodevice</property>
> +                                  </object>
> +                                  <packing>
> +                                    <property name="position">5</property>
>                                      <property name="tab_fill">False</property>
>                                    </packing>
>                                  </child>
> @@ -2121,7 +2158,7 @@ updates available for you.</property>
>                                      <property name="label">other</property>
>                                    </object>
>                                    <packing>
> -                                    <property name="position">2</property>
> +                                    <property name="position">6</property>
>                                      <property name="tab_fill">False</property>
>                                    </packing>
>                                  </child>
> diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
> index 9a862aa..6d72052 100644
> --- a/pyanaconda/ui/gui/spokes/network.py
> +++ b/pyanaconda/ui/gui/spokes/network.py
> @@ -575,7 +575,10 @@ class NetworkControlBox():
>              del(row)
>  
>      def refresh_ui(self, device, read_config_values=True):
> +
>          if not device:
> +            notebook = self.builder.get_object("notebook_types")
> +            notebook.set_current_page(5)
>              return
>  
>          self._refresh_device_type_page(device)

-- 
Vratislav Podzimek

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



More information about the anaconda-patches mailing list