[PATCH 1/2] Remove Shrink button from reclaim dialog (#875944)
Brian C. Lane
bcl at redhat.com
Fri Dec 21 17:28:02 UTC 2012
From: "Brian C. Lane" <bcl at redhat.com>
---
pyanaconda/ui/gui/spokes/lib/resize.glade | 12 ------------
pyanaconda/ui/gui/spokes/lib/resize.py | 22 +++++++++++-----------
2 files changed, 11 insertions(+), 23 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.glade b/pyanaconda/ui/gui/spokes/lib/resize.glade
index f2cd461..cb9291c 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.glade
+++ b/pyanaconda/ui/gui/spokes/lib/resize.glade
@@ -222,18 +222,6 @@
</packing>
</child>
<child>
- <object class="GtkToolButton" id="shrinkButton">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Shrink</property>
- <signal name="clicked" handler="on_shrink_clicked" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
<object class="GtkToolButton" id="deleteButton">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py b/pyanaconda/ui/gui/spokes/lib/resize.py
index b500c97..d80ae8d 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.py
+++ b/pyanaconda/ui/gui/spokes/lib/resize.py
@@ -82,7 +82,7 @@ class ResizeDialog(GUIObject):
self._resizeButton = self.builder.get_object("resizeButton")
self._preserveButton = self.builder.get_object("preserveButton")
- self._shrinkButton = self.builder.get_object("shrinkButton")
+# self._shrinkButton = self.builder.get_object("shrinkButton")
self._deleteButton = self.builder.get_object("deleteButton")
def _description(self, part):
@@ -177,12 +177,12 @@ class ResizeDialog(GUIObject):
"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.")
+# 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)
@@ -201,7 +201,7 @@ class ResizeDialog(GUIObject):
# If this is a disk header, it's not editable, so make all the
# buttons insensitive.
self._preserveButton.set_sensitive(row[EDITABLE_COL])
- self._shrinkButton.set_sensitive(row[EDITABLE_COL])
+# self._shrinkButton.set_sensitive(row[EDITABLE_COL])
self._deleteButton.set_sensitive(row[EDITABLE_COL])
if not row[EDITABLE_COL]:
@@ -210,14 +210,14 @@ class ResizeDialog(GUIObject):
# If the selected filesystem does not support shrinking, make that
# button insensitive.
device = self.storage.devicetree.getDeviceByID(row[DEVICE_ID_COL])
- self._shrinkButton.set_sensitive(device.resizable)
+# self._shrinkButton.set_sensitive(device.resizable)
# Then, disable the button for whatever action is currently selected.
# It doesn't make a lot of sense to allow clicking that.
if row[ACTION_COL] == _(PRESERVE):
self._preserveButton.set_sensitive(False)
- elif row[ACTION_COL] == _(SHRINK):
- self._shrinkButton.set_sensitive(False)
+# elif row[ACTION_COL] == _(SHRINK):
+# self._shrinkButton.set_sensitive(False)
elif row[ACTION_COL] == _(DELETE):
self._deleteButton.set_sensitive(False)
--
1.8.0.2
More information about the anaconda-patches
mailing list