[PATCH rhel7-branch 4/5] Add the autopart type combo to custom storage (#1014671).
Chris Lumens
clumens at redhat.com
Wed Jan 15 20:09:36 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 b44d4f2..e37c648 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -2543,9 +2543,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 403bd8d..7def9e7 100644
--- a/pyanaconda/ui/gui/spokes/lib/accordion.py
+++ b/pyanaconda/ui/gui/spokes/lib/accordion.py
@@ -261,44 +261,55 @@ class CreateNewPage(Page):
label = Gtk.Label(_("You haven't created any mount points for your %s %s installation yet. You can:") % (productName, 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_right(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