[gnome-software/wip/kalev/source_selection_drop_down: 1/2] details page: Add source selection drop down



commit 2bf4b3c2f6bc86634abfef697056b2e914367210
Author: Kalev Lember <klember redhat com>
Date:   Wed Sep 26 15:45:24 2018 +0200

    details page: Add source selection drop down
    
    ... to choose between e.g. flatpak and distro packages.

 po/POTFILES.in                   |   1 +
 src/gnome-software.gresource.xml |   1 +
 src/gnome-software.ui            |  77 +++++++++++++++++++
 src/gs-details-page.c            | 110 +++++++++++++++++++++++++++
 src/gs-origin-popover-row.c      | 156 +++++++++++++++++++++++++++++++++++++++
 src/gs-origin-popover-row.h      |  48 ++++++++++++
 src/gs-origin-popover-row.ui     | 127 +++++++++++++++++++++++++++++++
 src/gs-shell.c                   |   2 +
 src/meson.build                  |   1 +
 9 files changed, 523 insertions(+)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ad900c43..eae167e2 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -37,6 +37,7 @@ src/gs-loading-page.c
 src/gs-loading-page.ui
 src/gs-main.c
 src/gs-moderate-page.ui
+src/gs-origin-popover-row.ui
 src/gs-overview-page.c
 src/gs-overview-page.ui
 src/gs-page.c
diff --git a/src/gnome-software.gresource.xml b/src/gnome-software.gresource.xml
index 59821733..a8efa6a9 100644
--- a/src/gnome-software.gresource.xml
+++ b/src/gnome-software.gresource.xml
@@ -18,6 +18,7 @@
   <file preprocess="xml-stripblanks">gs-loading-page.ui</file>
   <file preprocess="xml-stripblanks">gs-moderate-page.ui</file>
   <file preprocess="xml-stripblanks">gs-overview-page.ui</file>
+  <file preprocess="xml-stripblanks">gs-origin-popover-row.ui</file>
   <file preprocess="xml-stripblanks">gs-popular-tile.ui</file>
   <file preprocess="xml-stripblanks">gs-prefs-dialog.ui</file>
   <file preprocess="xml-stripblanks">gs-removal-dialog.ui</file>
diff --git a/src/gnome-software.ui b/src/gnome-software.ui
index b613cfc1..a96284fa 100644
--- a/src/gnome-software.ui
+++ b/src/gnome-software.ui
@@ -340,6 +340,60 @@
                 <property name="position">1</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkBox" id="origin_box">
+                <property name="visible">True</property>
+                <property name="orientation">horizontal</property>
+                <property name="halign">fill</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="label">Source</property>
+                    <property name="valign">GTK_ALIGN_CENTER</property>
+                    <property name="vexpand">1</property>
+                    <property name="visible">1</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkMenuButton" id="origin_button">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="sensitive">True</property>
+                    <property name="popover">origin_popover</property>
+                    <child>
+                      <object class="GtkGrid">
+                        <property name="column-spacing">12</property>
+                        <property name="visible">1</property>
+                        <child>
+                          <object class="GtkLabel" id="origin_button_label">
+                            <property name="label">Fedora</property>
+                            <property name="valign">GTK_ALIGN_CENTER</property>
+                            <property name="vexpand">1</property>
+                            <property name="visible">1</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImage">
+                            <property name="icon-name">pan-down-symbolic</property>
+                            <property name="pixel-size">16</property>
+                            <property name="valign">GTK_ALIGN_CENTER</property>
+                            <property name="vexpand">1</property>
+                            <property name="visible">1</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="pack-type">end</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -589,4 +643,27 @@
       </object>
     </child>
   </object>
+  <object class="GtkPopover" id="origin_popover">
+    <child>
+      <object class="GtkBox" id="origin_popover_box">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child>
+          <object class="GtkScrolledWindow">
+            <property name="propagate-natural-height">true</property>
+            <property name="propagate-natural-width">true</property>
+            <property name="max-content-height">600</property>
+            <property name="visible">true</property>
+            <child>
+              <object class="GtkListBox" id="origin_popover_list_box">
+                <property name="selection-mode">none</property>
+                <property name="visible">true</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
 </interface>
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 68cde5a9..1702da72 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -34,6 +34,7 @@
 #include "gs-app-addon-row.h"
 #include "gs-auth-dialog.h"
 #include "gs-history-dialog.h"
+#include "gs-origin-popover-row.h"
 #include "gs-screenshot-image.h"
 #include "gs-star-widget.h"
 #include "gs-review-histogram.h"
@@ -876,6 +877,107 @@ gs_details_page_refresh_size (GsDetailsPage *self)
        }
 }
 
+static void
+gs_details_page_get_alternates_cb (GObject *source_object,
+                                   GAsyncResult *res,
+                                   gpointer user_data)
+{
+       GsDetailsPage *self = GS_DETAILS_PAGE (user_data);
+       GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (source_object);
+       g_autoptr(GError) error = NULL;
+       g_autoptr(GsAppList) list = NULL;
+       g_autoptr(GsOsRelease) os_release = NULL;
+       GtkWidget *origin_box;
+       GtkWidget *origin_button_label;
+       GtkWidget *origin_popover_list_box;
+       const gchar *origin_ui = NULL;
+
+       origin_box = GTK_WIDGET (gtk_builder_get_object (self->builder, "origin_box"));
+       origin_button_label = GTK_WIDGET (gtk_builder_get_object (self->builder, "origin_button_label"));
+       origin_popover_list_box = GTK_WIDGET (gtk_builder_get_object (self->builder, 
"origin_popover_list_box"));
+
+       gs_container_remove_all (GTK_CONTAINER (origin_popover_list_box));
+
+       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_warning ("failed to get alternates: %s", error->message);
+               gtk_widget_hide (origin_box);
+               return;
+       }
+
+       /* no alternates to show */
+//     if (gs_app_list_length (list) < 2) {
+       if (gs_app_list_length (list) < 1) {
+               gtk_widget_hide (origin_box);
+               return;
+       }
+
+       for (guint i = 0; i < gs_app_list_length (list); i++) {
+               GsApp *app = gs_app_list_index (list, i);
+               GtkWidget *row = gs_origin_popover_row_new (app);
+               gtk_widget_show (row);
+               if (app == self->app)
+                       gs_origin_popover_row_set_selected (GS_ORIGIN_POPOVER_ROW (row), TRUE);
+               gtk_container_add (GTK_CONTAINER (origin_popover_list_box), row);
+       }
+
+       /* use the distro name for official packages */
+       if (gs_app_has_quirk (self->app, AS_APP_QUIRK_PROVENANCE)) {
+               os_release = gs_os_release_new (NULL);
+               if (os_release != NULL)
+                       origin_ui = gs_os_release_get_name (os_release);
+       }
+
+       /* fall back to origin */
+       if (origin_ui == NULL)
+               origin_ui = gs_app_get_origin (self->app);
+
+       if (origin_ui != NULL)
+               gtk_label_set_text (GTK_LABEL (origin_button_label), origin_ui);
+       else
+               gtk_label_set_text (GTK_LABEL (origin_button_label), "");
+
+       gtk_widget_show (origin_box);
+}
+
+static void
+origin_popover_row_activated_cb (GtkListBox *list_box,
+                                 GtkListBoxRow *row,
+                                 gpointer user_data)
+{
+       GsDetailsPage *self = GS_DETAILS_PAGE (user_data);
+       GsApp *app;
+       GtkWidget *popover;
+
+       popover = GTK_WIDGET (gtk_builder_get_object (self->builder, "origin_popover"));
+       gtk_popover_popdown (GTK_POPOVER (popover));
+
+       app = gs_origin_popover_row_get_app (GS_ORIGIN_POPOVER_ROW (row));
+       if (app != self->app)
+               gs_details_page_set_app (self, app);
+}
+
+static void
+gs_details_page_set_alternates (GsDetailsPage *self)
+{
+       g_autoptr(GsPluginJob) plugin_job = NULL;
+
+       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_GET_ALTERNATES,
+                                        "interactive", TRUE,
+                                        "app", self->app,
+//                                      "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_PROVENANCE,
+                                        NULL);
+       gs_plugin_loader_job_process_async (self->plugin_loader,
+                                           plugin_job,
+                                           self->cancellable,
+                                           gs_details_page_get_alternates_cb,
+                                           self);
+}
+
+
 static void
 gs_details_page_refresh_all (GsDetailsPage *self)
 {
@@ -911,6 +1013,9 @@ gs_details_page_refresh_all (GsDetailsPage *self)
                gtk_widget_set_visible (self->application_details_summary, FALSE);
        }
 
+       /* set the alternates shown in the header bar */
+       gs_details_page_set_alternates (self);
+
        /* set the description */
        tmp = gs_app_get_description (self->app);
        gs_details_page_set_description (self, tmp);
@@ -2299,6 +2404,7 @@ gs_details_page_setup (GsPage *page,
 {
        GsDetailsPage *self = GS_DETAILS_PAGE (page);
        GtkAdjustment *adj;
+       GtkWidget *origin_popover_list_box;
 
        g_return_val_if_fail (GS_IS_DETAILS_PAGE (self), TRUE);
 
@@ -2367,6 +2473,10 @@ gs_details_page_setup (GsPage *page,
        g_signal_connect (self->label_license_nonfree_details, "activate-link",
                          G_CALLBACK (gs_details_page_activate_link_cb),
                          self);
+       origin_popover_list_box = GTK_WIDGET (gtk_builder_get_object (self->builder, 
"origin_popover_list_box"));
+       g_signal_connect (origin_popover_list_box, "row-activated",
+                         G_CALLBACK (origin_popover_row_activated_cb),
+                         self);
 
        adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow_details));
        gtk_container_set_focus_vadjustment (GTK_CONTAINER (self->box_details), adj);
diff --git a/src/gs-origin-popover-row.c b/src/gs-origin-popover-row.c
new file mode 100644
index 00000000..d30b78d9
--- /dev/null
+++ b/src/gs-origin-popover-row.c
@@ -0,0 +1,156 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2018 Kalev Lember <klember redhat com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "config.h"
+
+#include "gs-origin-popover-row.h"
+
+#include <glib/gi18n.h>
+
+typedef struct
+{
+       GsApp           *app;
+       GtkWidget       *name_label;
+       GtkWidget       *url_box;
+       GtkWidget       *url_label;
+       GtkWidget       *format_box;
+       GtkWidget       *format_label;
+       GtkWidget       *selected_image;
+} GsOriginPopoverRowPrivate;
+
+G_DEFINE_TYPE_WITH_PRIVATE (GsOriginPopoverRow, gs_origin_popover_row, GTK_TYPE_LIST_BOX_ROW)
+
+static void
+refresh_ui (GsOriginPopoverRow *row)
+{
+       GsOriginPopoverRowPrivate *priv = gs_origin_popover_row_get_instance_private (row);
+       const gchar *origin_ui = NULL;
+       const gchar *url;
+       AsBundleKind bundle_kind;
+       g_autoptr(GsOsRelease) os_release = NULL;
+
+       g_assert (GS_IS_ORIGIN_POPOVER_ROW (row));
+       g_assert (GS_IS_APP (priv->app));
+
+       // XXX: debug
+       g_print ("%s", gs_app_to_string (priv->app));
+
+       /* use the distro name for official packages */
+       if (gs_app_has_quirk (priv->app, AS_APP_QUIRK_PROVENANCE)) {
+               os_release = gs_os_release_new (NULL);
+               if (os_release != NULL)
+                       origin_ui = gs_os_release_get_name (os_release);
+       }
+
+       /* fall back to origin */
+       if (origin_ui == NULL)
+               origin_ui = gs_app_get_origin (priv->app);
+
+       if (origin_ui != NULL) {
+               gtk_label_set_text (GTK_LABEL (priv->name_label), origin_ui);
+       }
+
+       url = gs_app_get_origin_hostname (priv->app);
+       if (url != NULL) {
+               gtk_label_set_text (GTK_LABEL (priv->url_label), url);
+               gtk_widget_show (priv->url_box);
+       } else {
+               gtk_widget_hide (priv->url_box);
+       }
+
+       bundle_kind = gs_app_get_bundle_kind (priv->app);
+       if (bundle_kind != AS_BUNDLE_KIND_UNKNOWN) {
+               gtk_label_set_text (GTK_LABEL (priv->format_label), as_bundle_kind_to_string (bundle_kind));
+               gtk_widget_show (priv->format_box);
+       } else {
+               gtk_widget_hide (priv->format_box);
+       }
+}
+
+static void
+gs_origin_popover_row_set_app (GsOriginPopoverRow *row, GsApp *app)
+{
+       GsOriginPopoverRowPrivate *priv = gs_origin_popover_row_get_instance_private (row);
+
+       g_assert (priv->app == NULL);
+
+       priv->app = g_object_ref (app);
+       refresh_ui (row);
+}
+
+GsApp *
+gs_origin_popover_row_get_app (GsOriginPopoverRow *row)
+{
+       GsOriginPopoverRowPrivate *priv = gs_origin_popover_row_get_instance_private (row);
+       return priv->app;
+}
+
+void
+gs_origin_popover_row_set_selected (GsOriginPopoverRow *row, gboolean selected)
+{
+       GsOriginPopoverRowPrivate *priv = gs_origin_popover_row_get_instance_private (row);
+
+       gtk_widget_set_visible (priv->selected_image, selected);
+}
+
+static void
+gs_origin_popover_row_destroy (GtkWidget *object)
+{
+       GsOriginPopoverRow *row = GS_ORIGIN_POPOVER_ROW (object);
+       GsOriginPopoverRowPrivate *priv = gs_origin_popover_row_get_instance_private (row);
+
+       g_clear_object (&priv->app);
+
+       GTK_WIDGET_CLASS (gs_origin_popover_row_parent_class)->destroy (object);
+}
+
+static void
+gs_origin_popover_row_init (GsOriginPopoverRow *row)
+{
+       gtk_widget_init_template (GTK_WIDGET (row));
+}
+
+static void
+gs_origin_popover_row_class_init (GsOriginPopoverRowClass *klass)
+{
+       GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+       widget_class->destroy = gs_origin_popover_row_destroy;
+
+       gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/Software/gs-origin-popover-row.ui");
+
+       gtk_widget_class_bind_template_child_private (widget_class, GsOriginPopoverRow, name_label);
+       gtk_widget_class_bind_template_child_private (widget_class, GsOriginPopoverRow, url_box);
+       gtk_widget_class_bind_template_child_private (widget_class, GsOriginPopoverRow, url_label);
+       gtk_widget_class_bind_template_child_private (widget_class, GsOriginPopoverRow, format_box);
+       gtk_widget_class_bind_template_child_private (widget_class, GsOriginPopoverRow, format_label);
+       gtk_widget_class_bind_template_child_private (widget_class, GsOriginPopoverRow, selected_image);
+}
+
+GtkWidget *
+gs_origin_popover_row_new (GsApp *app)
+{
+       GsOriginPopoverRow *row = g_object_new (GS_TYPE_ORIGIN_POPOVER_ROW, NULL);
+       gs_origin_popover_row_set_app (row, app);
+       return GTK_WIDGET (row);
+}
+
+/* vim: set noexpandtab: */
diff --git a/src/gs-origin-popover-row.h b/src/gs-origin-popover-row.h
new file mode 100644
index 00000000..3c721fbf
--- /dev/null
+++ b/src/gs-origin-popover-row.h
@@ -0,0 +1,48 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2018 Kalev Lember <klember redhat com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef GS_ORIGIN_POPOVER_ROW_H
+#define GS_ORIGIN_POPOVER_ROW_H
+
+#include "gnome-software-private.h"
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define GS_TYPE_ORIGIN_POPOVER_ROW (gs_origin_popover_row_get_type ())
+
+G_DECLARE_DERIVABLE_TYPE (GsOriginPopoverRow, gs_origin_popover_row, GS, ORIGIN_POPOVER_ROW, GtkListBoxRow)
+
+struct _GsOriginPopoverRowClass
+{
+       GtkListBoxRowClass        parent_class;
+};
+
+GtkWidget      *gs_origin_popover_row_new              (GsApp                  *app);
+GsApp          *gs_origin_popover_row_get_app          (GsOriginPopoverRow     *row);
+void            gs_origin_popover_row_set_selected     (GsOriginPopoverRow     *row,
+                                                        gboolean                selected);
+
+G_END_DECLS
+
+#endif /* GS_ORIGIN_POPOVER_ROW_H */
+
+/* vim: set noexpandtab: */
diff --git a/src/gs-origin-popover-row.ui b/src/gs-origin-popover-row.ui
new file mode 100644
index 00000000..90171f52
--- /dev/null
+++ b/src/gs-origin-popover-row.ui
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <template class="GsOriginPopoverRow" parent="GtkListBoxRow">
+    <child>
+      <object class="GtkBox">
+        <property name="visible">True</property>
+        <property name="margin-top">18</property>
+        <property name="margin-bottom">18</property>
+        <property name="margin-start">18</property>
+        <property name="margin-end">18</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">horizontal</property>
+        <property name="spacing">16</property>
+        <child>
+          <object class="GtkBox" id="vbox">
+            <property name="visible">True</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="name_label">
+                <property name="visible">True</property>
+                <property name="halign">start</property>
+                <property name="ellipsize">end</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="url_box">
+                <property name="visible">True</property>
+                <property name="orientation">horizontal</property>
+                <property name="spacing">4</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes">URL</property>
+                    <style>
+                      <class name="app-row-origin-text"/>
+                      <class name="dim-label"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="url_label">
+                    <property name="visible">True</property>
+                    <property name="halign">start</property>
+                    <property name="ellipsize">end</property>
+                    <style>
+                      <class name="app-row-origin-text"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="format_box">
+                <property name="visible">True</property>
+                <property name="orientation">horizontal</property>
+                <property name="spacing">4</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes" comments="Translators: The packaging format of 
the app being installed, e.g. 'RPM' or 'Flatpak'">Format</property>
+                    <style>
+                      <class name="app-row-origin-text"/>
+                      <class name="dim-label"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="format_label">
+                    <property name="visible">True</property>
+                    <property name="halign">start</property>
+                    <property name="ellipsize">end</property>
+                    <style>
+                      <class name="app-row-origin-text"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkImage" id="selected_image">
+            <property name="visible">False</property>
+            <property name="can_focus">False</property>
+            <property name="pixel_size">16</property>
+            <property name="icon_name">object-select-symbolic</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/src/gs-shell.c b/src/gs-shell.c
index b5cceede..ca826714 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -264,6 +264,8 @@ gs_shell_change_mode (GsShell *shell,
        gtk_widget_hide (widget);
        widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "header_selection_menu_button"));
        gtk_widget_hide (widget);
+       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "origin_box"));
+       gtk_widget_hide (widget);
 
        priv->in_mode_change = TRUE;
        /* only show the search button in overview and search pages */
diff --git a/src/meson.build b/src/meson.build
index 2ea8f755..ebcaaa98 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -42,6 +42,7 @@ gnome_software_sources = [
   'gs-main.c',
   'gs-moderate-page.c',
   'gs-overview-page.c',
+  'gs-origin-popover-row.c',
   'gs-page.c',
   'gs-popular-tile.c',
   'gs-prefs-dialog.c',


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