[virt-tools-list] [virt-manager PATCH 1/2] details: show/hide remove popup menu by remove button

Chen Hanxiao chen_han_xiao at 126.com
Mon Apr 21 23:32:32 UTC 2014


On 04/22/2014 04:00 AM, Cole Robinson wrote:
> On 04/21/2014 02:39 AM, Chen Hanxiao wrote:
>> Use the senesitive attribute of remove button to
>> determine whether remove popup menu should be shown.
>>
>> Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
>> ---
>>   virtManager/details.py | 6 ++----
>>   1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/virtManager/details.py b/virtManager/details.py
>> index 2e8991b..86a81eb 100644
>> --- a/virtManager/details.py
>> +++ b/virtManager/details.py
>> @@ -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)
>>   
>>
> ACK
>
> - Cole

Thanks, pushed.

-Chen
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
>





More information about the virt-tools-list mailing list