[master][PATCH] Don't allow usaging updates with non-default network sources (#1008028)

David Shea dshea at redhat.com
Mon Sep 23 20:40:22 UTC 2013


On 09/23/2013 01:25 PM, Vratislav Podzimek wrote:
> Otherwise we don't know which repository if the one with updates.
>
> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> ---
>   pyanaconda/ui/gui/spokes/source.py | 24 +++++++++++++++++++-----
>   1 file changed, 19 insertions(+), 5 deletions(-)
>
> diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
> index bc72564..27ffd90 100644
> --- a/pyanaconda/ui/gui/spokes/source.py
> +++ b/pyanaconda/ui/gui/spokes/source.py
> @@ -545,6 +545,9 @@ class SourceSpoke(NormalSpoke):
>           # updates option container
>           self._updatesBox = self.builder.get_object("updatesBox")
>   
> +        self._proxyButton = self.builder.get_object("proxyButton")
> +        self._nfsOptsBox = self.builder.get_object("nfsOptsBox")
> +
>       def initialize(self):
>           NormalSpoke.initialize(self)
>   
> @@ -753,6 +756,15 @@ class SourceSpoke(NormalSpoke):
>           enabled = button.get_active()
>           relatedBox.set_sensitive(enabled)
>   
> +        if button in (self._autodetectButton, self._isoButton):
> +            # just make updates check box sensitive and unchecked by default
> +            self._noUpdatesCheckbox.set_active(False)
> +            self._updatesBox.set_sensitive(True)
> +        else:
> +            # network source selected, setup updates check box based on protocol
> +            # chosen
> +            self._protocolComboBox.emit("changed")
> +
I'd rather see this conditional flipped around so that the changed 
signal is emitted if button == self._networkButton, else make the 
checkbox sensitive and unchecked. That way if we add another radio 
button it doesn't have to be added here unless it needs to interact with 
the updates checkbox. Otherwise, ack.



More information about the anaconda-patches mailing list