[gnome-software] Show the empty stack contents when there are no sources to show



commit 3a02ec4890d9d29fc8fd5f0dbd86f74a9c1e408a
Author: Richard Hughes <richard hughsie com>
Date:   Tue Nov 21 20:35:50 2017 +0000

    Show the empty stack contents when there are no sources to show
    
    On a stock F27 install there are no optional repos and thus nothing to show in
    the sources dialog.

 src/gs-sources-dialog.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-sources-dialog.c b/src/gs-sources-dialog.c
index 94a5d2c..862619e 100644
--- a/src/gs-sources-dialog.c
+++ b/src/gs-sources-dialog.c
@@ -338,6 +338,8 @@ get_sources_cb (GsPluginLoader *plugin_loader,
        /* no results */
        if (gs_app_list_length (list) == 0) {
                g_debug ("no sources to show");
+               gtk_stack_set_visible_child_name (GTK_STACK (dialog->stack), "empty");
+               gtk_style_context_add_class (gtk_widget_get_style_context (dialog->label_header), 
"dim-label");
                return;
        }
 


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