[PATCH 4/4] Add the autopart type combo to custom storage (#1014671).
Chris Lumens
clumens at redhat.com
Wed Jan 8 21:22:12 UTC 2014
---
pyanaconda/ui/gui/spokes/custom.py | 3 ++-
pyanaconda/ui/gui/spokes/lib/accordion.py | 43 +++++++++++++++++++------------
2 files changed, 29 insertions(+), 17 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 634888d..e0fc33f 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -2607,9 +2607,10 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self.__storage.doAutoPart = False
log.debug("finished automatic partitioning")
- def on_create_clicked(self, button):
+ def on_create_clicked(self, button, autopartTypeCombo):
# Then do autopartitioning. We do not do any clearpart first. This is
# custom partitioning, so you have to make your own room.
+ self.__storage.autoPartType = autopartTypeCombo.get_active()
self._do_autopart()
# Refresh the spoke to make the new partitions appear.
diff --git a/pyanaconda/ui/gui/spokes/lib/accordion.py b/pyanaconda/ui/gui/spokes/lib/accordion.py
index 15a0e83..a335354 100644
--- a/pyanaconda/ui/gui/spokes/lib/accordion.py
+++ b/pyanaconda/ui/gui/spokes/lib/accordion.py
@@ -281,44 +281,55 @@ class CreateNewPage(Page):
"You can:") % {"product" : productName, "version" : productVersion})
label.set_line_wrap(True)
label.set_alignment(0, 0.5)
- self._createBox.attach(label, 0, 0, 2, 1)
+ self._createBox.attach(label, 0, 0, 3, 1)
dot = Gtk.Label("•")
+ dot.set_alignment(0.5, 0)
dot.set_hexpand(False)
self._createBox.attach(dot, 0, 1, 1, 1)
- self._createNewButton = Gtk.LinkButton("", label=_("_Click here to create them automatically."))
- label = self._createNewButton.get_children()[0]
- label.set_alignment(0, 0.5)
- label.set_hexpand(True)
- label.set_line_wrap(True)
+ label = Gtk.Label(_("Create them _automatically:"))
label.set_use_underline(True)
-
- self._createNewButton.set_has_tooltip(False)
- self._createNewButton.set_halign(Gtk.Align.START)
- self._createNewButton.connect("clicked", cb)
- self._createNewButton.connect("activate-link", lambda *args: Gtk.true())
- self._createBox.attach(self._createNewButton, 1, 1, 1, 1)
+ label.set_line_wrap(True)
+ label.set_alignment(0, 0.5)
+ self._createBox.attach(label, 1, 1, 2, 1)
+
+ combo = Gtk.ComboBoxText()
+ label.set_mnemonic_widget(combo)
+ combo.append_text(_("Standard Partition"))
+ combo.append_text(_("BTRFS"))
+ combo.append_text(_("LVM"))
+ combo.append_text(_("LVM Thin Provisioning"))
+ combo.set_active(2)
+ self._createBox.attach(combo, 1, 2, 1, 1)
+
+ button = Gtk.Button(_("_Create"))
+ button.set_margin_end(6)
+ button.set_use_underline(True)
+ button.connect("clicked", cb, combo)
+ self._createBox.attach(button, 2, 2, 1, 1)
dot = Gtk.Label("•")
+ dot.set_alignment(0.5, 0)
dot.set_hexpand(False)
- self._createBox.attach(dot, 0, 2, 1, 1)
+ self._createBox.attach(dot, 0, 3, 1, 1)
label = Gtk.Label(_("Create new mount points by clicking the '+' button."))
label.set_alignment(0, 0.5)
label.set_hexpand(True)
label.set_line_wrap(True)
- self._createBox.attach(label, 1, 2, 1, 1)
+ self._createBox.attach(label, 1, 3, 2, 1)
if partitionsToReuse:
dot = Gtk.Label("•")
+ dot.set_alignment(0.5, 0)
dot.set_hexpand(False)
- self._createBox.attach(dot, 0, 3, 1, 1)
+ self._createBox.attach(dot, 0, 4, 1, 1)
label = Gtk.Label(_("Or, assign new mount points to existing partitions after selecting them below."))
label.set_alignment(0, 0.5)
label.set_hexpand(True)
label.set_line_wrap(True)
- self._createBox.attach(label, 1, 3, 1, 1)
+ self._createBox.attach(label, 1, 4, 2, 1)
self.add(self._createBox)
--
1.8.3.1
More information about the anaconda-patches
mailing list