# The left view shows all the drives that will just be mounted, but
# can still be moved to the right hand side.
@@ -130,7 +129,13 @@ class ClearDisksWindow (InstallWindow):
# of all the disks we should use later on. Now we need to go get those,
# look up some more information in the devicetree, and set up the
- for d in self.anaconda.id.storage.exclusiveDisks:
+ disks = self.anaconda.id.storage.exclusiveDisks
+ # Store the first disk for auto boot device selection, the order
+ # in the store may change if the users changes the sorting
+ self.bootDisk = disks
+ for d in disks:
device = self.anaconda.id.storage.devicetree.getDeviceByNam e(d)
if not device:
You're putting things into the store sorted in a special order that has
no corresponding column, but then leaving the possibility open to the
user to sort in a different way by clicking on the column headers.
However, there's no way for the user to restore the default ordering no
matter what they click on.
As discussed on irc a new version of this patch removing the sorting
of the store is coming up.
@@ -160,19 +165,21 @@ class ClearDisksWindow (InstallWindow):
+ def _autoSelectBootDisk(self):
+ if self.rightDS.getSelected():
+ for i in range(0, len(self.store)):
+ if self.store[i][OBJECT_COL].name == self.bootDisk and
+ self.store[i][self.rightActive] = True
gtk.WhateverStores are iterable, so this can be simplified down to:
for row in self.store:
if row[OBJECT_COL].name == self.bootDisk and row[self.rightVisible]:
row[self.rightActive] = True
Ah yes that is much better, will change in next revision of the patch.
What happens to the UI if I'm on a machine with no preset boot disk, but
then I add several things to the right panel and click next? Do any of
the radio buttons get updated?
In this case the first drive according to our fallback sorting (used when
no EDD info is present) gets auto selected (if added to the right column),
like it was autoselected in the old auto_part_type UI.
Does the "You must select one drive to
boot from" message still appear?
If no drive is selected because the first drive according to the compareDisks
sort order is not added to the right pane, yes (I tested this to make sure).
Anaconda-devel-list mailing list