[gnome-software/wip/rancell/ubuntu-3-20-rebase: 28/37] Remove scary 3rd party and non-free warnings (they were removed upstream). Show license as 'Unknown'



commit 758bc7e7e643965052f93c6347ac4797ae7f292c
Author: Robert Ancell <robert ancell canonical com>
Date:   Wed Feb 8 16:10:10 2017 +1300

    Remove scary 3rd party and non-free warnings (they were removed upstream). Show license as 'Unknown' in 
this case

 src/gs-shell-details.c  |   42 +-----------------------------------------
 src/gs-shell-details.ui |    4 ++--
 2 files changed, 3 insertions(+), 43 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index fb1b72e..79fe97b 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -669,14 +669,8 @@ gs_shell_details_refresh_all (GsShellDetails *self)
        if (tmp == NULL) {
                /* TRANSLATORS: this is where the licence is not known */
                gtk_label_set_label (GTK_LABEL (self->label_details_licence_value), C_("license", "Unknown"));
-               gtk_widget_set_tooltip_text (self->label_details_licence_value, NULL);
-               gtk_widget_set_visible (self->label_details_licence_title, FALSE);
-               gtk_widget_set_visible (self->label_details_licence_value, FALSE);
        } else {
                gtk_label_set_markup (GTK_LABEL (self->label_details_licence_value), tmp);
-               gtk_widget_set_tooltip_text (self->label_details_licence_value, NULL);
-               gtk_widget_set_visible (self->label_details_licence_title, TRUE);
-               gtk_widget_set_visible (self->label_details_licence_value, TRUE);
        }
 
        /* set version */
@@ -787,47 +781,13 @@ gs_shell_details_refresh_all (GsShellDetails *self)
        /* set the tags buttons */
        if (gs_app_get_kind (self->app) == AS_APP_KIND_WEB_APP) {
                gtk_widget_set_visible (self->label_details_tag_webapp, TRUE);
-               gtk_widget_set_visible (self->label_details_tag_nonfree, FALSE);
-               gtk_widget_set_visible (self->label_details_tag_3rdparty, FALSE);
                gtk_widget_set_visible (self->label_details_info_text, TRUE);
                gtk_label_set_label (GTK_LABEL (self->label_details_info_text),
                                     /* TRANSLATORS: this is the warning box */
                                     _("This application can only be used when there is an active internet 
connection."));
        } else {
                gtk_widget_set_visible (self->label_details_tag_webapp, FALSE);
-               if (gs_app_get_license_is_free (self->app) &&
-                   !gs_app_has_quirk (self->app, AS_APP_QUIRK_PROVENANCE)) {
-                       /* free and 3rd party */
-                       gtk_widget_set_visible (self->label_details_tag_nonfree, FALSE);
-                       gtk_widget_set_visible (self->label_details_tag_3rdparty, TRUE);
-                       gtk_widget_set_visible (self->label_details_info_text, TRUE);
-                       gtk_label_set_label (GTK_LABEL (self->label_details_info_text),
-                                            /* TRANSLATORS: this is the warning box */
-                                            _("This software comes from a 3rd party."));
-               } else if (!gs_app_get_license_is_free (self->app) &&
-                          !gs_app_has_quirk (self->app, AS_APP_QUIRK_PROVENANCE)) {
-                       /* nonfree and 3rd party */
-                       gtk_widget_set_visible (self->label_details_tag_nonfree, TRUE);
-                       gtk_widget_set_visible (self->label_details_tag_3rdparty, TRUE);
-                       gtk_widget_set_visible (self->label_details_info_text, TRUE);
-                       gtk_label_set_label (GTK_LABEL (self->label_details_info_text),
-                                            /* TRANSLATORS: this is the warning box */
-                                            _("This software comes from a 3rd party and may contain non-free 
components."));
-               } else if (!gs_app_get_license_is_free (self->app) &&
-                          gs_app_has_quirk (self->app, AS_APP_QUIRK_PROVENANCE)) {
-                       /* nonfree and distro */
-                       gtk_widget_set_visible (self->label_details_tag_nonfree, TRUE);
-                       gtk_widget_set_visible (self->label_details_tag_3rdparty, FALSE);
-                       gtk_widget_set_visible (self->label_details_info_text, TRUE);
-                       gtk_label_set_label (GTK_LABEL (self->label_details_info_text),
-                                            /* TRANSLATORS: this is the warning box */
-                                            _("This software may contain non-free components."));
-               } else {
-                       /* free and not 3rd party */
-                       gtk_widget_set_visible (self->label_details_tag_nonfree, FALSE);
-                       gtk_widget_set_visible (self->label_details_tag_3rdparty, FALSE);
-                       gtk_widget_set_visible (self->label_details_info_text, FALSE);
-               }
+               gtk_widget_set_visible (self->label_details_info_text, FALSE);
        }
 
        /* hide the kudo details for non-desktop software */
diff --git a/src/gs-shell-details.ui b/src/gs-shell-details.ui
index c96c75c..61c193d 100644
--- a/src/gs-shell-details.ui
+++ b/src/gs-shell-details.ui
@@ -1008,7 +1008,7 @@
                             <property name="spacing">12</property>
                             <child>
                               <object class="GtkLabel" id="label_details_tag_nonfree">
-                                <property name="visible">True</property>
+                                <property name="visible">False</property>
                                 <property name="can_focus">False</property>
                                 <property name="label" translatable="yes">non-free</property>
                                 <style>
@@ -1023,7 +1023,7 @@
                             </child>
                             <child>
                               <object class="GtkLabel" id="label_details_tag_3rdparty">
-                                <property name="visible">True</property>
+                                <property name="visible">False</property>
                                 <property name="can_focus">False</property>
                                 <property name="label" translatable="yes">3rd party</property>
                                  <style>


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