This was caused by 1821378de1aecbbf5806edcad34ee928f0892296, which changed what
was being stored in the DiskOverviews.
---
pyanaconda/ui/gui/spokes/source.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index 0b71e77..a6223f4 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -841,7 +841,7 @@ class SourceSpoke(NormalSpoke):
dev = None
for child in self._autodetectMediaBox.get_children():
if child.get_chosen():
- dev = child
+ dev = child.props.name
break
return dev
@@ -923,7 +923,7 @@ class SourceSpoke(NormalSpoke):
dialog = MediaCheckDialog(self.data)
with enlightbox(self.window, dialog.window):
- dialog.run(dev.path)
+ dialog.run("/dev/" + dev)
def on_protocol_changed(self, combo):
proxyButton = self.builder.get_object("proxyButton")
--
1.8.1.2
Show replies by date
If you go into the reclaim dialog already with enough space, it's a very
confusing thing to be told you do not have enough free space.
---
pyanaconda/ui/gui/spokes/lib/resize.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py
b/pyanaconda/ui/gui/spokes/lib/resize.py
index c44664e..1f1d990 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.py
+++ b/pyanaconda/ui/gui/spokes/lib/resize.py
@@ -174,8 +174,7 @@ class ResizeDialog(GUIObject):
self._update_labels(totalDisks, totalReclaimableSpace, 0)
- description = _("You don't have enough free space available for this
installation.\n\n"
- "You can remove existing filesystems you no longer need to
free up space "
+ description = _("You can remove existing filesystems you no longer need to
free up space "
"for this installation. Removing a filesystem will
permanently delete all "
"of the data it contains.")
--
1.8.1.2
This is to help communicate how much total free space there is, in the case
where you've got enough but choose to go into the reclaim dialog to do some
other things anyway.
---
pyanaconda/ui/gui/spokes/lib/resize.glade | 2 +-
pyanaconda/ui/gui/spokes/lib/resize.py | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.glade
b/pyanaconda/ui/gui/spokes/lib/resize.glade
index 11eefcb..3ccb00e 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.glade
+++ b/pyanaconda/ui/gui/spokes/lib/resize.glade
@@ -141,7 +141,7 @@
<child>
<object class="GtkCellRendererText"
id="diskRenderer"/>
<attributes>
- <attribute name="text">1</attribute>
+ <attribute name="markup">1</attribute>
</attributes>
</child>
</object>
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py
b/pyanaconda/ui/gui/spokes/lib/resize.py
index 1f1d990..4bb25cf 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.py
+++ b/pyanaconda/ui/gui/spokes/lib/resize.py
@@ -118,6 +118,8 @@ class ResizeDialog(GUIObject):
canShrinkSomething = False
+ free_space = self.storage.getFreeSpace(disks=disks)
+
for disk in disks:
# First add the disk itself.
editable = not disk.protected
@@ -165,6 +167,20 @@ class ResizeDialog(GUIObject):
dev.size])
diskReclaimableSpace += freeSize
+ # And then add another uneditable line that lists how much space is
+ # already free in the disk.
+ diskFree = free_space[disk.name][0]
+ converted = diskFree.convertTo(spec="mb")
+ if int(converted):
+ self._diskStore.append(itr, [disk.id,
+ _("""<span
foreground='grey' style='italic'>Free
space</span>"""),
+ "",
+ "<span foreground='grey'
style='italic'>%s</span>" % size_str(diskFree),
+ _(PRESERVE),
+ False,
+ self._get_tooltip(disk),
+ float(converted)])
+
# And then go back and fill in the total reclaimable space for the
# disk, now that we know what each partition has reclaimable.
self._diskStore[itr][RECLAIMABLE_COL] = self._diskStore[itr][RECLAIMABLE_COL]
% size_str(diskReclaimableSpace)
--
1.8.1.2
This dialog now serves two different purposes: (1) You do not have enough
free space, and need to make some before you can continue to install. (2) You
do have enough free space but want to free up additional space.
Because the button is labeled "Reclaim space", we only want to allow clicking
on it if you have chosen some destructive action. Buttons should be labeled
with what they do, after all. However, we also want to take into account any
free space that may already exist on disk when considering whether you have
enough to continue.
---
pyanaconda/ui/gui/spokes/lib/resize.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py
b/pyanaconda/ui/gui/spokes/lib/resize.py
index 4bb25cf..7baf894 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.py
+++ b/pyanaconda/ui/gui/spokes/lib/resize.py
@@ -114,6 +114,7 @@ class ResizeDialog(GUIObject):
totalDisks = 0
totalReclaimableSpace = 0
+ self._initialFreeSpace = Size(0)
self._selectedReclaimableSpace = 0
canShrinkSomething = False
@@ -180,6 +181,7 @@ class ResizeDialog(GUIObject):
False,
self._get_tooltip(disk),
float(converted)])
+ self._initialFreeSpace += diskFree
# And then go back and fill in the total reclaimable space for the
# disk, now that we know what each partition has reclaimable.
@@ -249,8 +251,13 @@ class ResizeDialog(GUIObject):
self._deleteButton.set_sensitive(False)
def _update_reclaim_button(self, got):
+ # The reclaim button is sensitive if two conditions are met:
+ # (1) There's enough available space (existing free/unpartitioned space,
+ # shrink space, etc.) on all disks.
+ # (2) At least one destructive action has been chosen. We can detect
+ # this by checking whether got is non-zero.
need = self.payload.spaceRequired
- self._resizeButton.set_sensitive(got >= need)
+ self._resizeButton.set_sensitive(got+self._initialFreeSpace >= need and got
> Size(0))
def refresh(self, disks):
super(ResizeDialog, self).refresh()
--
1.8.1.2
Going back to the options dialogs is arguably not really a bug (the user may
want to go to custom partitioning), but they have other ways of doing those
things. Also, watching people test this out showed it to be very confusing
and led to people going down paths they didn't need to. Also, it's the way
it worked in F17.
---
pyanaconda/ui/gui/spokes/storage.py | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index c52eb8d..1b474f0 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -775,8 +775,10 @@ class StorageSpoke(NormalSpoke, StorageChecker):
self.autopart = True
elif dialog.continue_response == dialog.RESPONSE_CONTINUE_RECLAIM:
self.apply()
- gtk_call_once(self._show_resize_dialog, disks)
- return
+ if not self._show_resize_dialog(disks):
+ # User pressed cancel on the reclaim dialog, so don't leave
+ # the storage spoke.
+ return
elif dialog.continue_response == dialog.RESPONSE_CONTINUE_CUSTOM:
self.autopart = False
self.skipTo = "CustomPartitioningSpoke"
@@ -797,7 +799,12 @@ class StorageSpoke(NormalSpoke, StorageChecker):
return
self.apply()
- gtk_call_once(self._show_resize_dialog, disks)
+ if not self._show_resize_dialog(disks):
+ # User pressed cancel on the reclaim dialog, so don't leave
+ # the storage spoke.
+ return
+
+ NormalSpoke.on_back_clicked(self, button)
elif rc == dialog.RESPONSE_QUIT:
raise SystemExit("user-selected exit")
elif rc == dialog.RESPONSE_CUSTOM:
@@ -812,10 +819,8 @@ class StorageSpoke(NormalSpoke, StorageChecker):
resizeDialog = ResizeDialog(self.data, self.storage, self.payload)
resizeDialog.refresh(disks)
- # resizeDialog handles okay/cancel on its own, so we can throw out the
- # return value.
- self.run_lightbox_dialog(resizeDialog)
- gtk_call_once(self.window.emit, "button-clicked")
+ rc = self.run_lightbox_dialog(resizeDialog)
+ return rc
def on_add_disk_clicked(self, button):
print "ADD DISK CLICKED"
--
1.8.1.2
These all look good
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)