1
0
mirror of https://github.com/virt-manager/virt-manager.git synced 2025-01-07 17:18:00 +03:00

viewers: Remove hidden grab-keyboard gsettings

This was added in 2014 per user request but we never exposed it in the
UI. This is fairly advanced needs from the console viewer IMO and is
better left to console specific tools like virt-viewer, per our
DESIGN.md

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2020-09-01 13:18:59 -04:00
parent 315f492156
commit 408b3023bc
3 changed files with 0 additions and 30 deletions

View File

@ -223,13 +223,6 @@
<description>Grab keyboard sequence for the graphical console</description>
</key>
<!--This key is not intended to be exposed in the UI yet-->
<key name="grab-keyboard" type="b">
<default>true</default>
<summary>Enable grab keyboard when active and focused</summary>
<description>Enable grab keyboard when active and focused</description>
</key>
<key name="auto-redirect" type="b">
<default>true</default>
<summary>Enable SPICE Auto USB redirection in console window</summary>

View File

@ -376,12 +376,6 @@ class vmmConfig(object):
def on_keys_combination_changed(self, cb):
return self.conf.notify_add("/console/grab-keys", cb)
# This key is not intended to be exposed in the UI yet (maybe ever)
def get_keyboard_grab_default(self):
return self.conf.get("/console/grab-keyboard")
def on_keyboard_grab_default_changed(self, cb):
return self.conf.notify_add("/console/grab-keyboard", cb)
# Confirmation preferences
def get_confirm_forcepoweroff(self):
return self.conf.get("/confirm/forcepoweroff")

View File

@ -57,9 +57,6 @@ class Viewer(vmmGObject):
self.add_gsettings_handle(
self.config.on_keys_combination_changed(self._refresh_grab_keys))
self.add_gsettings_handle(
self.config.on_keyboard_grab_default_changed(
self._refresh_keyboard_grab_default))
self.connect("add-display-widget", self._common_init)
@ -90,7 +87,6 @@ class Viewer(vmmGObject):
def _common_init(self, ignore1, ignore2):
self._refresh_grab_keys()
self._refresh_keyboard_grab_default()
self._display.connect("size-allocate",
self._make_signal_proxy("size-allocate"))
@ -176,8 +172,6 @@ class Viewer(vmmGObject):
def _refresh_grab_keys(self):
raise NotImplementedError()
def _refresh_keyboard_grab_default(self):
raise NotImplementedError()
def _open_host(self):
raise NotImplementedError()
@ -404,11 +398,6 @@ class VNCViewer(Viewer):
def _send_keys(self, keys):
return self._display.send_keys([Gdk.keyval_from_name(k) for k in keys])
def _refresh_keyboard_grab_default(self):
if not self._display:
return # pragma: no cover
self._display.set_keyboard_grab(self.config.get_keyboard_grab_default())
def _get_desktop_resolution(self):
return self._desktop_resolution
@ -653,12 +642,6 @@ class SpiceViewer(Viewer):
return self._display.send_keys([Gdk.keyval_from_name(k) for k in keys],
SpiceClientGtk.DisplayKeyEvent.CLICK)
def _refresh_keyboard_grab_default(self):
if not self._display:
return # pragma: no cover
self._display.set_property("grab-keyboard",
self.config.get_keyboard_grab_default())
def _get_desktop_resolution(self):
if not self._display_channel:
return None