---
pyanaconda/ui/gui/spokes/lib/resize.glade | 1 +
pyanaconda/ui/gui/spokes/lib/resize.py | 9 ++++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.glade
b/pyanaconda/ui/gui/spokes/lib/resize.glade
index 15f90af..e3aa001 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.glade
+++ b/pyanaconda/ui/gui/spokes/lib/resize.glade
@@ -72,6 +72,7 @@
<object class="GtkButton" id="resizeButton">
<property name="label"
translatable="yes">_Reclaim space</property>
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py
b/pyanaconda/ui/gui/spokes/lib/resize.py
index 3781807..19d16e3 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.py
+++ b/pyanaconda/ui/gui/spokes/lib/resize.py
@@ -61,6 +61,7 @@ class ResizeDialog(GUIObject):
def __init__(self, data, storage, payload):
GUIObject.__init__(self, data)
self.storage = storage
+ self.payload = payload
self._actionStore = self.builder.get_object("actionStore")
self._diskStore = self.builder.get_object("diskStore")
@@ -72,10 +73,12 @@ class ResizeDialog(GUIObject):
self._required_label = self.builder.get_object("requiredSpaceLabel")
markup = self._required_label.get_label()
- self._required_label.set_markup(markup % size_str(payload.spaceRequired))
+ self._required_label.set_markup(markup % size_str(self.payload.spaceRequired))
self._reclaimDescLabel = self.builder.get_object("reclaimDescLabel")
+ self._resizeButton = self.builder.get_object("resizeButton")
+
def _description(self, part):
# First, try to find the partition in some known Root. If we find
# it, return the mountpoint as the description.
@@ -224,6 +227,10 @@ class ResizeDialog(GUIObject):
self._diskStore.foreach(self._sumReclaimableSpace, None)
self._update_labels(selectedReclaimable=self._selectedReclaimableSpace)
+ got = Size(spec="%s MB" % self._selectedReclaimableSpace)
+ need = self.payload.spaceRequired
+ self._resizeButton.set_sensitive(got >= need)
+
def _scheduleActions(self, model, path, itr, *args):
(editable, action, ident) = model.get(itr, EDITABLE_COL, ACTION_COL,
DEVICE_ID_COL)
--
1.7.11.2
Show replies by date
This is an attempt to throw out loopback mounts, bind mounts, and optical
media. We can't do anything with those things, so we shouldn't even display
them. They are left in Roots just in case we one day think up another need
for this information.
---
pyanaconda/ui/gui/spokes/custom.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index e24fe7c..404f844 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -723,7 +723,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# Don't make a page if none of the root's devices are left.
# Also, only include devices in an old page if the format is intact.
if not [d for d in root.swaps + root.mounts.values()
- if d in self._devices and
+ if d in self._devices and d.disks and
(root.name == new_install_name or d.format.exists)]:
continue
@@ -732,6 +732,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
for (mountpoint, device) in root.mounts.iteritems():
if device not in self._devices or \
+ not device.disks or \
(root.name != new_install_name and not device.format.exists):
continue
--
1.7.11.2
Ack to these.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)