[virt-tools-list] [virt-manager] [PATCH ] vsockdetails: Show CID for active VM if the attribute auto is set to yes

Pavel Hrdina phrdina at redhat.com
Mon Jan 21 12:52:24 UTC 2019


On Mon, Jan 21, 2019 at 04:30:54PM +0800, Lin Ma wrote:
> Signed-off-by: Lin Ma <lma at suse.com>
> ---
>  virtManager/vsockdetails.py | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/virtManager/vsockdetails.py b/virtManager/vsockdetails.py
> index 7e4e8134..a4920012 100644
> --- a/virtManager/vsockdetails.py
> +++ b/virtManager/vsockdetails.py
> @@ -56,6 +56,11 @@ class vmmVsockDetails(vmmGObjectUI):
>          else:
>              cid = self.MIN_GUEST_CID
>  
> +        label = self.widget("vsock-auto").get_label().split(" (")[0]
> +        if is_auto and self.vm.is_active():
> +            label += " (%s %s)" % (_("CID ="), cid)

I removed the '=' char to make it the same as for graphics and pushed
the patch.

Thanks

Pavel

> +        self.widget("vsock-auto").set_label(label)
> +
>          self.widget("vsock-auto").set_active(is_auto)
>          self.widget("vsock-cid").set_value(cid)
>          self.widget("vsock-cid").set_visible(not is_auto)
> -- 
> 2.19.0
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20190121/8771d48d/attachment.sig>


More information about the virt-tools-list mailing list