[PATCH 1/5] Bonding support: GUI - device list, configuration and adding bond (#906263)

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


> --- a/pyanaconda/ui/gui/spokes/network.py
> +++ b/pyanaconda/ui/gui/spokes/network.py
> @@ -222,14 +222,17 @@ class NetworkControlBox(object):
>      supported_device_types = [
>          NetworkManager.DeviceType.ETHERNET,
>          NetworkManager.DeviceType.WIFI,
> +        NetworkManager.DeviceType.BOND,
>      ]
>  
>      def __init__(self, builder):
>  
>          self.builder = builder
>  
> -        # these buttons are only for vpn and proxy
> -        self.builder.get_object("add_toolbutton").set_sensitive(False)
> +        # button for creating of virtual bond and vlan devices
> +        self.builder.get_object("add_toolbutton").set_sensitive(True)
> +        self.builder.get_object("add_toolbutton").connect("clicked",
> +                                                           self.on_add_device_clicked)
>          self.builder.get_object("remove_toolbutton").set_sensitive(False)
>  
>          not_supported = ["start_hotspot_button",

If you're going to make use of the same glade object several times (and
I think you use add_toolbutton again later), I typically just grab it
once and assign it to a variable.

- Chris


More information about the anaconda-patches mailing list