mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Store 'Show Toolbar' value in gconf.
This commit is contained in:
parent
333aa00df8
commit
1a01b730d8
@ -169,6 +169,19 @@
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/::PACKAGE::/details/show-toolbar</key>
|
||||
<applyto>/apps/::PACKAGE::/details/show-toolbar</applyto>
|
||||
<owner>::PACKAGE::</owner>
|
||||
<type>bool</type>
|
||||
<default>1</default>
|
||||
|
||||
<locale name="C">
|
||||
<short>Whether to show VM button toolbar in Details display</short>
|
||||
<long>Whether to show toolbar containing Virtual Machine action buttons (such as Run, Pause, Shutdown) in the details display</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/::PACKAGE::/new-vm/local-sound</key>
|
||||
<applyto>/apps/::PACKAGE::/new-vm/local-sound</applyto>
|
||||
|
@ -219,6 +219,12 @@ class vmmConfig:
|
||||
def set_console_grab_notify(self, state):
|
||||
self.conf.set_bool(self.conf_dir + "/console/grab-notify", state)
|
||||
|
||||
def get_details_show_toolbar(self):
|
||||
return self.conf.get_bool(self.conf_dir + "/details/show-toolbar")
|
||||
|
||||
def set_details_show_toolbar(self, state):
|
||||
self.conf.set_bool(self.conf_dir + "/details/show-toolbar", state)
|
||||
|
||||
def get_local_sound(self):
|
||||
return self.conf.get_bool(self.conf_dir + "/new-vm/local-sound")
|
||||
|
||||
|
@ -213,6 +213,7 @@ class vmmDetails(gobject.GObject):
|
||||
pass
|
||||
|
||||
self.window.get_widget("console-pages").set_show_tabs(False)
|
||||
self.window.get_widget("details-menu-view-toolbar").set_active(self.config.get_details_show_toolbar())
|
||||
|
||||
self.window.signal_autoconnect({
|
||||
"on_close_details_clicked": self.close,
|
||||
@ -421,7 +422,10 @@ class vmmDetails(gobject.GObject):
|
||||
self.window.get_widget("details-toolbar").show()
|
||||
|
||||
def toggle_toolbar(self, src):
|
||||
if src.get_active() and not self.window.get_widget("details-menu-view-fullscreen").get_active():
|
||||
active = src.get_active()
|
||||
self.config.set_details_show_toolbar(active)
|
||||
if active and not \
|
||||
self.window.get_widget("details-menu-view-fullscreen").get_active():
|
||||
self.window.get_widget("details-toolbar").show()
|
||||
else:
|
||||
self.window.get_widget("details-toolbar").hide()
|
||||
|
Loading…
Reference in New Issue
Block a user