6505c36ecc
virtman-netstats-fix.diff virtman-finish-button-fix.diff virtman-shutoff-fix.diff virtman-set-has-window-fix.diff virtman-grep-fix.diff virtman-no-cd-present-fix.diff virtman-resize-menu-fix.diff virtman-vcpu-count-fix.diff virtman-storage-pool-fix.diff virtman-domain-name-fix.diff virtman-unapplied-changes-fix.diff virtman-details-fix.diff virtman-delete-fix.diff virtman-collidelist-fix.diff virtman-char-device-mode-fix.diff virtinst-hv-version-fix.diff virtinst-initrd-inject-fix.diff virtinst-initrd-inject2-fix.diff virtinst-no-volume-fix.diff virtinst-prompts-fix.diff virtinst-cpu-model-name-fix.diff virtinst-xml-clear-fix.diff virtinst-remote-storage-fix.diff virtinst-error-message-fix.diff virtinst-typo-fix.diff virtinst-cdrom.diff virtinst-storage-ocfs2.diff OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=63
50 lines
1.8 KiB
Diff
50 lines
1.8 KiB
Diff
|
|
Subject: details: Fix confusion when removing device with unapplied changes
|
|
From: Cole Robinson crobinso@redhat.com Mon Aug 29 12:47:44 2011 -0400
|
|
Date: Mon Aug 29 12:53:02 2011 -0400:
|
|
Git: 41e6d7b0f4eacb3991710a047a5dc708c7ef97a6
|
|
|
|
|
|
Index: virt-manager-0.9.0/src/virtManager/details.py
|
|
===================================================================
|
|
--- virt-manager-0.9.0.orig/src/virtManager/details.py
|
|
+++ virt-manager-0.9.0/src/virtManager/details.py
|
|
@@ -1098,7 +1098,10 @@ class vmmDetails(vmmGObjectUI):
|
|
def get_boot_selection(self):
|
|
return self.get_selected_row(self.widget("config-boot-list"))
|
|
|
|
- def set_hw_selection(self, page):
|
|
+ def set_hw_selection(self, page, disable_apply=True):
|
|
+ if disable_apply:
|
|
+ self.widget("config-apply").set_sensitive(False)
|
|
+
|
|
hwlist = self.widget("hw-list")
|
|
selection = hwlist.get_selection()
|
|
selection.select_path(str(page))
|
|
@@ -1119,7 +1122,7 @@ class vmmDetails(vmmGObjectUI):
|
|
page = self.get_hw_selection(HW_LIST_COL_TYPE)
|
|
if page is None:
|
|
page = HW_LIST_TYPE_GENERAL
|
|
- self.widget("hw-list").get_selection().select_path(0)
|
|
+ self.set_hw_selection(0)
|
|
|
|
return page
|
|
|
|
@@ -1168,7 +1171,7 @@ class vmmDetails(vmmGObjectUI):
|
|
if self.compare_hw_rows(model[idx], oldrow):
|
|
pageidx = idx
|
|
break
|
|
- self.set_hw_selection(pageidx)
|
|
+ self.set_hw_selection(pageidx, disable_apply=False)
|
|
else:
|
|
self.oldhwrow = newrow
|
|
self.hw_selected()
|
|
@@ -2259,6 +2262,7 @@ class vmmDetails(vmmGObjectUI):
|
|
detach_err = (str(e), "".join(traceback.format_exc()))
|
|
|
|
if not detach_err:
|
|
+ self.widget("config-apply").set_sensitive(False)
|
|
return
|
|
|
|
self.err.show_err(
|