Handle the warning messages for disk device and non-disk device differently

add a remove-non-disk function and move the yes/no confirmation handling there

Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Lily Nie
2019-12-23 16:43:05 -05:00
committed by Cole Robinson
parent d62ca8220b
commit 2138cca6a5
2 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ class vmmDeleteDialog(vmmGObjectUI):
self.widget("delete-cancel").grab_focus()
# Show warning message if VM is running
vm_active = self.vm.is_active()
vm_active = self.vm.is_active() and not self.disk
uiutil.set_grid_row_visible(
self.widget("delete-warn-running-vm-box"), vm_active)