[gnome-software: 10/18] gs-details-page: Drop the origin label




commit 614742f47a3dbe74873813c501d1084eafe2133e
Author: Philip Withnall <pwithnall endlessos org>
Date:   Mon Jul 26 16:00:14 2021 +0100

    gs-details-page: Drop the origin label
    
    It’s already shown as the ‘Source’ drop-down in the header bar, so
    doesn’t need to be duplicated.
    
    It doesn’t fit in with the new designs:
    https://gitlab.gnome.org/Teams/Design/software-mockups/-/raw/master/adaptive/app-page-adaptive.png.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1111

 src/gs-details-page.c  | 21 ---------------------
 src/gs-details-page.ui | 31 -------------------------------
 2 files changed, 52 deletions(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index b57f6ad0f..b7b0eec88 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -123,8 +123,6 @@ struct _GsDetailsPage
        GtkWidget               *label_details_developer_value;
        GtkWidget               *box_details_developer;
        GtkWidget               *image_details_developer_verified;
-       GtkWidget               *label_details_origin_title;
-       GtkWidget               *label_details_origin_value;
        GtkWidget               *label_failed;
        GtkWidget               *list_box_addons;
        GtkWidget               *list_box_version_history;
@@ -1093,23 +1091,6 @@ gs_details_page_refresh_all (GsDetailsPage *self)
 
        gtk_widget_set_visible (self->version_history_button, version_history != NULL && version_history->len 
1);
 
-       /* set the origin */
-       origin = g_strdup (gs_app_get_origin_hostname (self->app));
-       if (origin == NULL)
-               origin = g_strdup (gs_app_get_origin (self->app));
-       if (origin == NULL) {
-               GFile *local_file = gs_app_get_local_file (self->app);
-               if (local_file != NULL)
-                       origin = g_file_get_basename (local_file);
-       }
-       if (origin == NULL || origin[0] == '\0') {
-               /* TRANSLATORS: this is where we don't know the origin of the
-                * application */
-               gtk_label_set_label (GTK_LABEL (self->label_details_origin_value), C_("origin", "Unknown"));
-       } else {
-               gtk_label_set_label (GTK_LABEL (self->label_details_origin_value), origin);
-       }
-
        /* are we trying to replace something in the baseos */
        gtk_widget_set_visible (self->infobar_details_package_baseos,
                                gs_app_has_quirk (self->app, GS_APP_QUIRK_COMPULSORY) &&
@@ -2331,8 +2312,6 @@ gs_details_page_class_init (GsDetailsPageClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_developer_value);
        gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, box_details_developer);
        gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, image_details_developer_verified);
-       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_failed);
        gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, list_box_addons);
        gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, list_box_version_history);
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index e0dab744c..7d0805b79 100644
--- a/src/gs-details-page.ui
+++ b/src/gs-details-page.ui
@@ -804,37 +804,6 @@
                                 <property name="hexpand">True</property>
                                 <property name="valign">start</property>
 
-                                <child>
-                                  <object class="GtkLabel" id="label_details_origin_title">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Source</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">7</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <object class="GtkLabel" id="label_details_origin_value">
-                                    <property name="visible">True</property>
-                                    <property name="hexpand">True</property>
-                                    <property name="label">Upstream</property>
-                                    <property name="selectable">True</property>
-                                    <property name="ellipsize">end</property>
-                                    <property name="xalign">0</property>
-                                    <property name="yalign">0.5</property>
-                                  </object>
-                                  <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="top_attach">7</property>
-                                  </packing>
-                                </child>
                                 <child>
                                   <object class="GtkLabel" id="label_details_developer_title">
                                     <property name="visible">True</property>


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