[virt-tools-list] [PATCH 5/5] virt-manager: add opengl graphics option

Cole Robinson crobinso at redhat.com
Thu Feb 18 19:02:13 UTC 2016


On 02/18/2016 11:47 AM, Marc-André Lureau wrote:
> From: Marc-André Lureau <marcandre.lureau at gmail.com>
> 
> Add a OpenGl checkbox to the Spice graphics option.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
> ---
>  ui/gfxdetails.ui          | 29 +++++++++++++++++++++++++++++
>  virtManager/details.py    |  9 +++++++--
>  virtManager/domain.py     |  5 ++++-
>  virtManager/gfxdetails.py | 11 ++++++++---
>  4 files changed, 48 insertions(+), 6 deletions(-)

<snip>

> diff --git a/virtManager/gfxdetails.py b/virtManager/gfxdetails.py
> index 0ae76c9..df54bbf 100644
> --- a/virtManager/gfxdetails.py
> +++ b/virtManager/gfxdetails.py
> @@ -35,6 +35,7 @@ class vmmGraphicsDetails(vmmGObjectUI):
>          "changed-type": (GObject.SignalFlags.RUN_FIRST, None, []),
>          "changed-address": (GObject.SignalFlags.RUN_FIRST, None, []),
>          "changed-keymap": (GObject.SignalFlags.RUN_FIRST, None, []),
> +        "changed-opengl": (GObject.SignalFlags.RUN_FIRST, None, []),
>      }
>  
>      def __init__(self, vm, builder, topwin):
> @@ -54,6 +55,7 @@ class vmmGraphicsDetails(vmmGObjectUI):
>              "on_graphics_tlsport_changed": lambda ignore: self.emit("changed-tlsport"),
>              "on_graphics_port_changed": lambda ignore: self.emit("changed-port"),
>              "on_graphics_keymap_changed": lambda ignore: self.emit("changed-keymap"),
> +            "on_graphics_opengl_toggled": lambda ignore: self.emit("changed-opengl"),
>          })
>  
>          self._init_ui()
> @@ -143,7 +145,9 @@ class vmmGraphicsDetails(vmmGObjectUI):
>          if not self.widget("graphics-password-chk").get_active():
>              passwd = None
>  
> -        return gtype, port, tlsport, addr, passwd, keymap
> +        gl = self.widget("graphics-opengl").get_active()
> +
> +        return gtype, port, tlsport, addr, passwd, keymap, gl
>  
>      def set_dev(self, gfx):
>          self.reset_state()
> @@ -188,6 +192,7 @@ class vmmGraphicsDetails(vmmGObjectUI):
>  
>          if is_spice:
>              set_port("graphics-tlsport", gfx.tlsPort)
> +            self.widget("graphics-opengl").set_active(gfx.gl == "yes")
> 

It shouldn't return a 'yes' value here, since virtinst is_onoff will convert
to bool. So just gfx.gl I think

Otherwise looks fine

Thanks,
Cole




More information about the virt-tools-list mailing list