mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
prefs: Remove 'Force console accels' option
This is very obscure and definitely not in line with our DESIGN.md nowadays Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
971a3e58f8
commit
33a61f7f30
@ -199,12 +199,6 @@
|
||||
|
||||
<schema id="org.virt-manager.virt-manager.console"
|
||||
path="/org/virt-manager/virt-manager/console/">
|
||||
<key name="enable-accels" type="b">
|
||||
<default>false</default>
|
||||
<summary>Enable menu accelerators in console window</summary>
|
||||
<description>Whether to enable menu accelerators while connected to the guest graphical console.</description>
|
||||
</key>
|
||||
|
||||
<key name="scaling" type="i">
|
||||
<default>1</default>
|
||||
<summary>When to scale the VM graphical console</summary>
|
||||
|
@ -57,7 +57,6 @@ class VMMPrefs(uiutils.UITestCase):
|
||||
tab.combo_select("SPICE USB", "Manual redirect")
|
||||
tab.combo_select("Resize guest", "On")
|
||||
tab.combo_select("Graphical console scaling", "Always")
|
||||
tab.find("Force console", "check box").click()
|
||||
|
||||
tab.find("Change...", "push button").click()
|
||||
keyframe = self.app.root.find_fuzzy("Configure grab", "dialog")
|
||||
|
@ -678,36 +678,6 @@ Redirection:</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="prefs-console-accels">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">When the guest graphical console has keyboard focus, do not disable shortcuts for console window menus (Alt+F -> File, etc.) Normally these are disabled to ensure that typing in the guest does not accidentally perform an operation in virt-manager's console window.</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_prefs_console_accels_toggled" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label15">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="tooltip_text" translatable="yes">When the guest graphical console has keyboard focus, do not disable shortcuts for console window menus (Alt+F -> File, etc.) Normally these are disabled to ensure that typing in the guest does not accidentally perform an operation in virt-manager's console window.</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">_Force console shortcuts:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">prefs-console-accels</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="prefs-keys-grab-changebtn">
|
||||
<property name="label" translatable="yes">Change...</property>
|
||||
@ -761,7 +731,7 @@ Redirection:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -772,7 +742,7 @@ Redirection:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -469,17 +469,6 @@ class vmmConfig(object):
|
||||
def on_stats_enable_memory_poll_changed(self, cb, row=None):
|
||||
return self.conf.notify_add("/stats/enable-memory-poll", cb, row)
|
||||
|
||||
# VM Console preferences
|
||||
def on_console_accels_changed(self, cb):
|
||||
return self.conf.notify_add("/console/enable-accels", cb)
|
||||
def get_console_accels(self):
|
||||
console_pref = self.conf.get("/console/enable-accels")
|
||||
if console_pref is None:
|
||||
console_pref = False # pragma: no cover
|
||||
return console_pref
|
||||
def set_console_accels(self, pref):
|
||||
self.conf.set("/console/enable-accels", pref)
|
||||
|
||||
def get_console_scaling(self):
|
||||
return self.conf.get("/console/scaling")
|
||||
def set_console_scaling(self, pref):
|
||||
|
@ -347,8 +347,6 @@ class vmmConsolePages(vmmGObjectUI):
|
||||
self.add_gsettings_handle(
|
||||
self.vm.on_console_resizeguest_changed(
|
||||
self._refresh_resizeguest_from_settings))
|
||||
self.add_gsettings_handle(
|
||||
self.config.on_console_accels_changed(self._refresh_enable_accel))
|
||||
|
||||
|
||||
def _cleanup(self):
|
||||
@ -438,10 +436,6 @@ class vmmConsolePages(vmmGObjectUI):
|
||||
for g in self._accel_groups:
|
||||
self.topwin.add_accel_group(g)
|
||||
|
||||
def _refresh_enable_accel(self):
|
||||
# Make sure modifiers are up to date
|
||||
self._viewer_focus_changed()
|
||||
|
||||
def _do_send_key(self, src, keys):
|
||||
ignore = src
|
||||
|
||||
@ -838,8 +832,6 @@ class vmmConsolePages(vmmGObjectUI):
|
||||
self._viewer = viewer_class(self.vm, ginfo)
|
||||
self._connect_viewer_signals()
|
||||
|
||||
self._refresh_enable_accel()
|
||||
|
||||
self._viewer.console_open()
|
||||
except Exception as e:
|
||||
log.exception("Error connection to graphical console")
|
||||
@ -885,11 +877,7 @@ class vmmConsolePages(vmmGObjectUI):
|
||||
self.widget("console-gfx-scroll").queue_resize()
|
||||
|
||||
def _viewer_focus_changed(self, ignore1=None, ignore2=None):
|
||||
force_accel = self.config.get_console_accels()
|
||||
|
||||
if force_accel:
|
||||
self._enable_modifiers() # pragma: no cover
|
||||
elif self._someone_has_focus():
|
||||
if self._someone_has_focus():
|
||||
self._disable_modifiers()
|
||||
else:
|
||||
self._enable_modifiers()
|
||||
|
@ -39,7 +39,6 @@ class vmmPreferences(vmmGObjectUI):
|
||||
self.refresh_xmleditor()
|
||||
self.refresh_libguestfs()
|
||||
self.refresh_update_interval()
|
||||
self.refresh_console_accels()
|
||||
self.refresh_console_scaling()
|
||||
self.refresh_console_resizeguest()
|
||||
self.refresh_console_autoredir()
|
||||
@ -68,7 +67,6 @@ class vmmPreferences(vmmGObjectUI):
|
||||
"on_prefs_xmleditor_toggled": self.change_xmleditor,
|
||||
"on_prefs_libguestfs_toggled": self.change_libguestfs,
|
||||
"on_prefs_stats_update_interval_changed": self.change_update_interval,
|
||||
"on_prefs_console_accels_toggled": self.change_console_accels,
|
||||
"on_prefs_console_scaling_changed": self.change_console_scaling,
|
||||
"on_prefs_console_resizeguest_changed": self.change_console_resizeguest,
|
||||
"on_prefs_console_autoredir_changed": self.change_console_autoredir,
|
||||
@ -220,9 +218,6 @@ class vmmPreferences(vmmGObjectUI):
|
||||
self.widget("prefs-stats-update-interval").set_value(
|
||||
self.config.get_stats_update_interval())
|
||||
|
||||
def refresh_console_accels(self):
|
||||
self.widget("prefs-console-accels").set_active(
|
||||
self.config.get_console_accels())
|
||||
def refresh_console_scaling(self):
|
||||
combo = self.widget("prefs-console-scaling")
|
||||
val = self.config.get_console_scaling()
|
||||
@ -375,8 +370,6 @@ class vmmPreferences(vmmGObjectUI):
|
||||
def change_update_interval(self, src):
|
||||
self.config.set_stats_update_interval(src.get_value_as_int())
|
||||
|
||||
def change_console_accels(self, src):
|
||||
self.config.set_console_accels(src.get_active())
|
||||
def change_console_scaling(self, box):
|
||||
self.config.set_console_scaling(box.get_active())
|
||||
def change_console_resizeguest(self, box):
|
||||
|
Loading…
Reference in New Issue
Block a user