--- pyanaconda/ui/gui/spokes/custom.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index bcfa001..91c73d7 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -401,6 +401,12 @@ class VolumeGroupDialog(GUIObject): return disk
def on_save_clicked(self, button): + # If no name was entered, quit the dialog as if they did nothing. + name = self.builder.get_object("vg_name_entry").get_text().strip() + if not name: + self.window.destroy() + return + treeview = self.builder.get_object("vg_disk_view") model, paths = treeview.get_selection().get_selected_rows() self.selected = [] @@ -409,7 +415,7 @@ class VolumeGroupDialog(GUIObject): disk_id = model.get_value(itr, 4) self.selected.append(self._get_disk_by_id(disk_id))
- self.name = self.builder.get_object("vg_name_entry").get_text() + self.name = name
self.window.destroy()
This reverts commit f17bc055b5661230b995b8ea82e68af2de5e9a6e. I have a more thorough fix for this screen coming. --- pyanaconda/ui/gui/spokes/custom.glade | 1 + pyanaconda/ui/gui/spokes/custom.py | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.glade b/pyanaconda/ui/gui/spokes/custom.glade index aadcd57..72d06ca 100644 --- a/pyanaconda/ui/gui/spokes/custom.glade +++ b/pyanaconda/ui/gui/spokes/custom.glade @@ -76,6 +76,7 @@ <property name="can_focus">False</property> <property name="border_width">5</property> <property name="type_hint">dialog</property> + <property name="decorated">False</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> <property name="can_focus">False</property> diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 91c73d7..11c1b8c 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -1764,13 +1764,14 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
dialog = AddDialog(self.data, mountpoints=self.__storage.mountpoints.keys()) - dialog.refresh() - rc = dialog.run() + with enlightbox(self.window, dialog.window): + dialog.refresh() + rc = dialog.run()
- if rc != 1: - # user cancel - dialog.window.destroy() - return + if rc != 1: + # user cancel + dialog.window.destroy() + return
# create a device of the default type, using any disks, with an # appropriate fstype and mountpoint
See the commit message for f17bc055b5661230b995b8ea82e68af2de5e9a6e. --- pyanaconda/ui/gui/spokes/custom.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 11c1b8c..8f38eb4 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -80,7 +80,7 @@ from pyanaconda.ui.gui.spokes.storage import StorageChecker from pyanaconda.ui.gui.spokes.lib.cart import SelectedDisksDialog from pyanaconda.ui.gui.spokes.lib.passphrase import PassphraseDialog from pyanaconda.ui.gui.spokes.lib.accordion import * -from pyanaconda.ui.gui.utils import enlightbox, setViewportBackground +from pyanaconda.ui.gui.utils import setViewportBackground from pyanaconda.ui.gui.categories.storage import StorageCategory
from gi.repository import Gtk @@ -164,6 +164,16 @@ feature_raid_levels = {"Performance": "raid0", partition_only_format_types = ["efi", "hfs+", "prepboot", "biosboot", "appleboot"]
+# XXX: Hack, hack, hack. For some reason displaying lightboxed dialogs on the +# custom storage spoke means that redisplaying those dialogs later never works +# and the UI looks frozen. So I'm just going to override the real enlightbox +# method here with one that does nothing. Hopefully this will be fixed and I +# can remove the hack. +@contextmanager +def enlightbox(mainWindow, dialog): + dialog.set_decorated(True) + yield + class UIStorageFilter(logging.Filter): def filter(self, record): record.name = "storage.ui"
We need to try to avoid technical terms in the interface, if possible. --- pyanaconda/ui/gui/TODO | 1 - pyanaconda/ui/tui/hubs/progress.py | 2 +- pyanaconda/ui/tui/hubs/summary.py | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/TODO b/pyanaconda/ui/gui/TODO index 8191cd2..7b8a11a 100644 --- a/pyanaconda/ui/gui/TODO +++ b/pyanaconda/ui/gui/TODO @@ -27,7 +27,6 @@ Beyond - Split out especially large spokes (storage.py, custom.py) into logically separate files. - Device filtering. -- "Hub" shouldn't be in the page title for any text mode hub. - Progress reporting for metadata downloading could be handy. - Spokes should have some way to tell if other spokes are ready (see _software_is_ready in storage.py). diff --git a/pyanaconda/ui/tui/hubs/progress.py b/pyanaconda/ui/tui/hubs/progress.py index be3c5ed..c80372e 100644 --- a/pyanaconda/ui/tui/hubs/progress.py +++ b/pyanaconda/ui/tui/hubs/progress.py @@ -34,7 +34,7 @@ from pyanaconda.ui.tui.simpleline.base import ExitAllMainLoops __all__ = ["ProgressHub"]
class ProgressHub(TUIHub): - title = _("Installation Hub") + title = _("Progress")
def __init__(self, app, ksdata, storage, payload, instclass): TUIHub.__init__(self, app, ksdata, storage, payload, instclass) diff --git a/pyanaconda/ui/tui/hubs/summary.py b/pyanaconda/ui/tui/hubs/summary.py index f4247de..965fdc1 100644 --- a/pyanaconda/ui/tui/hubs/summary.py +++ b/pyanaconda/ui/tui/hubs/summary.py @@ -29,7 +29,7 @@ import gettext _ = lambda x: gettext.ldgettext("anaconda", x)
class SummaryHub(TUIHub): - title = _("Install hub") + title = _("Installation") categories = ["source", "localization", "destination", "password"]
def __init__(self, app, data, storage, payload, instclass): @@ -57,4 +57,4 @@ class SummaryHub(TUIHub): if not flags.ksprompt: errtxt = _("Can't have a question in command line mode!") raise RuntimeError(errtxt) - return TUIHub.prompt(self, args) \ No newline at end of file + return TUIHub.prompt(self, args)
ACK to these 4
anaconda-patches@lists.fedorahosted.org