This button throws away all the changes the user made in custom partitioning
and reloads the current state of the disks. This button is designed for the
user who's made a mess of things and just wants to start over.
---
pyanaconda/ui/gui/spokes/custom.glade | 19 +++++++++++++++++++
pyanaconda/ui/gui/spokes/custom.py | 5 +++++
2 files changed, 24 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/custom.glade
b/pyanaconda/ui/gui/spokes/custom.glade
index 997671f..3a7ece2 100644
--- a/pyanaconda/ui/gui/spokes/custom.glade
+++ b/pyanaconda/ui/gui/spokes/custom.glade
@@ -1498,6 +1498,25 @@ use. Try something else?</property>
</packing>
</child>
<child>
+ <object class="GtkButton"
id="resetButton">
+ <property name="label"
translatable="yes">_Reset All</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">True</property>
+ <property name="halign">end</property>
+ <property name="valign">start</property>
+ <property name="hexpand">True</property>
+ <property
name="use_underline">True</property>
+ <signal name="clicked"
handler="on_reset_clicked" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkButton"
id="summary_button">
<property name="label"
translatable="yes">summary</property>
<property name="visible">True</property>
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 463af36..2c213e8 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -2361,6 +2361,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._error = None
self.clear_info()
+ # This callback is for the button that just resets the UI to anaconda's
+ # current understanding of the disk layout.
+ def on_reset_clicked(self, *args):
+ self.refresh()
+
def on_info_bar_clicked(self, *args):
log.debug("info bar clicked: %s (%s)" % (self._error, args))
if not self._error:
--
1.8.1.2