[virt-tools-list] [virt-manager 1/2] ui: add a warning message for hyper-threading support

Wei Huang wei at redhat.com
Mon Oct 27 16:04:56 UTC 2014


Not all CPUs support Hyper-Threading. This patch adds a warning
message next to the threads selection field of processor topology
box. It warns that "Selected CPU model does not support
Hyper-Threading" when # of Threads > 1 and the selected CPU model
does not support Hyper-Threading.

This UI modification was added using glade 3.18.3.

Signed-off-by: Wei Huang <wei at redhat.com>
---
 ui/details.ui | 223 ++++++++++++++++++++++++++++++++++++----------------------
 1 file changed, 138 insertions(+), 85 deletions(-)

diff --git a/ui/details.ui b/ui/details.ui
index ff4b388..a841b9c 100644
--- a/ui/details.ui
+++ b/ui/details.ui
@@ -2226,111 +2226,164 @@ if you know what you are doing.</small></property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <object class="GtkHBox" id="hbox26">
+                                          <object class="GtkAlignment" id="alignment3">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="xscale">0</property>
                                             <child>
-                                              <object class="GtkTable" id="cpu-topology-table">
+                                              <object class="GtkHBox" id="hbox26">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
-                                                <property name="n_rows">3</property>
-                                                <property name="n_columns">2</property>
-                                                <property name="column_spacing">12</property>
-                                                <property name="row_spacing">4</property>
-                                                <child>
-                                                  <object class="GtkLabel" id="label59">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">Threads:</property>
-                                                  </object>
-                                                  <packing>
-                                                    <property name="top_attach">2</property>
-                                                    <property name="bottom_attach">3</property>
-                                                    <property name="x_options">GTK_FILL</property>
-                                                    <property name="y_options">GTK_FILL</property>
-                                                  </packing>
-                                                </child>
+                                                <property name="spacing">6</property>
                                                 <child>
-                                                  <object class="GtkLabel" id="label58">
+                                                  <object class="GtkTable" id="cpu-topology-table">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">Cores:</property>
+                                                    <property name="n_rows">3</property>
+                                                    <property name="n_columns">2</property>
+                                                    <property name="column_spacing">12</property>
+                                                    <property name="row_spacing">4</property>
+                                                    <child>
+                                                      <object class="GtkLabel" id="label59">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <property name="xalign">0</property>
+                                                        <property name="label" translatable="yes">Threads:</property>
+                                                      </object>
+                                                      <packing>
+                                                        <property name="top_attach">2</property>
+                                                        <property name="bottom_attach">3</property>
+                                                        <property name="x_options">GTK_FILL</property>
+                                                        <property name="y_options">GTK_FILL</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <object class="GtkLabel" id="label58">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <property name="xalign">0</property>
+                                                        <property name="label" translatable="yes">Cores:</property>
+                                                      </object>
+                                                      <packing>
+                                                        <property name="top_attach">1</property>
+                                                        <property name="bottom_attach">2</property>
+                                                        <property name="x_options">GTK_FILL</property>
+                                                        <property name="y_options">GTK_FILL</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <object class="GtkLabel" id="label57">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <property name="xalign">0</property>
+                                                        <property name="label" translatable="yes">Sockets:</property>
+                                                      </object>
+                                                      <packing>
+                                                        <property name="x_options">GTK_FILL</property>
+                                                        <property name="y_options">GTK_FILL</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <object class="GtkSpinButton" id="cpu-sockets">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">True</property>
+                                                        <property name="halign">start</property>
+                                                        <property name="hexpand">False</property>
+                                                        <property name="invisible_char">●</property>
+                                                        <property name="adjustment">adjustment3</property>
+                                                        <signal name="changed" handler="on_cpu_sockets_changed" swapped="no"/>
+                                                      </object>
+                                                      <packing>
+                                                        <property name="left_attach">1</property>
+                                                        <property name="right_attach">2</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <object class="GtkSpinButton" id="cpu-cores">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">True</property>
+                                                        <property name="halign">start</property>
+                                                        <property name="hexpand">False</property>
+                                                        <property name="invisible_char">●</property>
+                                                        <property name="adjustment">adjustment4</property>
+                                                        <signal name="changed" handler="on_cpu_cores_changed" swapped="no"/>
+                                                      </object>
+                                                      <packing>
+                                                        <property name="left_attach">1</property>
+                                                        <property name="right_attach">2</property>
+                                                        <property name="top_attach">1</property>
+                                                        <property name="bottom_attach">2</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <object class="GtkSpinButton" id="cpu-threads">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">True</property>
+                                                        <property name="halign">start</property>
+                                                        <property name="invisible_char">●</property>
+                                                        <property name="adjustment">adjustment5</property>
+                                                        <signal name="changed" handler="on_cpu_threads_changed" swapped="no"/>
+                                                      </object>
+                                                      <packing>
+                                                        <property name="left_attach">1</property>
+                                                        <property name="right_attach">2</property>
+                                                        <property name="top_attach">2</property>
+                                                        <property name="bottom_attach">3</property>
+                                                      </packing>
+                                                    </child>
                                                   </object>
                                                   <packing>
-                                                    <property name="top_attach">1</property>
-                                                    <property name="bottom_attach">2</property>
-                                                    <property name="x_options">GTK_FILL</property>
-                                                    <property name="y_options">GTK_FILL</property>
+                                                    <property name="expand">False</property>
+                                                    <property name="fill">True</property>
+                                                    <property name="position">0</property>
                                                   </packing>
                                                 </child>
                                                 <child>
-                                                  <object class="GtkLabel" id="label57">
+                                                  <object class="GtkHBox" id="config-topology-warn-box">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">Sockets:</property>
-                                                  </object>
-                                                  <packing>
-                                                    <property name="x_options">GTK_FILL</property>
-                                                    <property name="y_options">GTK_FILL</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <object class="GtkSpinButton" id="cpu-sockets">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="halign">start</property>
-                                                    <property name="hexpand">False</property>
-                                                    <property name="invisible_char">●</property>
-                                                    <property name="adjustment">adjustment3</property>
-                                                    <signal name="changed" handler="on_cpu_sockets_changed" swapped="no"/>
-                                                  </object>
-                                                  <packing>
-                                                    <property name="left_attach">1</property>
-                                                    <property name="right_attach">2</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <object class="GtkSpinButton" id="cpu-cores">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="halign">start</property>
-                                                    <property name="hexpand">False</property>
-                                                    <property name="invisible_char">●</property>
-                                                    <property name="adjustment">adjustment4</property>
-                                                    <signal name="changed" handler="on_cpu_cores_changed" swapped="no"/>
-                                                  </object>
-                                                  <packing>
-                                                    <property name="left_attach">1</property>
-                                                    <property name="right_attach">2</property>
-                                                    <property name="top_attach">1</property>
-                                                    <property name="bottom_attach">2</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <object class="GtkSpinButton" id="cpu-threads">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="halign">start</property>
-                                                    <property name="invisible_char">●</property>
-                                                    <property name="adjustment">adjustment5</property>
-                                                    <signal name="changed" handler="on_cpu_threads_changed" swapped="no"/>
+                                                    <property name="spacing">6</property>
+                                                    <child>
+                                                      <object class="GtkImage" id="image4">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <property name="xalign">0</property>
+                                                        <property name="yalign">1</property>
+                                                        <property name="stock">gtk-dialog-warning</property>
+                                                      </object>
+                                                      <packing>
+                                                        <property name="expand">False</property>
+                                                        <property name="fill">False</property>
+                                                        <property name="position">0</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <object class="GtkLabel" id="label65">
+                                                        <property name="width_request">300</property>
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <property name="xalign">0</property>
+                                                        <property name="yalign">1</property>
+                                                        <property name="label" translatable="yes"><small>Selected CPU model does not support Hyper-Threading</small></property>
+                                                        <property name="use_markup">True</property>
+                                                        <property name="single_line_mode">True</property>
+                                                        <property name="max_width_chars">32</property>
+                                                      </object>
+                                                      <packing>
+                                                        <property name="expand">True</property>
+                                                        <property name="fill">True</property>
+                                                        <property name="position">1</property>
+                                                      </packing>
+                                                    </child>
                                                   </object>
                                                   <packing>
-                                                    <property name="left_attach">1</property>
-                                                    <property name="right_attach">2</property>
-                                                    <property name="top_attach">2</property>
-                                                    <property name="bottom_attach">3</property>
+                                                    <property name="expand">True</property>
+                                                    <property name="fill">True</property>
+                                                    <property name="position">1</property>
                                                   </packing>
                                                 </child>
                                               </object>
-                                              <packing>
-                                                <property name="expand">True</property>
-                                                <property name="fill">True</property>
-                                                <property name="position">0</property>
-                                              </packing>
                                             </child>
                                           </object>
                                           <packing>
-- 
1.8.3.1




More information about the virt-tools-list mailing list