preferences: Unconditionally add VM sound devices
This is another preference that was added before anyone ever asked for it. I'm fine with suggesting users remove the device manually if they don't want it Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
748639702e
commit
6a88f92fd0
|
@ -247,12 +247,6 @@
|
||||||
|
|
||||||
<schema id="org.virt-manager.virt-manager.new-vm"
|
<schema id="org.virt-manager.virt-manager.new-vm"
|
||||||
path="/org/virt-manager/virt-manager/new-vm/">
|
path="/org/virt-manager/virt-manager/new-vm/">
|
||||||
<key name="add-sound" type="b">
|
|
||||||
<default>true</default>
|
|
||||||
<summary>Install sound device for new Vms</summary>
|
|
||||||
<description>Whether to install a sound device for new VMs</description>
|
|
||||||
</key>
|
|
||||||
|
|
||||||
<key name="graphics-type" type="s">
|
<key name="graphics-type" type="s">
|
||||||
<default>'system'</default>
|
<default>'system'</default>
|
||||||
<summary>Install selected graphics type for new VM</summary>
|
<summary>Install selected graphics type for new VM</summary>
|
||||||
|
|
|
@ -40,7 +40,6 @@ def testPrefsAll(app):
|
||||||
win.find("New VM", "page tab").click()
|
win.find("New VM", "page tab").click()
|
||||||
tab = newvmtab
|
tab = newvmtab
|
||||||
tab.check_onscreen()
|
tab.check_onscreen()
|
||||||
tab.find("Add sound device", "check box").click()
|
|
||||||
tab.combo_select("CPU default:", "Copy host")
|
tab.combo_select("CPU default:", "Copy host")
|
||||||
tab.combo_select("Storage format:", "Raw")
|
tab.combo_select("Storage format:", "Raw")
|
||||||
tab.combo_select("Graphics type", "VNC")
|
tab.combo_select("Graphics type", "VNC")
|
||||||
|
|
|
@ -425,7 +425,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">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -440,7 +440,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">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -451,7 +451,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">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -463,37 +463,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">1</property>
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkCheckButton" id="prefs-new-vm-sound">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">False</property>
|
|
||||||
<property name="halign">start</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
<signal name="toggled" handler="on_prefs_new_vm_sound_toggled" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="label7">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="halign">start</property>
|
|
||||||
<property name="label" translatable="yes">_Add sound device:</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<property name="mnemonic_widget">prefs-new-vm-sound</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -510,7 +480,7 @@ identical CPUs in order to migrate the VM.</property>
|
||||||
</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">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -521,7 +491,7 @@ identical CPUs in order to migrate the VM.</property>
|
||||||
</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">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
@ -501,11 +501,6 @@ class vmmConfig(object):
|
||||||
self.conf.set("/details/show-toolbar", state)
|
self.conf.set("/details/show-toolbar", state)
|
||||||
|
|
||||||
# New VM preferences
|
# New VM preferences
|
||||||
def get_new_vm_sound(self):
|
|
||||||
return self.conf.get("/new-vm/add-sound")
|
|
||||||
def set_new_vm_sound(self, state):
|
|
||||||
self.conf.set("/new-vm/add-sound", state)
|
|
||||||
|
|
||||||
def get_graphics_type(self, raw=False):
|
def get_graphics_type(self, raw=False):
|
||||||
ret = self.conf.get("/new-vm/graphics-type")
|
ret = self.conf.get("/new-vm/graphics-type")
|
||||||
if ret not in ["system", "vnc", "spice"]:
|
if ret not in ["system", "vnc", "spice"]:
|
||||||
|
|
|
@ -1424,7 +1424,6 @@ class vmmCreateVM(vmmGObjectUI):
|
||||||
gdata = _GuestData(self.conn.get_backend(), self._capsinfo)
|
gdata = _GuestData(self.conn.get_backend(), self._capsinfo)
|
||||||
|
|
||||||
gdata.default_graphics_type = self.config.get_graphics_type()
|
gdata.default_graphics_type = self.config.get_graphics_type()
|
||||||
gdata.skip_default_sound = not self.config.get_new_vm_sound()
|
|
||||||
gdata.x86_cpu_default = self.config.get_default_cpu_setting()
|
gdata.x86_cpu_default = self.config.get_default_cpu_setting()
|
||||||
|
|
||||||
return gdata
|
return gdata
|
||||||
|
|
|
@ -43,7 +43,6 @@ class vmmPreferences(vmmGObjectUI):
|
||||||
self.refresh_console_resizeguest()
|
self.refresh_console_resizeguest()
|
||||||
self.refresh_console_autoredir()
|
self.refresh_console_autoredir()
|
||||||
self.refresh_console_autoconnect()
|
self.refresh_console_autoconnect()
|
||||||
self.refresh_new_vm_sound()
|
|
||||||
self.refresh_graphics_type()
|
self.refresh_graphics_type()
|
||||||
self.refresh_storage_format()
|
self.refresh_storage_format()
|
||||||
self.refresh_cpu_default()
|
self.refresh_cpu_default()
|
||||||
|
@ -71,7 +70,6 @@ class vmmPreferences(vmmGObjectUI):
|
||||||
"on_prefs_console_resizeguest_changed": self.change_console_resizeguest,
|
"on_prefs_console_resizeguest_changed": self.change_console_resizeguest,
|
||||||
"on_prefs_console_autoredir_changed": self.change_console_autoredir,
|
"on_prefs_console_autoredir_changed": self.change_console_autoredir,
|
||||||
"on_prefs_console_autoconnect_toggled": self.change_console_autoconnect,
|
"on_prefs_console_autoconnect_toggled": self.change_console_autoconnect,
|
||||||
"on_prefs_new_vm_sound_toggled": self.change_new_vm_sound,
|
|
||||||
"on_prefs_graphics_type_changed": self.change_graphics_type,
|
"on_prefs_graphics_type_changed": self.change_graphics_type,
|
||||||
"on_prefs_storage_format_changed": self.change_storage_format,
|
"on_prefs_storage_format_changed": self.change_storage_format,
|
||||||
"on_prefs_cpu_default_changed": self.change_cpu_default,
|
"on_prefs_cpu_default_changed": self.change_cpu_default,
|
||||||
|
@ -224,9 +222,6 @@ class vmmPreferences(vmmGObjectUI):
|
||||||
val = self.config.get_console_autoconnect()
|
val = self.config.get_console_autoconnect()
|
||||||
self.widget("prefs-console-autoconnect").set_active(val)
|
self.widget("prefs-console-autoconnect").set_active(val)
|
||||||
|
|
||||||
def refresh_new_vm_sound(self):
|
|
||||||
self.widget("prefs-new-vm-sound").set_active(
|
|
||||||
self.config.get_new_vm_sound())
|
|
||||||
def refresh_graphics_type(self):
|
def refresh_graphics_type(self):
|
||||||
combo = self.widget("prefs-graphics-type")
|
combo = self.widget("prefs-graphics-type")
|
||||||
gtype = self.config.get_graphics_type(raw=True)
|
gtype = self.config.get_graphics_type(raw=True)
|
||||||
|
@ -370,8 +365,6 @@ class vmmPreferences(vmmGObjectUI):
|
||||||
def change_console_autoconnect(self, src):
|
def change_console_autoconnect(self, src):
|
||||||
self.config.set_console_autoconnect(bool(src.get_active()))
|
self.config.set_console_autoconnect(bool(src.get_active()))
|
||||||
|
|
||||||
def change_new_vm_sound(self, src):
|
|
||||||
self.config.set_new_vm_sound(src.get_active())
|
|
||||||
def change_graphics_type(self, src):
|
def change_graphics_type(self, src):
|
||||||
val = uiutil.get_list_selection(src)
|
val = uiutil.get_list_selection(src)
|
||||||
self.config.set_graphics_type(val)
|
self.config.set_graphics_type(val)
|
||||||
|
|
Loading…
Reference in New Issue