[PATCH 1/4] Don't allow changing a VG name to empty in the VG editor (#892395).
Chris Lumens
clumens at redhat.com
Wed Jan 9 16:33:41 UTC 2013
---
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()
--
1.7.11.2
More information about the anaconda-patches
mailing list