mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
virtManager/ui: add listen type option
Similarly to virt-install --listen=none, add a combobox to select the listen type: "address" or "none" for now, as suggested by Pavel Hrdina. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
88942028b3
commit
326dc03c23
@ -67,7 +67,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">4</property>
|
<property name="top_attach">5</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -95,7 +95,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">1</property>
|
<property name="top_attach">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -109,7 +109,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">4</property>
|
<property name="top_attach">5</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -123,7 +123,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">2</property>
|
<property name="top_attach">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -145,7 +145,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">3</property>
|
<property name="top_attach">4</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -193,7 +193,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">3</property>
|
<property name="top_attach">4</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -207,7 +207,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">5</property>
|
<property name="top_attach">6</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -228,7 +228,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">5</property>
|
<property name="top_attach">6</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -276,7 +276,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">2</property>
|
<property name="top_attach">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -288,7 +288,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">6</property>
|
<property name="top_attach">7</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -300,7 +300,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">7</property>
|
<property name="top_attach">8</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -312,7 +312,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">6</property>
|
<property name="top_attach">7</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -324,7 +324,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">7</property>
|
<property name="top_attach">8</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -342,7 +342,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">1</property>
|
<property name="top_attach">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -374,7 +374,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">8</property>
|
<property name="top_attach">9</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -390,7 +390,39 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">8</property>
|
<property name="top_attach">9</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label4">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">L_isten type:</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="mnemonic_widget">graphics-listen-type</property>
|
||||||
|
<property name="xalign">1</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="graphics-listen-type">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="has_entry">True</property>
|
||||||
|
<signal name="changed" handler="on_graphics_listen_type_changed" swapped="no"/>
|
||||||
|
<child internal-child="entry">
|
||||||
|
<object class="GtkEntry">
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
@ -1554,16 +1554,22 @@ class vmmAddHardware(vmmGObjectUI):
|
|||||||
|
|
||||||
def _validate_page_graphics(self):
|
def _validate_page_graphics(self):
|
||||||
try:
|
try:
|
||||||
(gtype, port,
|
(gtype, port, tlsport, listen,
|
||||||
tlsport, addr, passwd, keymap, gl) = self._gfxdetails.get_values()
|
addr, passwd, keymap, gl) = self._gfxdetails.get_values()
|
||||||
|
|
||||||
self._dev = virtinst.VirtualGraphics(self.conn.get_backend())
|
self._dev = virtinst.VirtualGraphics(self.conn.get_backend())
|
||||||
self._dev.type = gtype
|
self._dev.type = gtype
|
||||||
self._dev.port = port
|
|
||||||
self._dev.passwd = passwd
|
self._dev.passwd = passwd
|
||||||
self._dev.listen = addr
|
|
||||||
self._dev.tlsPort = tlsport
|
|
||||||
self._dev.gl = gl
|
self._dev.gl = gl
|
||||||
|
|
||||||
|
if not listen or listen == "none":
|
||||||
|
self._dev.set_listen_none()
|
||||||
|
elif listen == "address":
|
||||||
|
self._dev.listen = addr
|
||||||
|
self._dev.port = port
|
||||||
|
self._dev.tlsPort = tlsport
|
||||||
|
else:
|
||||||
|
raise ValueError(_("invalid listen type"))
|
||||||
if keymap:
|
if keymap:
|
||||||
self._dev.keymap = keymap
|
self._dev.keymap = keymap
|
||||||
except ValueError, e:
|
except ValueError, e:
|
||||||
|
@ -87,6 +87,7 @@ EDIT_NET_MAC,
|
|||||||
EDIT_GFX_PASSWD,
|
EDIT_GFX_PASSWD,
|
||||||
EDIT_GFX_TYPE,
|
EDIT_GFX_TYPE,
|
||||||
EDIT_GFX_KEYMAP,
|
EDIT_GFX_KEYMAP,
|
||||||
|
EDIT_GFX_LISTEN,
|
||||||
EDIT_GFX_ADDRESS,
|
EDIT_GFX_ADDRESS,
|
||||||
EDIT_GFX_TLSPORT,
|
EDIT_GFX_TLSPORT,
|
||||||
EDIT_GFX_PORT,
|
EDIT_GFX_PORT,
|
||||||
@ -105,7 +106,7 @@ EDIT_FS,
|
|||||||
|
|
||||||
EDIT_HOSTDEV_ROMBAR,
|
EDIT_HOSTDEV_ROMBAR,
|
||||||
|
|
||||||
) = range(1, 46)
|
) = range(1, 47)
|
||||||
|
|
||||||
|
|
||||||
# Columns in hw list model
|
# Columns in hw list model
|
||||||
@ -399,6 +400,8 @@ class vmmDetails(vmmGObjectUI):
|
|||||||
lambda *x: self.enable_apply(x, EDIT_GFX_OPENGL))
|
lambda *x: self.enable_apply(x, EDIT_GFX_OPENGL))
|
||||||
self.gfxdetails.connect("changed-tlsport",
|
self.gfxdetails.connect("changed-tlsport",
|
||||||
lambda *x: self.enable_apply(x, EDIT_GFX_TLSPORT))
|
lambda *x: self.enable_apply(x, EDIT_GFX_TLSPORT))
|
||||||
|
self.gfxdetails.connect("changed-listen",
|
||||||
|
lambda *x: self.enable_apply(x, EDIT_GFX_LISTEN))
|
||||||
self.gfxdetails.connect("changed-address",
|
self.gfxdetails.connect("changed-address",
|
||||||
lambda *x: self.enable_apply(x, EDIT_GFX_ADDRESS))
|
lambda *x: self.enable_apply(x, EDIT_GFX_ADDRESS))
|
||||||
self.gfxdetails.connect("changed-keymap",
|
self.gfxdetails.connect("changed-keymap",
|
||||||
@ -2160,22 +2163,24 @@ class vmmDetails(vmmGObjectUI):
|
|||||||
devobj=devobj)
|
devobj=devobj)
|
||||||
|
|
||||||
def config_graphics_apply(self, devobj):
|
def config_graphics_apply(self, devobj):
|
||||||
(gtype, port,
|
(gtype, port, tlsport, listen,
|
||||||
tlsport, addr, passwd, keymap, gl) = self.gfxdetails.get_values()
|
addr, passwd, keymap, gl) = self.gfxdetails.get_values()
|
||||||
|
|
||||||
kwargs = {}
|
kwargs = {}
|
||||||
|
|
||||||
if self.edited(EDIT_GFX_PASSWD):
|
if self.edited(EDIT_GFX_PASSWD):
|
||||||
kwargs["passwd"] = passwd
|
kwargs["passwd"] = passwd
|
||||||
if self.edited(EDIT_GFX_ADDRESS):
|
if self.edited(EDIT_GFX_LISTEN):
|
||||||
kwargs["listen"] = addr
|
kwargs["listen"] = listen
|
||||||
|
if self.edited(EDIT_GFX_ADDRESS) or self.edited(EDIT_GFX_LISTEN):
|
||||||
|
kwargs["addr"] = addr
|
||||||
if self.edited(EDIT_GFX_KEYMAP):
|
if self.edited(EDIT_GFX_KEYMAP):
|
||||||
kwargs["keymap"] = keymap
|
kwargs["keymap"] = keymap
|
||||||
if self.edited(EDIT_GFX_PORT):
|
if self.edited(EDIT_GFX_PORT) or self.edited(EDIT_GFX_LISTEN):
|
||||||
kwargs["port"] = port
|
kwargs["port"] = port
|
||||||
if self.edited(EDIT_GFX_OPENGL):
|
if self.edited(EDIT_GFX_OPENGL):
|
||||||
kwargs["gl"] = gl
|
kwargs["gl"] = gl
|
||||||
if self.edited(EDIT_GFX_TLSPORT):
|
if self.edited(EDIT_GFX_TLSPORT) or self.edited(EDIT_GFX_LISTEN):
|
||||||
kwargs["tlsport"] = tlsport
|
kwargs["tlsport"] = tlsport
|
||||||
if self.edited(EDIT_GFX_TYPE):
|
if self.edited(EDIT_GFX_TYPE):
|
||||||
kwargs["gtype"] = gtype
|
kwargs["gtype"] = gtype
|
||||||
|
@ -824,7 +824,7 @@ class vmmDomain(vmmLibvirtObject):
|
|||||||
self._redefine_xmlobj(xmlobj)
|
self._redefine_xmlobj(xmlobj)
|
||||||
|
|
||||||
def define_graphics(self, devobj, do_hotplug,
|
def define_graphics(self, devobj, do_hotplug,
|
||||||
listen=_SENTINEL, port=_SENTINEL, tlsport=_SENTINEL,
|
listen=_SENTINEL, addr=_SENTINEL, port=_SENTINEL, tlsport=_SENTINEL,
|
||||||
passwd=_SENTINEL, keymap=_SENTINEL, gtype=_SENTINEL,
|
passwd=_SENTINEL, keymap=_SENTINEL, gtype=_SENTINEL,
|
||||||
gl=_SENTINEL):
|
gl=_SENTINEL):
|
||||||
xmlobj = self._make_xmlobj_to_define()
|
xmlobj = self._make_xmlobj_to_define()
|
||||||
@ -832,8 +832,8 @@ class vmmDomain(vmmLibvirtObject):
|
|||||||
if not editdev:
|
if not editdev:
|
||||||
return
|
return
|
||||||
|
|
||||||
if listen != _SENTINEL:
|
if addr != _SENTINEL:
|
||||||
editdev.listen = listen
|
editdev.listen = addr
|
||||||
if port != _SENTINEL:
|
if port != _SENTINEL:
|
||||||
editdev.port = port
|
editdev.port = port
|
||||||
if tlsport != _SENTINEL:
|
if tlsport != _SENTINEL:
|
||||||
@ -846,6 +846,12 @@ class vmmDomain(vmmLibvirtObject):
|
|||||||
editdev.type = gtype
|
editdev.type = gtype
|
||||||
if gl != _SENTINEL:
|
if gl != _SENTINEL:
|
||||||
editdev.gl = gl
|
editdev.gl = gl
|
||||||
|
if listen != _SENTINEL:
|
||||||
|
listentype = editdev.get_first_listen_type()
|
||||||
|
if listen == 'none':
|
||||||
|
editdev.set_listen_none()
|
||||||
|
elif listentype and listentype == 'none':
|
||||||
|
editdev.remove_all_listens()
|
||||||
|
|
||||||
if do_hotplug:
|
if do_hotplug:
|
||||||
self.hotplug(device=editdev)
|
self.hotplug(device=editdev)
|
||||||
|
@ -33,6 +33,7 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||||||
"changed-port": (GObject.SignalFlags.RUN_FIRST, None, []),
|
"changed-port": (GObject.SignalFlags.RUN_FIRST, None, []),
|
||||||
"changed-tlsport": (GObject.SignalFlags.RUN_FIRST, None, []),
|
"changed-tlsport": (GObject.SignalFlags.RUN_FIRST, None, []),
|
||||||
"changed-type": (GObject.SignalFlags.RUN_FIRST, None, []),
|
"changed-type": (GObject.SignalFlags.RUN_FIRST, None, []),
|
||||||
|
"changed-listen": (GObject.SignalFlags.RUN_FIRST, None, []),
|
||||||
"changed-address": (GObject.SignalFlags.RUN_FIRST, None, []),
|
"changed-address": (GObject.SignalFlags.RUN_FIRST, None, []),
|
||||||
"changed-keymap": (GObject.SignalFlags.RUN_FIRST, None, []),
|
"changed-keymap": (GObject.SignalFlags.RUN_FIRST, None, []),
|
||||||
"changed-opengl": (GObject.SignalFlags.RUN_FIRST, None, []),
|
"changed-opengl": (GObject.SignalFlags.RUN_FIRST, None, []),
|
||||||
@ -50,6 +51,7 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||||||
"on_graphics_tlsport_auto_toggled": self._change_tlsport_auto,
|
"on_graphics_tlsport_auto_toggled": self._change_tlsport_auto,
|
||||||
"on_graphics_use_password": self._change_password_chk,
|
"on_graphics_use_password": self._change_password_chk,
|
||||||
|
|
||||||
|
"on_graphics_listen_type_changed": self._change_graphics_listen,
|
||||||
"on_graphics_password_changed": lambda ignore: self.emit("changed-password"),
|
"on_graphics_password_changed": lambda ignore: self.emit("changed-password"),
|
||||||
"on_graphics_address_changed": lambda ignore: self.emit("changed-address"),
|
"on_graphics_address_changed": lambda ignore: self.emit("changed-address"),
|
||||||
"on_graphics_tlsport_changed": lambda ignore: self.emit("changed-tlsport"),
|
"on_graphics_tlsport_changed": lambda ignore: self.emit("changed-tlsport"),
|
||||||
@ -78,6 +80,14 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||||||
graphics_model.append(["spice", _("Spice server")])
|
graphics_model.append(["spice", _("Spice server")])
|
||||||
graphics_model.append(["vnc", _("VNC server")])
|
graphics_model.append(["vnc", _("VNC server")])
|
||||||
|
|
||||||
|
graphics_listen_list = self.widget("graphics-listen-type")
|
||||||
|
graphics_listen_model = Gtk.ListStore(str, str)
|
||||||
|
graphics_listen_list.set_model(graphics_listen_model)
|
||||||
|
uiutil.init_combo_text_column(graphics_listen_list, 1)
|
||||||
|
graphics_listen_model.clear()
|
||||||
|
graphics_listen_model.append(["address", _("Address")])
|
||||||
|
graphics_listen_model.append(["none", _("None")])
|
||||||
|
|
||||||
self.widget("graphics-address").set_model(Gtk.ListStore(str, str))
|
self.widget("graphics-address").set_model(Gtk.ListStore(str, str))
|
||||||
uiutil.init_combo_text_column(self.widget("graphics-address"), 1)
|
uiutil.init_combo_text_column(self.widget("graphics-address"), 1)
|
||||||
|
|
||||||
@ -123,6 +133,7 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||||||
uiutil.set_grid_row_visible(self.widget("graphics-xauth"), False)
|
uiutil.set_grid_row_visible(self.widget("graphics-xauth"), False)
|
||||||
|
|
||||||
self.widget("graphics-type").set_active(0)
|
self.widget("graphics-type").set_active(0)
|
||||||
|
self.widget("graphics-listen-type").set_active(0)
|
||||||
self.widget("graphics-address").set_active(0)
|
self.widget("graphics-address").set_active(0)
|
||||||
self.widget("graphics-keymap").set_active(0)
|
self.widget("graphics-keymap").set_active(0)
|
||||||
|
|
||||||
@ -136,6 +147,7 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||||||
def get_values(self):
|
def get_values(self):
|
||||||
gtype = uiutil.get_list_selection(self.widget("graphics-type"))
|
gtype = uiutil.get_list_selection(self.widget("graphics-type"))
|
||||||
port, tlsport = self._get_config_graphics_ports()
|
port, tlsport = self._get_config_graphics_ports()
|
||||||
|
listen = uiutil.get_list_selection(self.widget("graphics-listen-type"))
|
||||||
addr = uiutil.get_list_selection(self.widget("graphics-address"))
|
addr = uiutil.get_list_selection(self.widget("graphics-address"))
|
||||||
keymap = uiutil.get_list_selection(self.widget("graphics-keymap"))
|
keymap = uiutil.get_list_selection(self.widget("graphics-keymap"))
|
||||||
if keymap == "auto":
|
if keymap == "auto":
|
||||||
@ -147,7 +159,7 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||||||
|
|
||||||
gl = self.widget("graphics-opengl").get_active()
|
gl = self.widget("graphics-opengl").get_active()
|
||||||
|
|
||||||
return gtype, port, tlsport, addr, passwd, keymap, gl
|
return gtype, port, tlsport, listen, addr, passwd, keymap, gl
|
||||||
|
|
||||||
def set_dev(self, gfx):
|
def set_dev(self, gfx):
|
||||||
self.reset_state()
|
self.reset_state()
|
||||||
@ -181,8 +193,13 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||||||
use_passwd = gfx.passwd is not None
|
use_passwd = gfx.passwd is not None
|
||||||
|
|
||||||
set_port("graphics-port", gfx.port)
|
set_port("graphics-port", gfx.port)
|
||||||
uiutil.set_list_selection(
|
listentype = gfx.get_first_listen_type()
|
||||||
self.widget("graphics-address"), gfx.listen)
|
if listentype and listentype == 'none':
|
||||||
|
uiutil.set_list_selection(self.widget("graphics-listen-type"), 'none')
|
||||||
|
else:
|
||||||
|
uiutil.set_list_selection(self.widget("graphics-listen-type"), 'address')
|
||||||
|
uiutil.set_list_selection(
|
||||||
|
self.widget("graphics-address"), gfx.listen)
|
||||||
uiutil.set_list_selection(
|
uiutil.set_list_selection(
|
||||||
self.widget("graphics-keymap"), gfx.keymap or None)
|
self.widget("graphics-keymap"), gfx.keymap or None)
|
||||||
|
|
||||||
@ -216,10 +233,15 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||||||
"graphics-tlsport-box", "graphics-opengl"]
|
"graphics-tlsport-box", "graphics-opengl"]
|
||||||
|
|
||||||
gtype = uiutil.get_list_selection(self.widget("graphics-type"))
|
gtype = uiutil.get_list_selection(self.widget("graphics-type"))
|
||||||
|
listen = uiutil.get_list_selection(self.widget("graphics-listen-type"))
|
||||||
|
|
||||||
sdl_rows = ["graphics-xauth", "graphics-display"]
|
sdl_rows = ["graphics-xauth", "graphics-display"]
|
||||||
vnc_rows = ["graphics-password-box", "graphics-address",
|
vnc_rows = ["graphics-password-box", "graphics-keymap"]
|
||||||
"graphics-port-box", "graphics-keymap"]
|
if listen == 'address':
|
||||||
spice_rows = vnc_rows[:] + ["graphics-tlsport-box"]
|
vnc_rows.extend(["graphics-port-box", "graphics-address"])
|
||||||
|
spice_rows = vnc_rows[:]
|
||||||
|
if listen == 'address':
|
||||||
|
spice_rows.extend(["graphics-tlsport-box"])
|
||||||
if self.conn.check_support(self.conn.SUPPORT_CONN_SPICE_GL):
|
if self.conn.check_support(self.conn.SUPPORT_CONN_SPICE_GL):
|
||||||
spice_rows.extend(["graphics-opengl"])
|
spice_rows.extend(["graphics-opengl"])
|
||||||
|
|
||||||
@ -238,6 +260,10 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||||||
self._show_rows_from_type()
|
self._show_rows_from_type()
|
||||||
self.emit("changed-type")
|
self.emit("changed-type")
|
||||||
|
|
||||||
|
def _change_graphics_listen(self, ignore):
|
||||||
|
self._show_rows_from_type()
|
||||||
|
self.emit("changed-listen")
|
||||||
|
|
||||||
def _change_port_auto(self, ignore):
|
def _change_port_auto(self, ignore):
|
||||||
self.widget("graphics-port-auto").set_inconsistent(False)
|
self.widget("graphics-port-auto").set_inconsistent(False)
|
||||||
self._change_ports()
|
self._change_ports()
|
||||||
|
@ -224,6 +224,11 @@ class VirtualGraphics(VirtualDevice):
|
|||||||
self.add_child(obj)
|
self.add_child(obj)
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
|
def get_first_listen_type(self):
|
||||||
|
if len(self.listens) > 0:
|
||||||
|
return self.listens[0].type
|
||||||
|
return None
|
||||||
|
|
||||||
def set_listen_none(self):
|
def set_listen_none(self):
|
||||||
self.remove_all_listens()
|
self.remove_all_listens()
|
||||||
self.listen = None
|
self.listen = None
|
||||||
|
Loading…
Reference in New Issue
Block a user