[PATCH 2/3] Select all disks in the box with advanced storage as well

Vratislav Podzimek vpodzime at redhat.com
Thu Apr 25 08:18:42 UTC 2013


On Wed, 2013-04-24 at 10:38 -0400, Chris Lumens wrote:
> > diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
> > index 02dc221..c632850 100644
> > --- a/pyanaconda/ui/gui/spokes/storage.py
> > +++ b/pyanaconda/ui/gui/spokes/storage.py
> > @@ -884,7 +884,10 @@ class StorageSpoke(NormalSpoke, StorageChecker):
> >          # if Ctrl-A was pressed, select all disks
> >          if bool(event.state & Gdk.ModifierType.CONTROL_MASK) and \
> >                  (event.keyval in (Gdk.KEY_a, Gdk.KEY_A)):
> > -            for overview in box.get_children():
> > +
> > +            # box with advanced disks contains also a button
> > +            is_disk_overview = lambda child: isinstance(child, AnacondaWidgets.DiskOverview)
> > +            for overview in filter(is_disk_overview, box.get_children()):
> >                  overview.set_chosen(True)
> >  
> >          self._update_disk_list()
> 
> If you know whether box is the advanced or local box, you can use
> self.advancedOverviews here instead of doing the filtering yourself.
Yeah I know, but I want to use the same code for both boxes. Maybe I can
just use 'if box is self.local_disks_box:'. Will change that before
pushing.

-- 
Vratislav Podzimek

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



More information about the anaconda-patches mailing list