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 @@ + - - 500 - 300 + + 450 + 350 False - 6 - Delete Confirmation + Delete Virtual Machine + False center-on-parent dialog - + True False vertical - 2 - - + 6 + + True False - end + queue - - gtk-cancel + True - True - True - True - True - + False + 6 + 10 + + + True + False + vm_delete_wizard + 6 + + + False + False + 0 + + + + + True + False + 0 + <span size='large' color='white'>Placeholder</span> + True + + + False + True + 1 + + - - False - False - 0 - - - - - gtk-delete - True - True - True - True - - - - False - False - 1 - False True - end 0 @@ -64,49 +68,24 @@ True False + 12 + 18 - + True False - 6 - 6 + vertical + 6 - + True False - 10 + 3 - + True False - 3 - - - True - False - vm_delete_wizard - 6 - - - False - False - 0 - - - - - True - False - 0 - <span size='x-large'>Delete 'foo'</span> - True - - - False - False - 1 - - + gtk-dialog-warning False @@ -115,42 +94,11 @@ - + True False - 6 - - - True - False - 3 - - - True - False - gtk-dialog-warning - - - False - True - 0 - - - - - True - False - <small>This VM is currently running and will be forced off before being deleted</small> - True - - - False - True - 1 - - - - + <small>This VM is currently running and will be forced off before being deleted</small> + True False @@ -158,50 +106,102 @@ 1 + + + 0 + 0 + 1 + 1 + + + + + Delete _associated storage files + True + True + False + True + 0 + True + + + + 0 + 1 + 1 + 1 + + + + + True + True + True + True + etched-in - - Delete _associated storage files + True True - False - True - 0.5 - True - + + + - - False - True - 2 - + + 0 + 2 + 1 + 1 + - False + True True 0 - + True False - 6 - etched-in + 6 + end - + + gtk-cancel True True - - - + True + True + + + False + False + 0 + + + + + gtk-delete + True + True + True + True + + + + False + False + 1 + - True + False True 1 @@ -215,9 +215,5 @@ - - delete-cancel - delete-ok - 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