[gnome-boxes] wizard: Remove redundant box around nokvm infobar



commit c39129b22bcf3f4b6c88ebf099f6e9c377831ccc
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Sun Mar 9 16:41:11 2014 +0000

    wizard: Remove redundant box around nokvm infobar
    
    This workaround is no longer needed (as it doesn't seem to work anymore
    due to some regression) as we are not inside any clutter actors. It could
    have been some gtk+ issue instead but whatever it was, is no need for the
    workaround anymore.

 data/ui/wizard.ui |   60 ++++++++++++++++++++--------------------------------
 src/wizard.vala   |    6 ++--
 2 files changed, 26 insertions(+), 40 deletions(-)
---
diff --git a/data/ui/wizard.ui b/data/ui/wizard.ui
index 69b03c3..d7c3db3 100644
--- a/data/ui/wizard.ui
+++ b/data/ui/wizard.ui
@@ -300,51 +300,37 @@ You may connect to an existing machine &lt;b&gt;&lt;i&gt;over the network&lt;/i&
             </style>
 
             <child>
-              <!-- FIXME: We shouldn't need this box but for some weird unknown
-                   reason, toggling the visibility of the infobar itself doesn't
-                   exactly work. The bar remains visible even after setting
-                   visibility to 'false' but its only visible as a line. Likely
-                   some bug in clutter-gtk but I failed to reproduce it outside
-                   Boxes. :( -->
-              <object class="GtkBox" id="nokvm_box">
+              <object class="GtkInfoBar" id="nokvm_infobar">
                 <property name="visible">True</property>
-                <property name="orientation">vertical</property>
+                <property name="halign">fill</property>
                 <property name="spacing">0</property>
+                <property name="message-type">warning</property>
 
-                <child>
-                  <object class="GtkInfoBar" id="nokvm_infobar">
-                    <property name="halign">fill</property>
-                    <property name="spacing">0</property>
-                    <property name="message-type">warning</property>
-
-                    <child internal-child="content_area">
-                      <object class="GtkContainer" id="nokvm_container">
-                        <child>
-                          <object class="GtkImage" id="nokvm_image">
-                            <property name="visible">True</property>
-                            <property name="icon-name">dialog-warning</property>
-                            <property name="icon-size">3</property>
-                          </object>
-                        </child>
-
-                        <child>
-                          <object class="GtkLabel" id="nokvm_label">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Virtualization extensions are 
unavailable on your system. If your system is recent (post 2008), check your BIOS settings to enable 
them.</property>
-                            <property name="wrap">True</property>
-                            <property name="halign">start</property>
-                            <property name="hexpand">True</property>
-                          </object>
-                        </child>
+                <child internal-child="content_area">
+                  <object class="GtkContainer" id="nokvm_container">
+                    <property name="visible">True</property>
+
+                    <child>
+                      <object class="GtkImage" id="nokvm_image">
+                        <property name="visible">True</property>
+                        <property name="icon-name">dialog-warning</property>
+                        <property name="icon-size">3</property>
+                      </object>
+                    </child>
+
+                    <child>
+                      <object class="GtkLabel" id="nokvm_label">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Virtualization extensions are unavailable 
on your system. If your system is recent (post 2008), check your BIOS settings to enable them.</property>
+                        <property name="wrap">True</property>
+                        <property name="halign">start</property>
+                        <property name="hexpand">True</property>
                       </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
               </object>
+
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
diff --git a/src/wizard.vala b/src/wizard.vala
index 48b42de..9339b38 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -39,7 +39,7 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
     [GtkChild]
     private Gtk.Label review_label;
     [GtkChild]
-    private Gtk.Box nokvm_box;
+    private Gtk.InfoBar nokvm_infobar;
     [GtkChild]
     private Gtk.Image installer_image;
 
@@ -380,7 +380,7 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
     private async bool do_review_cancellable () {
         return_if_fail (review_cancellable != null);
 
-        nokvm_box.hide ();
+        nokvm_infobar.hide ();
         summary.clear ();
 
         if (source != null) {
@@ -471,7 +471,7 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
                 }
             }
 
-            nokvm_box.visible = (libvirt_machine.domain_config.get_virt_type () != 
GVirConfig.DomainVirtType.KVM);
+            nokvm_infobar.visible = (libvirt_machine.domain_config.get_virt_type () != 
GVirConfig.DomainVirtType.KVM);
         } else if (this.wizard_source.libvirt_sys_import) {
             review_label.set_text (this.wizard_source.libvirt_sys_importer.wizard_review_label);
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]