[gnome-initial-setup/shell/4765: 339/362] Always show the selected layout



commit 33a9c0a5c488805183fddc27166e12b2bf0a90ec
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Mon Feb 2 13:07:42 2015 +0100

    Always show the selected layout
    
    By default, only a small list of layouts are shown by default in the
    keyboard layout selection page, being the others hidden unless the
    "More" button is pressed.
    
    When user uses the keyboard layout detector, if the detected layout is
    in the hidden list, the user will not see the selected layout, unless
    they press the "More" button and scroll down.
    
    To ensure the layout is always shown, if the detected layout is in the
    hidden list, we switch the latest layout in the shown layouts list by
    the detected layout.
    
    [endlessm/eos-shell#3364]

 .../pages/keyboard/cc-input-chooser.c              |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c 
b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
index da5d884..38f88d8 100644
--- a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
+++ b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
@@ -284,6 +284,8 @@ sync_all_checkmarks (CcInputChooser *chooser)
 
         gtk_container_foreach (GTK_CONTAINER (priv->input_list),
                                sync_checkmark, chooser);
+
+        gtk_list_box_invalidate_filter (GTK_LIST_BOX (priv->input_list));
 }
 
 static GtkWidget *
@@ -417,6 +419,8 @@ input_visible (GtkListBoxRow *row,
                 return !priv->showing_extra && g_hash_table_size (priv->inputs) > MIN_ROWS;
 
         widget = get_input_widget (child);
+        if (g_strcmp0 (priv->id, widget->id) == 0)
+                return TRUE;
 
         if (!priv->showing_extra && widget->is_extra)
                 return FALSE;


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