details: show/hide remove popup menu by remove button
Use the senesitive attribute of remove button to determine whether remove popup menu should be shown. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This commit is contained in:
parent
70da20682c
commit
cb682c09eb
|
@ -1081,10 +1081,8 @@ class vmmDetails(vmmGObjectUI):
|
|||
return
|
||||
|
||||
rmdev = self._addhwmenuitems["remove"]
|
||||
if hasattr(devobj, "virtual_device_type"):
|
||||
rmdev.show()
|
||||
else:
|
||||
rmdev.hide()
|
||||
rmdev.set_visible(self.widget("config-remove").get_visible())
|
||||
rmdev.set_sensitive(self.widget("config-remove").get_sensitive())
|
||||
|
||||
self.addhwmenu.popup(None, None, None, None, 0, event.time)
|
||||
|
||||
|
|
Loading…
Reference in New Issue