[gnome-initial-setup/wip/pwithnall/misc-fixes: 23/70] input-chooser: Always show the selected layout




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

    input-chooser: 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.
    
    (Rebase 3.38: This could potentially be dropped in future if we update
    cc-input-chooser.c from gnome-control-center; it’s copy/paste code.)
    
    https://phabricator.endlessm.com/T3364

 gnome-initial-setup/pages/keyboard/cc-input-chooser.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c 
b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
index bcd5407a..f6f24ec7 100644
--- a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
+++ b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
@@ -424,6 +424,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]