[gnome-software] Show a static 'tick' widget if there are no updates



commit 87d168457afef324e7b0aae73dde17198f691a88
Author: Richard Hughes <richard hughsie com>
Date:   Tue Aug 13 11:35:21 2013 +0100

    Show a static 'tick' widget if there are no updates

 src/gnome-software.ui |   83 +++++++++++++++++++++++++++++++++++++++---------
 src/gs-main.c         |    6 +++
 2 files changed, 73 insertions(+), 16 deletions(-)
---
diff --git a/src/gnome-software.ui b/src/gnome-software.ui
index ae4ed50..4ac49bd 100644
--- a/src/gnome-software.ui
+++ b/src/gnome-software.ui
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires gtk+ 3.10 -->
   <object class="GtkListStore" id="liststore_popular">
     <columns>
       <!-- column-name app -->
@@ -280,7 +280,6 @@
             <property name="invisible_char">●</property>
             <property name="activates_default">True</property>
             <property name="shadow_type">none</property>
-            <property name="invisible_char_set">True</property>
             <property name="caps_lock_warning">False</property>
             <property name="progress_pulse_step">0.070000000298023224</property>
             <property name="primary_icon_activatable">False</property>
@@ -428,6 +427,7 @@
                           <object class="GtkIconView" id="iconview_popular">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
+                            <property name="margin">0</property>
                             <property name="hscroll_policy">natural</property>
                             <property name="vscroll_policy">natural</property>
                             <property name="model">liststore_popular</property>
@@ -518,16 +518,67 @@
               </packing>
             </child>
             <child>
-              <object class="GtkScrolledWindow" id="scrolledwindow_updates">
+              <object class="GtkBox" id="box6">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hscrollbar_policy">never</property>
-                <property name="shadow_type">in</property>
-                <style>
-                  <class name="main-scrolled-software"/>
-                </style>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
                 <child>
-                  <placeholder/>
+                  <object class="GtkScrolledWindow" id="scrolledwindow_updates">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">never</property>
+                    <property name="shadow_type">in</property>
+                    <style>
+                      <class name="main-scrolled-software"/>
+                    </style>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkBox" id="box_updates_up_to_date">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkImage" id="image_updates">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="opacity">0.34000000357627869</property>
+                        <property name="yalign">1</property>
+                        <property name="pixel_size">128</property>
+                        <property name="icon_name">object-select-symbolic</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label10">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Software is up to date</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
                 </child>
               </object>
               <packing>
@@ -595,10 +646,10 @@
               </packing>
             </child>
             <child type="tab">
-              <object class="GtkLabel" id="label8">
+              <object class="GtkLabel" id="label9">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label">Waiting</property>
+                <property name="label">Detail Overview</property>
               </object>
               <packing>
                 <property name="position">2</property>
@@ -633,7 +684,7 @@
                             <property name="xalign">0</property>
                             <property name="yalign">0</property>
                             <property name="stock">gtk-justify-center</property>
-                            <property name="icon-size">6</property>
+                            <property name="icon_size">6</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -653,7 +704,7 @@
                             <property name="xalign">0</property>
                             <property name="yalign">0.50999999046325684</property>
                             <property name="stock">gtk-justify-center</property>
-                            <property name="icon-size">6</property>
+                            <property name="icon_size">6</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -761,10 +812,10 @@
               </packing>
             </child>
             <child type="tab">
-              <object class="GtkLabel" id="label9">
+              <object class="GtkLabel" id="label8">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label">Detail Overview</property>
+                <property name="label">Waiting</property>
               </object>
               <packing>
                 <property name="position">2</property>
diff --git a/src/gs-main.c b/src/gs-main.c
index db86155..1a82118 100644
--- a/src/gs-main.c
+++ b/src/gs-main.c
@@ -504,6 +504,12 @@ gs_main_get_updates_cb (GsPluginLoader *plugin_loader,
 
        /* get the results */
        list = gs_plugin_loader_get_updates_finish (plugin_loader, res, &error);
+       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "box_updates_up_to_date"));
+       gtk_widget_set_visible (widget, list == NULL);
+       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "scrolledwindow_updates"));
+       gtk_widget_set_visible (widget, list != NULL);
+       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_update_all"));
+       gtk_widget_set_visible (widget, list != NULL);
        if (list == NULL) {
                g_warning ("failed to get updates: %s", error->message);
                g_error_free (error);


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