[gnome-software] update dialog: Show OS update description



commit 7aebaa69825b82180814cdbfdddcb2f07f51f97d
Author: Kalev Lember <klember redhat com>
Date:   Mon Mar 5 15:47:30 2018 +0100

    update dialog: Show OS update description
    
    https://github.com/gnome-design-team/gnome-mockups-software/blob/master/wireframes/updates-dialogs.png

 src/gs-update-dialog.c  |  5 +++++
 src/gs-update-dialog.ui | 25 ++++++++++++++++++++++++-
 2 files changed, 29 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-update-dialog.c b/src/gs-update-dialog.c
index 845bf916..fba5194b 100644
--- a/src/gs-update-dialog.c
+++ b/src/gs-update-dialog.c
@@ -58,6 +58,7 @@ struct _GsUpdateDialog
        GtkWidget       *label_summary;
        GtkWidget       *list_boxes[GS_UPDATE_DIALOG_SECTION_LAST];
        GtkWidget       *list_box_installed_updates;
+       GtkWidget       *os_update_description;
        GtkWidget       *os_update_box;
        GtkWidget       *scrolledwindow;
        GtkWidget       *scrolledwindow_details;
@@ -549,6 +550,9 @@ gs_update_dialog_show_update_details (GsUpdateDialog *dialog, GsApp *app)
                GsUpdateDialogSection section;
                GtkWidget *row;
 
+               gtk_label_set_text (GTK_LABEL (dialog->os_update_description),
+                                   gs_app_get_description (app));
+
                /* clear existing data */
                for (guint i = 0; i < GS_UPDATE_DIALOG_SECTION_LAST; i++) {
                        if (dialog->list_boxes[i] == NULL)
@@ -730,6 +734,7 @@ gs_update_dialog_class_init (GsUpdateDialogClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsUpdateDialog, label_name);
        gtk_widget_class_bind_template_child (widget_class, GsUpdateDialog, label_summary);
        gtk_widget_class_bind_template_child (widget_class, GsUpdateDialog, list_box_installed_updates);
+       gtk_widget_class_bind_template_child (widget_class, GsUpdateDialog, os_update_description);
        gtk_widget_class_bind_template_child (widget_class, GsUpdateDialog, os_update_box);
        gtk_widget_class_bind_template_child (widget_class, GsUpdateDialog, scrolledwindow);
        gtk_widget_class_bind_template_child (widget_class, GsUpdateDialog, scrolledwindow_details);
diff --git a/src/gs-update-dialog.ui b/src/gs-update-dialog.ui
index 2440aefe..afba8cab 100644
--- a/src/gs-update-dialog.ui
+++ b/src/gs-update-dialog.ui
@@ -256,12 +256,35 @@
                 <property name="vscrollbar_policy">automatic</property>
                 <property name="shadow_type">none</property>
                 <child>
-                  <object class="GtkBox" id="os_update_box">
+                  <object class="GtkBox">
                     <property name="visible">True</property>
                     <property name="orientation">vertical</property>
+                    <property name="margin_top">24</property>
                     <property name="margin_bottom">18</property>
                     <property name="margin_start">18</property>
                     <property name="margin_end">18</property>
+                    <child>
+                      <object class="GtkLabel" id="os_update_description">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="wrap">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkBox" id="os_update_box">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                      </packing>
+                    </child>
                   </object>
                 </child>
               </object>


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