[gnome-packagekit] Hide the details expander by default in the updates viewer to match the mockup



commit f456c59bc4cf923f4436df3814ecc5de779474d4
Author: Richard Hughes <richard hughsie com>
Date:   Thu Aug 18 12:16:01 2011 +0100

    Hide the details expander by default in the updates viewer to match the mockup

 data/gpk-update-viewer.ui |   57 ++++++++++++++++++++++++--------------------
 src/gpk-update-viewer.c   |   19 ---------------
 2 files changed, 31 insertions(+), 45 deletions(-)
---
diff --git a/data/gpk-update-viewer.ui b/data/gpk-update-viewer.ui
index be91d6d..f89798d 100644
--- a/data/gpk-update-viewer.ui
+++ b/data/gpk-update-viewer.ui
@@ -208,31 +208,30 @@
               </packing>
             </child>
             <child>
-              <object class="GtkVPaned" id="vpaned_updates">
+              <object class="GtkScrolledWindow" id="scrolledwindow_updates">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="position">800</property>
-                <property name="position_set">True</property>
+                <property name="shadow_type">in</property>
                 <child>
-                  <object class="GtkScrolledWindow" id="scrolledwindow_updates">
+                  <object class="GtkTreeView" id="treeview_updates">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="shadow_type">in</property>
-                    <child>
-                      <object class="GtkTreeView" id="treeview_updates">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <child internal-child="selection">
-                          <object class="GtkTreeSelection" id="treeview-selection1"/>
-                        </child>
-                      </object>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection" id="treeview-selection"/>
                     </child>
                   </object>
-                  <packing>
-                    <property name="resize">True</property>
-                    <property name="shrink">True</property>
-                  </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkExpander" id="expander1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
                 <child>
                   <object class="GtkScrolledWindow" id="scrolledwindow_details">
                     <property name="visible">True</property>
@@ -245,16 +244,22 @@
                       </object>
                     </child>
                   </object>
-                  <packing>
-                    <property name="resize">True</property>
-                    <property name="shrink">True</property>
-                  </packing>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Details</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
                 </child>
               </object>
               <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">3</property>
               </packing>
             </child>
             <child>
@@ -347,12 +352,12 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
-                <property name="position">3</property>
+                <property name="position">4</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="expand">False</property>
+            <property name="expand">True</property>
             <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index f7f69e5..b317a0e 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -2912,20 +2912,6 @@ gpk_update_viewer_updates_changed_cb (PkControl *_control, gpointer user_data)
 }
 
 /**
- * gpk_update_viewer_vpaned_realized_cb:
- **/
-static void
-gpk_update_viewer_vpaned_realized_cb (GtkWidget *widget, gpointer user_data)
-{
-	GtkRequisition req;
-	gtk_widget_get_preferred_size (widget, &req, NULL);
-	g_debug ("req.height=%i", req.height);
-	// FIXME: this is never executed, it falls back on values from the .ui file
-	if (req.height != 0)
-		gtk_paned_set_position (GTK_PANED (widget), 166);
-}
-
-/**
  * gpk_update_viewer_search_equal_func:
  **/
 static gboolean
@@ -3287,11 +3273,6 @@ gpk_update_viewer_application_startup_cb (GtkApplication *_application, gpointer
 
 	/* show window */
 	gtk_widget_show (main_window);
-
-	/* set the paned to be in the middle */
-	widget = GTK_WIDGET(gtk_builder_get_object (builder, "vpaned_updates"));
-	g_signal_connect (widget, "realize",
-			  G_CALLBACK (gpk_update_viewer_vpaned_realized_cb), NULL);
 out:
 	return;
 }



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