[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Proposal of minor LiveDVD F19 network/hostname configuration UX improvement (PATCH included)



On 05/30/2013 12:15 PM, Radek Vykydal wrote:

Also I'll need to work a bit on status update for wifi connections
(the info below the NETWORK CONFIGURATION)
in hub which does not work quite right now but it shouldn't be a big problem


It is fixed in attached patch.


Screencast:
http://rvykydal.fedorapeople.org/live_hostname_hub.webm


Attaching a patch addressing in also Chris's remarks.

Radek
>From 85132805585eb4019208d87ce71a4fdc36c6219a Mon Sep 17 00:00:00 2001
From: Radek Vykydal <rvykydal redhat com>
Date: Fri, 31 May 2013 10:14:10 +0200
Subject: [PATCH] Add modified network spoke to LiveDVD (#963059)

The purpose is to:
- tell user to use DE tools to configure network
- allow user to set hostname
---
 pyanaconda/ui/gui/spokes/network.glade | 18 ++++++++++++++++--
 pyanaconda/ui/gui/spokes/network.py    | 20 +++++++++++++-------
 2 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/network.glade b/pyanaconda/ui/gui/spokes/network.glade
index fec6a6a..4e1ac74 100644
--- a/pyanaconda/ui/gui/spokes/network.glade
+++ b/pyanaconda/ui/gui/spokes/network.glade
@@ -263,12 +263,26 @@ updates available for you.</property>
                 <property name="orientation">vertical</property>
                 <property name="spacing">6</property>
                 <child>
+                  <object class="GtkLabel" id="live_hint_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes">Please use the live desktop environment's tools for customizing your network configuration.  You can set the hostname here.</property>
+                    <property name="ellipsize">start</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
                   <object class="GtkVBox" id="networkControlBox_vbox">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">12</property>
                     <child>
-                      <object class="GtkVBox" id="vbox2">
+                      <object class="GtkVBox" id="network_config_vbox">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">3</property>
@@ -2478,7 +2492,7 @@ updates available for you.</property>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">0</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
               </object>
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 432fc09..4c3c847 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -357,8 +357,10 @@ class NetworkControlBox(object):
             if dev_type == NetworkManager.DeviceType.ETHERNET:
                 dev_name = device.get_iface()
             elif dev_type == NetworkManager.DeviceType.WIFI:
-                dev_name = device.get_iface()
-                dev_info = device.get_active_access_point().get_ssid()
+                ap = device.get_active_access_point()
+                if ap:
+                    dev_name = device.get_iface()
+                    dev_info = ap.get_ssid()
             elif dev_type == NetworkManager.DeviceType.BOND:
                 dev_name = device.get_iface()
                 dev_info = [d.get_iface() for d in device.get_slaves()]
@@ -1104,7 +1106,8 @@ class NetworkSpoke(NormalSpoke):
     @property
     def completed(self):
         # TODO: check also if source requires updates when implemented
-        return len(self.network_control_box.activated_connections()) > 0
+        return (not flags.can_touch_runtime_system("require network connection")
+                or len(self.network_control_box.activated_connections()) > 0)
 
     @property
     def mandatory(self):
@@ -1168,13 +1171,16 @@ class NetworkSpoke(NormalSpoke):
 
         return msg
 
-    @property
-    def showable(self):
-        return flags.can_touch_runtime_system("allow network configuration")
-
     def initialize(self):
         NormalSpoke.initialize(self)
         self.network_control_box.initialize()
+        if not flags.can_touch_runtime_system("hide hint to use network configuration in DE"):
+            self.builder.get_object("network_config_vbox").set_no_show_all(True)
+            self.builder.get_object("network_config_vbox").hide()
+        else:
+            self.builder.get_object("live_hint_label").set_no_show_all(True)
+            self.builder.get_object("live_hint_label").hide()
+
         if not self.data.network.seen:
             _update_network_data(self.data, self.network_control_box)
 
-- 
1.7.11.7


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]