[gnome-software] overview: Disable featured banner if no featured apps
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] overview: Disable featured banner if no featured apps
- Date: Wed, 4 Dec 2019 16:08:47 +0000 (UTC)
commit 170c3aad499c86a1d64295121020721777486203
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Dec 4 15:32:23 2019 +1300
overview: Disable featured banner if no featured apps
src/gs-overview-page.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/gs-overview-page.c b/src/gs-overview-page.c
index f7d3661a..a3720462 100644
--- a/src/gs-overview-page.c
+++ b/src/gs-overview-page.c
@@ -45,6 +45,7 @@ typedef struct
GtkWidget *infobar_third_party;
GtkWidget *label_third_party;
+ GtkWidget *overlay;
GtkWidget *stack_featured;
GtkWidget *button_featured_back;
GtkWidget *button_featured_forwards;
@@ -457,6 +458,7 @@ gs_overview_page_get_featured_cb (GObject *source_object,
gtk_widget_hide (priv->featured_heading);
gs_container_remove_all (GTK_CONTAINER (priv->stack_featured));
+ gtk_widget_set_visible (priv->overlay, gs_app_list_length (list) > 0);
gtk_widget_set_visible (priv->button_featured_back, gs_app_list_length (list) > 1);
gtk_widget_set_visible (priv->button_featured_forwards, gs_app_list_length (list) > 1);
if (list == NULL) {
@@ -1039,6 +1041,7 @@ gs_overview_page_class_init (GsOverviewPageClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GsOverviewPage, infobar_third_party);
gtk_widget_class_bind_template_child_private (widget_class, GsOverviewPage, label_third_party);
+ gtk_widget_class_bind_template_child_private (widget_class, GsOverviewPage, overlay);
gtk_widget_class_bind_template_child_private (widget_class, GsOverviewPage, stack_featured);
gtk_widget_class_bind_template_child_private (widget_class, GsOverviewPage, button_featured_back);
gtk_widget_class_bind_template_child_private (widget_class, GsOverviewPage, button_featured_forwards);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]