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



commit 536dd80fa7fb24b0589444e384128cd2c63e6b8d
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  |   36 +-----------------------------------
 src/gs-shell-details.ui |    4 ++--
 2 files changed, 3 insertions(+), 37 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 40425db..58a2217 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -788,47 +788,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 3af4a51..1c16097 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]