diff --git a/ui/delete.ui b/ui/delete.ui
index aaf6e281..15c3bb88 100644
--- a/ui/delete.ui
+++ b/ui/delete.ui
@@ -1,62 +1,66 @@
+
-
diff --git a/virtManager/delete.py b/virtManager/delete.py
index 19606a53..ca5fc456 100644
--- a/virtManager/delete.py
+++ b/virtManager/delete.py
@@ -59,13 +59,14 @@ class vmmDeleteDialog(vmmGObjectUI):
})
self.bind_escape_key_close()
+ self._init_state()
+
+ def _init_state(self):
+ blue = Gdk.Color.parse("#0072A8")[1]
+ self.widget("header").modify_bg(Gtk.StateType.NORMAL, blue)
+
prepare_storage_list(self.widget("delete-storage-list"))
- def toggle_remove_storage(self, src):
- dodel = src.get_active()
- self.widget("delete-storage-list").set_sensitive(dodel)
-
-
def show(self, vm, parent):
logging.debug("Showing delete wizard")
self.vm = vm
@@ -87,17 +88,17 @@ class vmmDeleteDialog(vmmGObjectUI):
self.conn = None
def reset_state(self):
-
# Set VM name in title'
- title_str = ("%s '%s'" %
+ title_str = ("%s '%s'" %
(_("Delete"), util.xml_escape(self.vm.get_name())))
- self.widget("delete-main-label").set_markup(title_str)
+ self.widget("header-label").set_markup(title_str)
self.widget("delete-cancel").grab_focus()
# Show warning message if VM is running
vm_active = self.vm.is_active()
- self.widget("delete-warn-running-vm-box").set_visible(vm_active)
+ uihelpers.set_grid_row_visible(
+ self.widget("delete-warn-running-vm-box"), vm_active)
# Disable storage removal by default
self.widget("delete-remove-storage").set_active(True)
@@ -106,6 +107,11 @@ class vmmDeleteDialog(vmmGObjectUI):
populate_storage_list(self.widget("delete-storage-list"),
self.vm, self.conn)
+ def toggle_remove_storage(self, src):
+ dodel = src.get_active()
+ uihelpers.set_grid_row_visible(
+ self.widget("delete-storage-scroll"), dodel)
+
def get_config_format(self):
format_combo = self.widget("vol-format")
model = format_combo.get_model()
@@ -141,13 +147,13 @@ class vmmDeleteDialog(vmmGObjectUI):
devs = self.get_paths_to_delete()
if devs:
+ title = _("Are you sure you want to delete the storage?")
+ message = (_("The following paths will be deleted:\n\n%s") %
+ "\n".join(devs))
ret = uihelpers.chkbox_helper(self,
self.config.get_confirm_delstorage,
self.config.set_confirm_delstorage,
- text1=_("Are you sure you want to delete "
- "the storage?"),
- text2=_("All selected storage will "
- "be deleted."))
+ text1=title, text2=message)
if not ret:
return