[gnome-software: 13/15] gs-overview-page: Rename ‘popular’ to ‘curated’




commit 3b6e700e0081c128bbc3e97749b33c41ae0c4cea
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed May 4 13:11:24 2022 +0100

    gs-overview-page: Rename ‘popular’ to ‘curated’
    
    To reflect changes in the underlying terminology in `GsAppQuery` and
    `GsPluginJobListApps`.
    
    This introduces no functional changes.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1472

 doc/vendor-customisation.md |  6 +++---
 src/gs-overview-page.c      | 40 ++++++++++++++++++++--------------------
 src/gs-overview-page.ui     |  6 +++---
 3 files changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/doc/vendor-customisation.md b/doc/vendor-customisation.md
index 816353990..fc9c869e5 100644
--- a/doc/vendor-customisation.md
+++ b/doc/vendor-customisation.md
@@ -75,7 +75,7 @@ Featured apps and Editor’s Choice
 
 There are several ways to promote and highlight specific applications in GNOME
 Software. On the overview page, there’s a carousel of featured applications
-(`featured_carousel`), and an “Editor’s Choice” section (`box_popular`). Both of
+(`featured_carousel`), and an “Editor’s Choice” section (`box_curated`). Both of
 them highlight curated sets of applications. The same is true on each category
 page: a carousel (`top_carousel`) and an “Editor’s Choice” section
 (`featured_flow_box`) are present.
@@ -174,8 +174,8 @@ the [GNOME Circle](https://circle.gnome.org/). See
 `data/assets/org.gnome.Software.Featured.xml` for this list, and for an example
 of the metainfo XML needed to feature or highlight applications. See
 `data/assets/org.gnome.Software.Popular.xml` for a default hard-coded list of
-popular applications, which is displayed in the “Editor’s Choice” section of the
-overview page.
+curated high quality applications, which is displayed in the “Editor’s Choice”
+section of the overview page.
 
 Pass `-Ddefault_featured_apps=false` when configuring GNOME Software to disable
 the default list of featured applications. Pass `-Dhardcoded_popular=false` to
diff --git a/src/gs-overview-page.c b/src/gs-overview-page.c
index ca1f3a279..0b8115dc4 100644
--- a/src/gs-overview-page.c
+++ b/src/gs-overview-page.c
@@ -35,7 +35,7 @@ struct _GsOverviewPage
        GsShell                 *shell;
        gint                     action_cnt;
        gboolean                 loading_featured;
-       gboolean                 loading_popular;
+       gboolean                 loading_curated;
        gboolean                 loading_recent;
        gboolean                 loading_categories;
        gboolean                 empty;
@@ -48,12 +48,12 @@ struct _GsOverviewPage
        GtkWidget               *label_third_party;
        GtkWidget               *featured_carousel;
        GtkWidget               *box_overview;
-       GtkWidget               *box_popular;
+       GtkWidget               *box_curated;
        GtkWidget               *box_recent;
        GtkWidget               *flowbox_categories;
        GtkWidget               *flowbox_iconless_categories;
        GtkWidget               *iconless_categories_heading;
-       GtkWidget               *popular_heading;
+       GtkWidget               *curated_heading;
        GtkWidget               *recent_heading;
        GtkWidget               *scrolledwindow_overview;
        GtkWidget               *stack_overview;
@@ -115,12 +115,12 @@ gs_overview_page_decrement_action_cnt (GsOverviewPage *self)
        g_signal_emit (self, signals[SIGNAL_REFRESHED], 0);
        self->loading_categories = FALSE;
        self->loading_featured = FALSE;
-       self->loading_popular = FALSE;
+       self->loading_curated = FALSE;
        self->loading_recent = FALSE;
 }
 
 static void
-gs_overview_page_get_popular_cb (GObject *source_object,
+gs_overview_page_get_curated_cb (GObject *source_object,
                                  GAsyncResult *res,
                                  gpointer user_data)
 {
@@ -132,37 +132,37 @@ gs_overview_page_get_popular_cb (GObject *source_object,
        g_autoptr(GError) error = NULL;
        g_autoptr(GsAppList) list = NULL;
 
-       /* get popular apps */
+       /* get curated apps */
        list = gs_plugin_loader_job_process_finish (plugin_loader, res, &error);
        if (list == NULL) {
                if (!g_error_matches (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_CANCELLED) &&
                    !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-                       g_warning ("failed to get popular apps: %s", error->message);
+                       g_warning ("failed to get curated apps: %s", error->message);
                goto out;
        }
 
        /* not enough to show */
        if (gs_app_list_length (list) < N_TILES) {
-               g_warning ("Only %u apps for popular list, hiding",
+               g_warning ("Only %u apps for curated list, hiding",
                           gs_app_list_length (list));
-               gtk_widget_set_visible (self->box_popular, FALSE);
-               gtk_widget_set_visible (self->popular_heading, FALSE);
+               gtk_widget_set_visible (self->box_curated, FALSE);
+               gtk_widget_set_visible (self->curated_heading, FALSE);
                goto out;
        }
 
        gs_app_list_randomize (list);
 
-       gs_widget_remove_all (self->box_popular, (GsRemoveFunc) gtk_flow_box_remove);
+       gs_widget_remove_all (self->box_curated, (GsRemoveFunc) gtk_flow_box_remove);
 
        for (i = 0; i < gs_app_list_length (list) && i < N_TILES; i++) {
                app = gs_app_list_index (list, i);
                tile = gs_summary_tile_new (app);
                g_signal_connect (tile, "clicked",
                          G_CALLBACK (app_tile_clicked), self);
-               gtk_flow_box_insert (GTK_FLOW_BOX (self->box_popular), tile, -1);
+               gtk_flow_box_insert (GTK_FLOW_BOX (self->box_curated), tile, -1);
        }
-       gtk_widget_set_visible (self->box_popular, TRUE);
-       gtk_widget_set_visible (self->popular_heading, TRUE);
+       gtk_widget_set_visible (self->box_curated, TRUE);
+       gtk_widget_set_visible (self->curated_heading, TRUE);
 
        self->empty = FALSE;
 
@@ -513,7 +513,7 @@ gs_overview_page_load (GsOverviewPage *self)
                self->action_cnt++;
        }
 
-       if (!self->loading_popular) {
+       if (!self->loading_curated) {
                g_autoptr(GsPluginJob) plugin_job = NULL;
                g_autoptr(GsAppQuery) query = NULL;
                GsPluginListAppsFlags flags = GS_PLUGIN_LIST_APPS_FLAGS_INTERACTIVE;
@@ -529,11 +529,11 @@ gs_overview_page_load (GsOverviewPage *self)
 
                plugin_job = gs_plugin_job_list_apps_new (query, flags);
 
-               self->loading_popular = TRUE;
+               self->loading_curated = TRUE;
                gs_plugin_loader_job_process_async (self->plugin_loader,
                                                    plugin_job,
                                                    self->cancellable,
-                                                   gs_overview_page_get_popular_cb,
+                                                   gs_overview_page_get_curated_cb,
                                                    self);
                self->action_cnt++;
        }
@@ -697,7 +697,7 @@ gs_overview_page_setup (GsPage *page,
 
        for (i = 0; i < N_TILES; i++) {
                tile = gs_summary_tile_new (NULL);
-               gtk_flow_box_insert (GTK_FLOW_BOX (self->box_popular), tile, -1);
+               gtk_flow_box_insert (GTK_FLOW_BOX (self->box_curated), tile, -1);
        }
 
        for (i = 0; i < N_TILES; i++) {
@@ -811,12 +811,12 @@ gs_overview_page_class_init (GsOverviewPageClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, label_third_party);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, featured_carousel);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, box_overview);
-       gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, box_popular);
+       gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, box_curated);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, box_recent);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, flowbox_categories);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, flowbox_iconless_categories);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, iconless_categories_heading);
-       gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, popular_heading);
+       gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, curated_heading);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, recent_heading);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, scrolledwindow_overview);
        gtk_widget_class_bind_template_child (widget_class, GsOverviewPage, stack_overview);
diff --git a/src/gs-overview-page.ui b/src/gs-overview-page.ui
index 722155b1f..a556aa04e 100644
--- a/src/gs-overview-page.ui
+++ b/src/gs-overview-page.ui
@@ -105,7 +105,7 @@
                                 </child>
 
                                 <child>
-                                  <object class="GtkLabel" id="popular_heading">
+                                  <object class="GtkLabel" id="curated_heading">
                                     <property name="xalign">0</property>
                                     <property name="label" translatable="yes" comments="Translators: This is 
a heading for software which has been featured (&apos;picked&apos;) by the distribution.">Editor’s 
Choice</property>
                                     <property name="margin-top">21</property>
@@ -116,13 +116,13 @@
                                   </object>
                                 </child>
                                 <child>
-                                  <object class="GtkFlowBox" id="box_popular">
+                                  <object class="GtkFlowBox" id="box_curated">
                                     <property name="homogeneous">True</property>
                                     <property name="column-spacing">14</property>
                                     <property name="row-spacing">14</property>
                                     <property name="valign">start</property>
                                     <accessibility>
-                                      <relation name="labelled-by">popular_heading</relation>
+                                      <relation name="labelled-by">curated_heading</relation>
                                     </accessibility>
                                   </object>
                                 </child>


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