[gnome-software: 11/18] gs-details-page: Drop the download/installed size details




commit 5a5cf7f82a1789f244ad0df063588744d5fc96e7
Author: Philip Withnall <pwithnall endlessos org>
Date:   Fri May 28 14:46:28 2021 +0100

    gs-details-page: Drop the download/installed size details
    
    These are now covered by the context tile bar, so don’t need to be
    listed separately in the details table.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1111

 src/gs-details-page.c  | 42 ----------------------------------
 src/gs-details-page.ui | 62 --------------------------------------------------
 2 files changed, 104 deletions(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 895fb8765..839829d96 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -126,10 +126,6 @@ struct _GsDetailsPage
        GtkWidget               *label_details_channel_value;
        GtkWidget               *label_details_origin_title;
        GtkWidget               *label_details_origin_value;
-       GtkWidget               *label_details_size_installed_title;
-       GtkWidget               *label_details_size_installed_value;
-       GtkWidget               *label_details_size_download_title;
-       GtkWidget               *label_details_size_download_value;
        GtkWidget               *label_details_updated_title;
        GtkWidget               *label_details_updated_value;
        GtkWidget               *label_details_permissions_title;
@@ -633,36 +629,6 @@ gs_details_page_history_cb (GtkLabel *label,
        return TRUE;
 }
 
-static void
-gs_details_page_refresh_size (GsDetailsPage *self)
-{
-       /* set the installed size */
-       if (gs_app_get_size_installed (self->app) != GS_APP_SIZE_UNKNOWABLE &&
-           gs_app_get_size_installed (self->app) != 0) {
-               g_autofree gchar *size = NULL;
-               size = g_format_size (gs_app_get_size_installed (self->app));
-               gtk_label_set_label (GTK_LABEL (self->label_details_size_installed_value), size);
-               gtk_widget_show (self->label_details_size_installed_title);
-               gtk_widget_show (self->label_details_size_installed_value);
-       } else {
-               gtk_widget_hide (self->label_details_size_installed_title);
-               gtk_widget_hide (self->label_details_size_installed_value);
-       }
-
-       /* set the download size */
-       if (!gs_app_is_installed (self->app) &&
-           gs_app_get_size_download (self->app) != GS_APP_SIZE_UNKNOWABLE) {
-               g_autofree gchar *size = NULL;
-               size = g_format_size (gs_app_get_size_download (self->app));
-               gtk_label_set_label (GTK_LABEL (self->label_details_size_download_value), size);
-               gtk_widget_show (self->label_details_size_download_title);
-               gtk_widget_show (self->label_details_size_download_value);
-       } else {
-               gtk_widget_hide (self->label_details_size_download_title);
-               gtk_widget_hide (self->label_details_size_download_value);
-       }
-}
-
 static gboolean
 app_origin_equal (GsApp *a,
                   GsApp *b)
@@ -1226,9 +1192,6 @@ gs_details_page_refresh_all (GsDetailsPage *self)
 
        gtk_widget_set_visible (self->version_history_button, version_history != NULL && version_history->len 
1);
 
-       /* refresh size information */
-       gs_details_page_refresh_size (self);
-
        /* set the updated date */
        updated = gs_app_get_install_date (self->app);
        if (updated == GS_APP_INSTALL_DATE_UNSET) {
@@ -1719,7 +1682,6 @@ gs_details_page_app_refine_cb (GObject *source,
                           error->message);
                return;
        }
-       gs_details_page_refresh_size (self);
        gs_details_page_refresh_reviews (self);
        gs_details_page_refresh_addons (self);
 }
@@ -2916,10 +2878,6 @@ gs_details_page_class_init (GsDetailsPageClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_channel_value);
        gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_origin_title);
        gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_origin_value);
-       gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_size_download_title);
-       gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_size_download_value);
-       gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, 
label_details_size_installed_title);
-       gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, 
label_details_size_installed_value);
        gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_updated_title);
        gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_updated_value);
        gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_permissions_title);
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index 5052d01d7..07e3c1046 100644
--- a/src/gs-details-page.ui
+++ b/src/gs-details-page.ui
@@ -929,68 +929,6 @@
                                   </packing>
                                 </child>
 
-                                <child>
-                                  <object class="GtkLabel" id="label_details_size_installed_title">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Installed Size</property>
-                                    <property name="xalign">0</property>
-                                    <property name="yalign">0.5</property>
-                                    <property name="vexpand">True</property>
-                                    <style>
-                                      <class name="dim-label"/>
-                                    </style>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">8</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label_details_size_installed_value">
-                                    <property name="visible">True</property>
-                                    <property name="hexpand">True</property>
-                                    <property name="label">30 MB</property>
-                                    <property name="selectable">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="yalign">0.5</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="top_attach">8</property>
-                                  </packing>
-                                </child>
-
-                                <child>
-                                  <object class="GtkLabel" id="label_details_size_download_title">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Download Size</property>
-                                    <property name="xalign">0</property>
-                                    <property name="yalign">0.5</property>
-                                    <property name="vexpand">True</property>
-                                    <style>
-                                      <class name="dim-label"/>
-                                    </style>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">0</property>
-                                    <property name="top_attach">9</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label_details_size_download_value">
-                                    <property name="visible">True</property>
-                                    <property name="hexpand">True</property>
-                                    <property name="label">30 MB</property>
-                                    <property name="selectable">True</property>
-                                    <property name="xalign">0</property>
-                                    <property name="yalign">0.5</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="top_attach">9</property>
-                                  </packing>
-                                </child>
-
                                 <child>
                                   <object class="GtkLabel" id="label_details_origin_title">
                                     <property name="visible">True</property>


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