[PATCH 4/4] Reword the description on the resize dialog (#863577).
Chris Lumens
clumens at redhat.com
Mon Oct 8 20:18:44 UTC 2012
It needs to be more clear that deleting filesystems is also an option.
---
pyanaconda/ui/gui/spokes/lib/resize.glade | 7 ++++---
pyanaconda/ui/gui/spokes/lib/resize.py | 19 +++++++++++++++++++
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.glade b/pyanaconda/ui/gui/spokes/lib/resize.glade
index 6a1799b..d3dbbfd 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.glade
+++ b/pyanaconda/ui/gui/spokes/lib/resize.glade
@@ -37,7 +37,7 @@
</columns>
</object>
<object class="GtkDialog" id="resizeDialog">
- <property name="height_request">350</property>
+ <property name="height_request">450</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="resizable">False</property>
@@ -115,10 +115,11 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label2">
+ <object class="GtkLabel" id="reclaimDescLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Some of the disks on your system have free space available in pre-existing filesystems. While it's risky and we recommend you back up your data first, you can recover that free disk space and make it available for this installation below:</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Description goes here.</property>
<property name="wrap">True</property>
</object>
<packing>
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py b/pyanaconda/ui/gui/spokes/lib/resize.py
index fcccbeb..2bcb6d2 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.py
+++ b/pyanaconda/ui/gui/spokes/lib/resize.py
@@ -75,6 +75,8 @@ class ResizeDialog(GUIObject):
markup = self._required_label.get_label()
self._required_label.set_markup(markup % size_str(payload.spaceRequired))
+ self._reclaimDescLabel = self.builder.get_object("reclaimDescLabel")
+
def _description(self, part):
# First, try to find the partition in some known Root. If we find
# it, return the mountpoint as the description.
@@ -99,6 +101,8 @@ class ResizeDialog(GUIObject):
self._selectedReclaimableSpace = 0
+ canShrinkSomething = False
+
# Shouldn't have to do this outside of glade, but see:
# https://bugzilla.gnome.org/show_bug.cgi?id=685003
renderer = self.builder.get_object("actionRenderer")
@@ -126,6 +130,7 @@ class ResizeDialog(GUIObject):
# Devices that are not resizable are still deletable.
if dev.resizable:
freeSize = dev.size - dev.minSize
+ canShrinkSomething = True
else:
freeSize = dev.size
@@ -148,6 +153,20 @@ 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 "
+ "for this installation. Removing a filesystem will permanently delete all "
+ "of the data it contains.")
+
+ if canShrinkSomething:
+ description += "\n\n"
+ description += _("There is also free space available in pre-existing filesystems. "
+ "While it's risky and we recommend you back up your data first, you "
+ "can recover that free disk space and make it available for this "
+ "installation below.")
+
+ self._reclaimDescLabel.set_text(description)
+
def _update_labels(self, nDisks=None, totalReclaimable=None, selectedReclaimable=None):
if nDisks is not None and totalReclaimable is not None:
text = P_("<b>%s disk; %s reclaimable space</b> (in filesystems)",
--
1.7.11.2
More information about the anaconda-patches
mailing list