[gnome-video-arcade] Fix widget packing in Technical tab of Properties.



commit a6cb0edd820bfbdff77d24123b02c51baaf66c64
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun May 29 23:16:46 2011 -0400

    Fix widget packing in Technical tab of Properties.

 data/gnome-video-arcade.builder                |  313 ++++++++++++------------
 docs/reference/gnome-video-arcade-sections.txt |    1 -
 src/gva-properties.c                           |   22 +-
 src/gva-ui.h                                   |    2 -
 4 files changed, 161 insertions(+), 177 deletions(-)
---
diff --git a/data/gnome-video-arcade.builder b/data/gnome-video-arcade.builder
index e90b84b..b90ee1d 100644
--- a/data/gnome-video-arcade.builder
+++ b/data/gnome-video-arcade.builder
@@ -1422,6 +1422,7 @@ Manufacturer, Year</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="resize_mode">queue</property>
+                    <property name="vscroll_policy">natural</property>
                     <child>
                       <object class="GtkVBox" id="properties-technical-vbox">
                         <property name="visible">True</property>
@@ -1437,26 +1438,56 @@ Manufacturer, Year</property>
                             <property name="label_yalign">0</property>
                             <property name="shadow_type">out</property>
                             <child>
-                              <object class="GtkAlignment" id="properties-status-frame-alignment">
+                              <object class="GtkHBox" id="properties-status-hbox">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
+                                <property name="border_width">6</property>
+                                <property name="spacing">12</property>
                                 <child>
-                                  <object class="GtkEventBox" id="properties-status-event-box">
+                                  <object class="GtkImage" id="properties-status-image">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
+                                    <property name="yalign">0</property>
+                                    <property name="stock">gtk-dialog-warning</property>
+                                    <property name="icon-size">5</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkVBox" id="properties-status-vbox">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="spacing">6</property>
+                                    <child>
+                                      <object class="GtkLabel" id="properties-status-header">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="xalign">0</property>
+                                        <property name="label" translatable="yes">&lt;b&gt;There are known problems with this game:&lt;/b&gt;</property>
+                                        <property name="use_markup">True</property>
+                                        <property name="ellipsize">end</property>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
                                     <child>
-                                      <object class="GtkHBox" id="properties-status-hbox">
+                                      <object class="GtkVBox" id="properties-status-detail-vbox">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
-                                        <property name="border_width">6</property>
-                                        <property name="spacing">12</property>
                                         <child>
-                                          <object class="GtkImage" id="properties-status-image">
+                                          <object class="GtkLabel" id="properties-imperfect-color-label">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
-                                            <property name="yalign">0</property>
-                                            <property name="stock">gtk-dialog-warning</property>
-                                            <property name="icon-size">5</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">â The colors aren't 100% accurate.</property>
+                                            <property name="ellipsize">end</property>
                                           </object>
                                           <packing>
                                             <property name="expand">False</property>
@@ -1465,157 +1496,115 @@ Manufacturer, Year</property>
                                           </packing>
                                         </child>
                                         <child>
-                                          <object class="GtkVBox" id="properties-status-vbox">
+                                          <object class="GtkLabel" id="properties-preliminary-color-label">
                                             <property name="visible">True</property>
                                             <property name="can_focus">False</property>
-                                            <property name="spacing">6</property>
-                                            <child>
-                                              <object class="GtkLabel" id="properties-status-header">
-                                                <property name="visible">True</property>
-                                                <property name="can_focus">False</property>
-                                                <property name="xalign">0</property>
-                                                <property name="label" translatable="yes">&lt;b&gt;There are known problems with this game:&lt;/b&gt;</property>
-                                                <property name="use_markup">True</property>
-                                                <property name="ellipsize">end</property>
-                                              </object>
-                                              <packing>
-                                                <property name="expand">False</property>
-                                                <property name="fill">False</property>
-                                                <property name="position">0</property>
-                                              </packing>
-                                            </child>
-                                            <child>
-                                              <object class="GtkVBox" id="properties-status-detail-vbox">
-                                                <property name="visible">True</property>
-                                                <property name="can_focus">False</property>
-                                                <child>
-                                                  <object class="GtkLabel" id="properties-imperfect-color-label">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">â The colors aren't 100% accurate.</property>
-                                                    <property name="ellipsize">end</property>
-                                                  </object>
-                                                  <packing>
-                                                    <property name="expand">True</property>
-                                                    <property name="fill">True</property>
-                                                    <property name="position">0</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <object class="GtkLabel" id="properties-preliminary-color-label">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">â The colors are completely wrong.</property>
-                                                    <property name="ellipsize">end</property>
-                                                  </object>
-                                                  <packing>
-                                                    <property name="expand">True</property>
-                                                    <property name="fill">True</property>
-                                                    <property name="position">1</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <object class="GtkLabel" id="properties-imperfect-graphic-label">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">â The video emulation isn't 100% accurate.</property>
-                                                    <property name="ellipsize">end</property>
-                                                  </object>
-                                                  <packing>
-                                                    <property name="expand">True</property>
-                                                    <property name="fill">True</property>
-                                                    <property name="position">2</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <object class="GtkLabel" id="properties-imperfect-sound-label">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">â The sound emulation isn't 100% accurate.</property>
-                                                    <property name="ellipsize">end</property>
-                                                  </object>
-                                                  <packing>
-                                                    <property name="expand">True</property>
-                                                    <property name="fill">True</property>
-                                                    <property name="position">3</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <object class="GtkLabel" id="properties-preliminary-sound-label">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">â The game lacks sound.</property>
-                                                    <property name="ellipsize">end</property>
-                                                  </object>
-                                                  <packing>
-                                                    <property name="expand">True</property>
-                                                    <property name="fill">True</property>
-                                                    <property name="position">4</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <object class="GtkLabel" id="properties-preliminary-cocktail-label">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">â Screen flipping in cocktail mode is not supported.</property>
-                                                    <property name="ellipsize">end</property>
-                                                  </object>
-                                                  <packing>
-                                                    <property name="expand">True</property>
-                                                    <property name="fill">True</property>
-                                                    <property name="position">5</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <object class="GtkLabel" id="properties-preliminary-emulation-label">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">â &lt;b&gt;THIS GAME DOESN'T WORK.&lt;/b&gt;</property>
-                                                    <property name="use_markup">True</property>
-                                                  </object>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">6</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <object class="GtkLabel" id="properties-preliminary-protection-label">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">False</property>
-                                                    <property name="xalign">0</property>
-                                                    <property name="label" translatable="yes">â The game has protection which isn't fully emulated.</property>
-                                                  </object>
-                                                  <packing>
-                                                    <property name="expand">False</property>
-                                                    <property name="fill">False</property>
-                                                    <property name="position">7</property>
-                                                  </packing>
-                                                </child>
-                                              </object>
-                                              <packing>
-                                                <property name="expand">False</property>
-                                                <property name="fill">False</property>
-                                                <property name="position">1</property>
-                                              </packing>
-                                            </child>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">â The colors are completely wrong.</property>
+                                            <property name="ellipsize">end</property>
                                           </object>
                                           <packing>
-                                            <property name="expand">True</property>
-                                            <property name="fill">True</property>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
                                             <property name="position">1</property>
                                           </packing>
                                         </child>
+                                        <child>
+                                          <object class="GtkLabel" id="properties-imperfect-graphic-label">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">â The video emulation isn't 100% accurate.</property>
+                                            <property name="ellipsize">end</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">2</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="properties-imperfect-sound-label">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">â The sound emulation isn't 100% accurate.</property>
+                                            <property name="ellipsize">end</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">3</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="properties-preliminary-sound-label">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">â The game lacks sound.</property>
+                                            <property name="ellipsize">end</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">4</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="properties-preliminary-cocktail-label">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">â Screen flipping in cocktail mode is not supported.</property>
+                                            <property name="ellipsize">end</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">5</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="properties-preliminary-emulation-label">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">â &lt;b&gt;THIS GAME DOESN'T WORK.&lt;/b&gt;</property>
+                                            <property name="use_markup">True</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">6</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="properties-preliminary-protection-label">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label" translatable="yes">â The game has protection which isn't fully emulated.</property>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">7</property>
+                                          </packing>
+                                        </child>
                                       </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
                                     </child>
                                   </object>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
                                 </child>
                               </object>
                             </child>
@@ -1665,8 +1654,8 @@ Manufacturer, Year</property>
                                 </child>
                               </object>
                               <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
@@ -1788,8 +1777,8 @@ Manufacturer, Year</property>
                                 <property name="use_markup">True</property>
                               </object>
                               <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
@@ -1982,8 +1971,8 @@ Manufacturer, Year</property>
                                 <property name="use_markup">True</property>
                               </object>
                               <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
@@ -2004,8 +1993,8 @@ Manufacturer, Year</property>
                                 </child>
                               </object>
                               <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
@@ -2030,8 +2019,8 @@ Manufacturer, Year</property>
                                 <property name="use_markup">True</property>
                               </object>
                               <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
@@ -2052,8 +2041,8 @@ Manufacturer, Year</property>
                                 </child>
                               </object>
                               <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
diff --git a/docs/reference/gnome-video-arcade-sections.txt b/docs/reference/gnome-video-arcade-sections.txt
index dcfacf8..f39d7fa 100644
--- a/docs/reference/gnome-video-arcade-sections.txt
+++ b/docs/reference/gnome-video-arcade-sections.txt
@@ -504,7 +504,6 @@ GVA_WIDGET_PROPERTIES_PRELIMINARY_EMULATION_LABEL
 GVA_WIDGET_PROPERTIES_PRELIMINARY_PROTECTION_LABEL
 GVA_WIDGET_PROPERTIES_PRELIMINARY_SOUND_LABEL
 GVA_WIDGET_PROPERTIES_SOUND_VBOX
-GVA_WIDGET_PROPERTIES_STATUS_EVENT_BOX
 GVA_WIDGET_PROPERTIES_STATUS_FRAME
 GVA_WIDGET_PROPERTIES_STATUS_IMAGE
 GVA_WIDGET_PROPERTIES_TECHNICAL_SCROLLED_WINDOW
diff --git a/src/gva-properties.c b/src/gva-properties.c
index dd5a895..832b2ee 100644
--- a/src/gva-properties.c
+++ b/src/gva-properties.c
@@ -577,44 +577,44 @@ properties_update_status (GtkTreeModel *model,
         widget = GVA_WIDGET_PROPERTIES_STATUS_FRAME;
         visible = (strcmp (driver_status, "imperfect") == 0) ||
                 (strcmp (driver_status, "preliminary") == 0);
-        g_object_set (widget, "visible", visible, NULL);
+        gtk_widget_set_visible (widget, visible);
 
         gtk_image_set_from_stock (
                 GTK_IMAGE (GVA_WIDGET_PROPERTIES_STATUS_IMAGE),
                 stock_id, GTK_ICON_SIZE_DND);
-        g_object_set (widget, "visible", visible, NULL);
+        gtk_widget_set_visible (widget, visible);
 
         widget = GVA_WIDGET_PROPERTIES_IMPERFECT_COLOR_LABEL;
         visible = (strcmp (driver_color, "imperfect") == 0);
-        g_object_set (widget, "visible", visible, NULL);
+        gtk_widget_set_visible (widget, visible);
 
         widget = GVA_WIDGET_PROPERTIES_IMPERFECT_GRAPHIC_LABEL;
         visible = (strcmp (driver_graphic, "imperfect") == 0);
-        g_object_set (widget, "visible", visible, NULL);
+        gtk_widget_set_visible (widget, visible);
 
         widget = GVA_WIDGET_PROPERTIES_IMPERFECT_SOUND_LABEL;
         visible = (strcmp (driver_sound, "imperfect") == 0);
-        g_object_set (widget, "visible", visible, NULL);
+        gtk_widget_set_visible (widget, visible);
 
         widget = GVA_WIDGET_PROPERTIES_PRELIMINARY_COCKTAIL_LABEL;
         visible = (strcmp (driver_cocktail, "preliminary") == 0);
-        g_object_set (widget, "visible", visible, NULL);
+        gtk_widget_set_visible (widget, visible);
 
         widget = GVA_WIDGET_PROPERTIES_PRELIMINARY_COLOR_LABEL;
         visible = (strcmp (driver_color, "preliminary") == 0);
-        g_object_set (widget, "visible", visible, NULL);
+        gtk_widget_set_visible (widget, visible);
 
         widget = GVA_WIDGET_PROPERTIES_PRELIMINARY_EMULATION_LABEL;
         visible = (strcmp (driver_emulation, "preliminary") == 0);
-        g_object_set (widget, "visible", visible, NULL);
+        gtk_widget_set_visible (widget, visible);
 
         widget = GVA_WIDGET_PROPERTIES_PRELIMINARY_PROTECTION_LABEL;
         visible = (strcmp (driver_protection, "preliminary") == 0);
-        g_object_set (widget, "visible", visible, NULL);
+        gtk_widget_set_visible (widget, visible);
 
         widget = GVA_WIDGET_PROPERTIES_PRELIMINARY_SOUND_LABEL;
         visible = (strcmp (driver_sound, "preliminary") == 0);
-        g_object_set (widget, "visible", visible, NULL);
+        gtk_widget_set_visible (widget, visible);
 
         g_free (driver_status);
         g_free (driver_emulation);
@@ -813,8 +813,6 @@ gva_properties_init (void)
         gtk_settings = gtk_settings_get_default ();
         g_object_get (gtk_settings, "color-hash", &color_hash, NULL);
         color = g_hash_table_lookup (color_hash, "tooltip_bg_color");
-        widget = GVA_WIDGET_PROPERTIES_STATUS_EVENT_BOX;
-        gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, color);
         widget = GVA_WIDGET_PROPERTIES_STATUS_FRAME;
         gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, color);
 
diff --git a/src/gva-ui.h b/src/gva-ui.h
index d7117ad..5189c2c 100644
--- a/src/gva-ui.h
+++ b/src/gva-ui.h
@@ -169,8 +169,6 @@
         (gva_ui_get_widget ("properties-preliminary-sound-label"))
 #define GVA_WIDGET_PROPERTIES_SOUND_VBOX \
         (gva_ui_get_widget ("properties-sound-vbox"))
-#define GVA_WIDGET_PROPERTIES_STATUS_EVENT_BOX \
-        (gva_ui_get_widget ("properties-status-event-box"))
 #define GVA_WIDGET_PROPERTIES_STATUS_FRAME \
         (gva_ui_get_widget ("properties-status-frame"))
 #define GVA_WIDGET_PROPERTIES_STATUS_IMAGE \



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