[gnome-software] Never show the source tag on tiles except on installed page



commit 276a1271958f5f99eb63ec48ad08ebdc29b849d5
Author: Kalev Lember <klember redhat com>
Date:   Fri Sep 28 11:20:23 2018 +0100

    Never show the source tag on tiles except on installed page
    
    This used to be a way to tell apart an app that's coming from multiple
    sources. We no longer show duplicates so this can go; instead the
    details page now has a drop down to choose which app to install.
    
    On the installed page, we are still showing all the installed apps, even
    if it's two of the same from different source to give a quick overview
    what's installed.

 src/gs-category-page.c |  7 +------
 src/gs-extras-page.c   |  4 ----
 src/gs-popular-tile.c  | 21 ---------------------
 src/gs-popular-tile.h  |  2 --
 src/gs-popular-tile.ui | 14 --------------
 src/gs-search-page.c   |  5 -----
 src/gs-updates-page.c  |  1 -
 7 files changed, 1 insertion(+), 53 deletions(-)
---
diff --git a/src/gs-category-page.c b/src/gs-category-page.c
index 45524beb..a465218f 100644
--- a/src/gs-category-page.c
+++ b/src/gs-category-page.c
@@ -164,9 +164,6 @@ gs_category_page_get_apps_cb (GObject *source_object,
                        tile = make_addon_tile_for_category (app, self->subcategory);
                } else {
                        tile = gs_popular_tile_new (app);
-                       if (!gs_app_has_quirk (app, AS_APP_QUIRK_PROVENANCE) ||
-                           gs_utils_list_has_app_fuzzy (list, app))
-                               gs_popular_tile_show_source (GS_POPULAR_TILE (tile), TRUE);
                }
 
                g_signal_connect (tile, "clicked",
@@ -384,9 +381,7 @@ gs_category_page_reload (GsPage *page)
                                         "category", self->subcategory,
                                         "filter-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING,
                                         "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON |
-                                                        GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING |
-                                                        GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN_HOSTNAME |
-                                                        GS_PLUGIN_REFINE_FLAGS_REQUIRE_PROVENANCE,
+                                                        GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING,
                                         "dedupe-flags", GS_APP_LIST_FILTER_FLAG_PREFER_INSTALLED |
                                                         GS_APP_LIST_FILTER_FLAG_KEY_ID_PROVIDES,
                                         NULL);
diff --git a/src/gs-extras-page.c b/src/gs-extras-page.c
index 62b759fe..737fbaa9 100644
--- a/src/gs-extras-page.c
+++ b/src/gs-extras-page.c
@@ -294,9 +294,6 @@ gs_extras_page_add_app (GsExtrasPage *self, GsApp *app, GsAppList *list, SearchD
        app_row = gs_app_row_new (app);
        gs_app_row_set_colorful (GS_APP_ROW (app_row), TRUE);
        gs_app_row_set_show_buttons (GS_APP_ROW (app_row), TRUE);
-       if (!gs_app_has_quirk (app, AS_APP_QUIRK_PROVENANCE) ||
-           gs_utils_list_has_app_fuzzy (list, app))
-               gs_app_row_set_show_source (GS_APP_ROW (app_row), TRUE);
 
        g_object_set_data_full (G_OBJECT (app_row), "missing-title", g_strdup (search_data->title), g_free);
 
@@ -722,7 +719,6 @@ gs_extras_page_load (GsExtrasPage *self, GPtrArray *array_search_data)
                                                         "search", search_data->search,
                                                         "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON |
                                                                         
GS_PLUGIN_REFINE_FLAGS_REQUIRE_VERSION |
-                                                                        
GS_PLUGIN_REFINE_FLAGS_REQUIRE_PROVENANCE |
                                                                         
GS_PLUGIN_REFINE_FLAGS_REQUIRE_HISTORY |
                                                                         
GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION |
                                                                         
GS_PLUGIN_REFINE_FLAGS_REQUIRE_DESCRIPTION |
diff --git a/src/gs-popular-tile.c b/src/gs-popular-tile.c
index 4c998fe5..795bb7a2 100644
--- a/src/gs-popular-tile.c
+++ b/src/gs-popular-tile.c
@@ -38,7 +38,6 @@ struct _GsPopularTile
        GtkWidget       *eventbox;
        GtkWidget       *stack;
        GtkWidget       *stars;
-       GtkWidget       *label_origin;
 };
 
 G_DEFINE_TYPE (GsPopularTile, gs_popular_tile, GS_TYPE_APP_TILE)
@@ -180,7 +179,6 @@ gs_popular_tile_class_init (GsPopularTileClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsPopularTile, eventbox);
        gtk_widget_class_bind_template_child (widget_class, GsPopularTile, stack);
        gtk_widget_class_bind_template_child (widget_class, GsPopularTile, stars);
-       gtk_widget_class_bind_template_child (widget_class, GsPopularTile, label_origin);
 }
 
 GtkWidget *
@@ -195,23 +193,4 @@ gs_popular_tile_new (GsApp *app)
        return GTK_WIDGET (tile);
 }
 
-void
-gs_popular_tile_show_source (GsPopularTile *tile, gboolean show_source)
-{
-       if (show_source) {
-               const gchar *hostname = gs_app_get_origin_hostname (tile->app);
-               if (hostname != NULL) {
-                       /* TRANSLATORS: this refers to where the app came from */
-                       g_autofree gchar *source_text = g_strdup_printf (_("Source: %s"),
-                                                                        hostname);
-                       gtk_label_set_label (GTK_LABEL (tile->label_origin), source_text);
-               } else {
-                       /* if the hostname is not valid then we hide the source */
-                       show_source = FALSE;
-               }
-       }
-
-       gtk_widget_set_visible (tile->label_origin, show_source);
-}
-
 /* vim: set noexpandtab: */
diff --git a/src/gs-popular-tile.h b/src/gs-popular-tile.h
index 433722a8..3ed2566d 100644
--- a/src/gs-popular-tile.h
+++ b/src/gs-popular-tile.h
@@ -31,8 +31,6 @@ G_BEGIN_DECLS
 G_DECLARE_FINAL_TYPE (GsPopularTile, gs_popular_tile, GS, POPULAR_TILE, GsAppTile)
 
 GtkWidget      *gs_popular_tile_new                    (GsApp          *app);
-void            gs_popular_tile_show_source            (GsPopularTile  *tile,
-                                                        gboolean        show_source);
 
 G_END_DECLS
 
diff --git a/src/gs-popular-tile.ui b/src/gs-popular-tile.ui
index bc2ba434..d52da2f2 100644
--- a/src/gs-popular-tile.ui
+++ b/src/gs-popular-tile.ui
@@ -94,20 +94,6 @@
                         </style>
                       </object>
                     </child>
-                    <child>
-                      <object class="GtkLabel" id="label_origin">
-                        <property name="visible">False</property>
-                        <property name="xalign">0.5</property>
-                        <property name="yalign">1.0</property>
-                        <property name="halign">center</property>
-                        <property name="vexpand">True</property>
-                        <property name="ellipsize">end</property>
-                        <style>
-                          <class name="app-row-origin-text"/>
-                          <class name="dim-label"/>
-                        </style>
-                      </object>
-                    </child>
                   </object>
                 </child>
               </object>
diff --git a/src/gs-search-page.c b/src/gs-search-page.c
index 9cb60550..dc2b8ef7 100644
--- a/src/gs-search-page.c
+++ b/src/gs-search-page.c
@@ -132,9 +132,6 @@ gs_search_page_get_search_cb (GObject *source_object,
        for (i = 0; i < gs_app_list_length (list); i++) {
                app = gs_app_list_index (list, i);
                app_row = gs_app_row_new (app);
-               if (!gs_app_has_quirk (app, AS_APP_QUIRK_PROVENANCE) ||
-                   gs_utils_list_has_app_fuzzy (list, app))
-                       gs_app_row_set_show_source (GS_APP_ROW (app_row), TRUE);
                g_signal_connect (app_row, "button-clicked",
                                  G_CALLBACK (gs_search_page_app_row_clicked_cb),
                                  self);
@@ -265,14 +262,12 @@ gs_search_page_load (GsSearchPage *self)
                                         "timeout", 10,
                                         "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON |
                                                         GS_PLUGIN_REFINE_FLAGS_REQUIRE_VERSION |
-                                                        GS_PLUGIN_REFINE_FLAGS_REQUIRE_PROVENANCE |
                                                         GS_PLUGIN_REFINE_FLAGS_REQUIRE_HISTORY |
                                                         GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION |
                                                         GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEW_RATINGS |
                                                         GS_PLUGIN_REFINE_FLAGS_REQUIRE_DESCRIPTION |
                                                         GS_PLUGIN_REFINE_FLAGS_REQUIRE_LICENSE |
                                                         GS_PLUGIN_REFINE_FLAGS_REQUIRE_PERMISSIONS |
-                                                        GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN_HOSTNAME |
                                                         GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING,
                                         "dedupe-flags", GS_APP_LIST_FILTER_FLAG_PREFER_INSTALLED |
                                                         GS_APP_LIST_FILTER_FLAG_KEY_ID_PROVIDES,
diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
index 559b5f44..33a645ba 100644
--- a/src/gs-updates-page.c
+++ b/src/gs-updates-page.c
@@ -671,7 +671,6 @@ gs_updates_page_load (GsUpdatesPage *self)
        refine_flags = GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON |
                       GS_PLUGIN_REFINE_FLAGS_REQUIRE_SIZE |
                       GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPDATE_DETAILS |
-                      GS_PLUGIN_REFINE_FLAGS_REQUIRE_PROVENANCE |
                       GS_PLUGIN_REFINE_FLAGS_REQUIRE_VERSION;
        gs_updates_page_set_state (self, GS_UPDATES_PAGE_STATE_ACTION_GET_UPDATES);
        self->action_cnt++;


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