[gnome-software] trivial: Update to the latest versions of the sources mockups



commit 2842d1186f5a791eb5848ecfc983317fcceb7cfe
Author: Richard Hughes <richard hughsie com>
Date:   Mon Feb 17 20:49:26 2014 +0000

    trivial: Update to the latest versions of the sources mockups

 src/app-menu.ui       |   10 +++--
 src/gnome-software.ui |  110 ++++++++++++++++++++++++++++++++++++++++--------
 src/gs-shell.c        |   28 +++++++++---
 3 files changed, 118 insertions(+), 30 deletions(-)
---
diff --git a/src/app-menu.ui b/src/app-menu.ui
index b8955f8..4c829f0 100644
--- a/src/app-menu.ui
+++ b/src/app-menu.ui
@@ -4,13 +4,15 @@
   <menu id="appmenu">
     <section>
       <item>
-        <attribute name="label" translatable="yes">_About</attribute>
-        <attribute name="action">app.about</attribute>
-      </item>
-      <item>
         <attribute name="label" translatable="yes">_Software Sources</attribute>
         <attribute name="action">app.sources</attribute>
       </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_About</attribute>
+        <attribute name="action">app.about</attribute>
+      </item>
       <item>
         <attribute name="label" translatable="yes">_Quit</attribute>
         <attribute name="action">app.quit</attribute>
diff --git a/src/gnome-software.ui b/src/gnome-software.ui
index d0487a0..250a65c 100644
--- a/src/gnome-software.ui
+++ b/src/gnome-software.ui
@@ -2361,8 +2361,8 @@
     <property name="type_hint">dialog</property>
     <property name="skip_taskbar_hint">True</property>
     <property name="transient_for">window_software</property>
-    <property name="default-width">600</property>
-    <property name="default-height">400</property>
+    <property name="default-width">460</property>
+    <property name="default-height">500</property>
     <property name="title" translatable="yes">Software Sources</property>
     <child>
       <object class="GtkBox" id="box_sources_main">
@@ -2467,13 +2467,13 @@
                 <property name="margin_top">16</property>
                 <property name="margin_bottom">32</property>
                 <property name="orientation">vertical</property>
-                <property name="spacing">16</property>
+                <property name="spacing">4</property>
                 <child>
                   <object class="GtkLabel" id="label_sources1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Software sources give you access to additional 
software. Removing a source will also remove any software you have installed from it.</property>
+                    <property name="label" translatable="yes">Software sources give you access to additional 
software.</property>
                     <property name="wrap">True</property>
                     <property name="max_width_chars">30</property>
                     <style>
@@ -2487,24 +2487,51 @@
                   </packing>
                 </child>
                 <child>
+                  <object class="GtkLabel" id="label_sources3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Removing a source will also remove any 
software you have installed from it.</property>
+                    <property name="wrap">True</property>
+                    <property name="max_width_chars">30</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
                   <object class="GtkScrolledWindow" id="scrolledwindow_sources">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="hscrollbar_policy">never</property>
                     <property name="vscrollbar_policy">automatic</property>
                     <property name="shadow_type">none</property>
+                    <property name="margin_top">9</property>
                     <child>
-                      <object class="GtkListBox" id="listbox_sources">
+                      <object class="GtkFrame" id="frame_sources">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="selection_mode">none</property>
+                        <property name="shadow_type">in</property>
+                        <property name="halign">fill</property>
+                        <property name="valign">start</property>
+                        <child>
+                          <object class="GtkListBox" id="listbox_sources">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="selection_mode">none</property>
+                          </object>
+                        </child>
                       </object>
                     </child>
                   </object>
                   <packing>
                     <property name="expand">True</property>
                     <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="position">2</property>
                   </packing>
                 </child>
               </object>
@@ -2521,15 +2548,51 @@
                 <property name="margin_top">16</property>
                 <property name="margin_bottom">16</property>
                 <property name="orientation">vertical</property>
-                <property name="spacing">16</property>
+                <property name="spacing">4</property>
                 <child>
-                  <object class="GtkLabel" id="label_sources_none">
+                  <object class="GtkGrid" id="grid_sources_noresults">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">No applications or addons have been installed 
from this source.</property>
-                    <property name="wrap">True</property>
-                    <property name="max_width_chars">30</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="halign">center</property>
+                    <property name="valign">center</property>
+                    <property name="row-spacing">12</property>
+                    <property name="column-spacing">12</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
+                    <child>
+                      <object class="GtkImage" id="image_sources_noresults">
+                        <property name="visible">True</property>
+                        <property name="icon_name">gnome-software-symbolic</property>
+                        <property name="pixel-size">64</property>
+                        <style>
+                          <class name="dim-label"/>
+                        </style>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label_sources_noresults">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">No software installed from this 
source</property>
+                        <property name="halign">center</property>
+                        <property name="valign">center</property>
+                        <property name="justify">center</property>
+                        <property name="wrap">True</property>
+                        <property name="max_width_chars">25</property>
+                        <attributes>
+                          <attribute name="scale" value="1.2"/>
+                        </attributes>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">1</property>
+                      </packing>
+                    </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -2541,7 +2604,7 @@
                   <object class="GtkLabel" id="label_sources2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
+                    <property name="xalign">0.5</property>
                     <property name="label" translatable="yes">Installed from this Source</property>
                     <property name="wrap">True</property>
                     <property name="max_width_chars">30</property>
@@ -2563,10 +2626,18 @@
                     <property name="vscrollbar_policy">automatic</property>
                     <property name="shadow_type">none</property>
                     <child>
-                      <object class="GtkListBox" id="listbox_sources_apps">
+                      <object class="GtkFrame" id="frame_sources_apps">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="selection_mode">none</property>
+                        <property name="shadow_type">in</property>
+                        <property name="halign">fill</property>
+                        <property name="valign">start</property>
+                        <child>
+                          <object class="GtkListBox" id="listbox_sources_apps">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="selection_mode">none</property>
+                          </object>
+                        </child>
                       </object>
                     </child>
                   </object>
@@ -2738,6 +2809,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="margin_top">12</property>
                     <style>
                       <class name="destructive-action"/>
                     </style>
diff --git a/src/gs-shell.c b/src/gs-shell.c
index f5852c9..b8e7ca8 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -551,7 +551,7 @@ gs_shell_sources_list_row_activated_cb (GtkListBox *list_box,
        gtk_widget_set_visible (widget, cnt_apps != 0);
        widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "label_sources2"));
        gtk_widget_set_visible (widget, cnt_apps != 0);
-       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "label_sources_none"));
+       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "grid_sources_noresults"));
        gtk_widget_set_visible (widget, cnt_apps == 0);
 }
 
@@ -597,6 +597,13 @@ gs_shell_sources_app_removed_cb (GObject *source,
        /* enable button */
        widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_sources_remove"));
        gtk_widget_set_sensitive (widget, TRUE);
+       gtk_button_set_label (GTK_BUTTON (widget), _("Remove Source"));
+
+       /* allow going back */
+       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_sources_back"));
+       gtk_widget_set_sensitive (widget, TRUE);
+       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "listbox_sources_apps"));
+       gtk_widget_set_sensitive (widget, TRUE);
 }
 
 /**
@@ -611,6 +618,13 @@ gs_shell_sources_remove_button_cb (GtkWidget *widget, GsShell *shell)
        /* disable button */
        widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_sources_remove"));
        gtk_widget_set_sensitive (widget, FALSE);
+       gtk_button_set_label (GTK_BUTTON (widget), _("Removing…"));
+
+       /* disallow going back */
+       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "button_sources_back"));
+       gtk_widget_set_sensitive (widget, FALSE);
+       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "listbox_sources_apps"));
+       gtk_widget_set_sensitive (widget, FALSE);
 
        /* remove source */
        widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "stack_sources"));
@@ -824,7 +838,7 @@ gs_shell_sources_add_source (GtkListBox *listbox, GsApp *app)
        guint cnt_apps = 0;
        guint i;
 
-       box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+       box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
        gtk_widget_set_margin_top (box, 12);
        gtk_widget_set_margin_start (box, 12);
        gtk_widget_set_margin_bottom (box, 12);
@@ -854,7 +868,7 @@ gs_shell_sources_add_source (GtkListBox *listbox, GsApp *app)
        }
        if (cnt_apps == 0 && cnt_addon == 0) {
                /* TRANSLATORS: this source has no apps installed from it */
-               text = g_strdup (_("No applications or addons installed"));
+               text = g_strdup (_("No software installed"));
        } else if (cnt_addon == 0) {
                /* TRANSLATORS: this source has some apps installed from it */
                text = g_strdup_printf (ngettext ("%i application installed",
@@ -862,13 +876,13 @@ gs_shell_sources_add_source (GtkListBox *listbox, GsApp *app)
                                                  cnt_apps), cnt_apps);
        } else if (cnt_apps == 0) {
                /* TRANSLATORS: this source has some apps installed from it */
-               text = g_strdup_printf (ngettext ("%i addons installed",
-                                                 "%i addons installed",
+               text = g_strdup_printf (ngettext ("%i add-on installed",
+                                                 "%i add-ons installed",
                                                  cnt_addon), cnt_addon);
        } else {
                /* TRANSLATORS: this source has some apps and addons installed from it */
-               text = g_strdup_printf (ngettext ("%i application installed (and %i addons)",
-                                                 "%i applications installed (and %i addons)",
+               text = g_strdup_printf (ngettext ("%i application and %i add-ons installed",
+                                                 "%i applications and %i add-ons installed",
                                                  cnt_apps),
                                        cnt_apps, cnt_addon);
        }


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