[virt-tools-list] [virt-manager PATCH 1/2] config: add "Click Open to show Details" checkbox

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Tue Jun 24 05:56:17 UTC 2014


Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 data/org.virt-manager.virt-manager.gschema.xml |  5 +++++
 ui/preferences.ui                              | 18 ++++++++++++++++++
 virtManager/preferences.py                     |  7 +++++++
 3 files changed, 30 insertions(+)

diff --git a/data/org.virt-manager.virt-manager.gschema.xml b/data/org.virt-manager.virt-manager.gschema.xml
index 2fede6c..42cff96 100644
--- a/data/org.virt-manager.virt-manager.gschema.xml
+++ b/data/org.virt-manager.virt-manager.gschema.xml
@@ -316,6 +316,11 @@
       <summary>Confirm deleting storage</summary>
       <description>Whether we require a confirmation on deleting storage</description>
     </key>
+    <key name="open-details" type="b">
+      <default>false</default>
+      <summary>Confirm open details window</summary>
+      <description>Whether we click 'Open' to see details window</description>
+    </key>
 
   </schema>
 
diff --git a/ui/preferences.ui b/ui/preferences.ui
index e29304b..3928c4a 100644
--- a/ui/preferences.ui
+++ b/ui/preferences.ui
@@ -60,6 +60,24 @@
                             <property name="height">1</property>
                           </packing>
                         </child>
+                        <child>
+                          <object class="GtkCheckButton" id="prefs-system-open-details">
+                            <property name="label" translatable="yes">Click _Open to show Details</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
+                            <property name="draw_indicator">True</property>
+                            <signal name="toggled" handler="on_prefs_system_open_details_toggled" swapped="no"/>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">1</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
                       </object>
                     </child>
                   </object>
diff --git a/virtManager/preferences.py b/virtManager/preferences.py
index eccb699..c22a49a 100644
--- a/virtManager/preferences.py
+++ b/virtManager/preferences.py
@@ -55,6 +55,7 @@ class vmmPreferences(vmmGObjectUI):
         self.refresh_confirm_interface()
         self.refresh_confirm_unapplied()
         self.refresh_confirm_delstorage()
+        self.refresh_confirm_opendetails()
 
         self.builder.connect_signals({
             "on_vmm_preferences_delete_event": self.close,
@@ -81,6 +82,7 @@ class vmmPreferences(vmmGObjectUI):
             "on_prefs_confirm_interface_toggled": self.change_confirm_interface,
             "on_prefs_confirm_unapplied_toggled": self.change_confirm_unapplied,
             "on_prefs_confirm_delstorage_toggled": self.change_confirm_delstorage,
+            "on_prefs_system_open_details_toggled": self.change_confirm_opendetails,
             "on_prefs_btn_keys_define_clicked": self.change_grab_keys,
         })
 
@@ -271,6 +273,9 @@ class vmmPreferences(vmmGObjectUI):
     def refresh_confirm_delstorage(self):
         self.widget("prefs-confirm-delstorage").set_active(
                                 self.config.get_confirm_delstorage())
+    def refresh_confirm_opendetails(self):
+        self.widget("prefs-system-open-details").set_active(
+                                self.config.get_confirm_opendetails())
 
     def grabkeys_get_string(self, events):
         keystr = ""
@@ -381,3 +386,5 @@ class vmmPreferences(vmmGObjectUI):
         self.config.set_confirm_unapplied(src.get_active())
     def change_confirm_delstorage(self, src):
         self.config.set_confirm_delstorage(src.get_active())
+    def change_confirm_opendetails(self, src):
+        self.config.set_confirm_opendetails(src.get_active())
-- 
1.9.0




More information about the virt-tools-list mailing list