[gnome-initial-setup/shell/4765: 288/362] Add button for keyboard layout detection
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/shell/4765: 288/362] Add button for keyboard layout detection
- Date: Thu, 19 Mar 2015 01:45:17 +0000 (UTC)
commit cd557cdd57c34e9da22f39fa3705533e977f19b8
Author: Roddy Shuler <roddy endlessm com>
Date: Tue Dec 2 15:55:34 2014 -0800
Add button for keyboard layout detection
Still needs to launch the actual detection heuristic.
Currently just prints a test message to standard out.
[endlessm/eos-shell#3425]
.../pages/keyboard/gis-keyboard-page.c | 12 +++++++++
.../pages/keyboard/gis-keyboard-page.ui | 25 ++++++++++++++++++++
2 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
index fd87ff8..0a01ba1 100644
--- a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
+++ b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
@@ -68,6 +68,7 @@ struct _GisKeyboardPagePrivate {
GtkWidget *remove_input;
GtkWidget *show_config;
GtkWidget *show_layout;
+ GtkWidget *auto_detect;
GtkWidget *input_scrolledwindow;
GList *selected_input_sorted;
guint n_input_rows;
@@ -954,6 +955,14 @@ show_selected_layout (GisKeyboardPage *self)
}
static void
+auto_detect (GisKeyboardPage *self)
+{
+ GisKeyboardPagePrivate *priv = gis_keyboard_page_get_instance_private (self);
+ /* TODO Incorporate the keyboard detection heuristic */
+ printf("auto_detect\n");
+}
+
+static void
add_default_input_source_for_locale (GisKeyboardPage *self)
{
const gchar *locale;
@@ -997,6 +1006,7 @@ setup_input_section (GisKeyboardPage *self)
priv->remove_input = WID ("input_source_remove");
priv->show_config = WID ("input_source_config");
priv->show_layout = WID ("input_source_layout");
+ priv->auto_detect = WID ("input_auto_detect");
priv->input_scrolledwindow = WID ("input_scrolledwindow");
g_signal_connect_swapped (priv->add_input, "clicked",
@@ -1007,6 +1017,8 @@ setup_input_section (GisKeyboardPage *self)
G_CALLBACK (show_selected_settings), self);
g_signal_connect_swapped (priv->show_layout, "clicked",
G_CALLBACK (show_selected_layout), self);
+ g_signal_connect_swapped (priv->auto_detect, "clicked",
+ G_CALLBACK (auto_detect), self);
egg_list_box_set_selection_mode (EGG_LIST_BOX (priv->input_list),
GTK_SELECTION_SINGLE);
diff --git a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.ui
b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.ui
index 5f64cff..f26e054 100644
--- a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.ui
+++ b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.ui
@@ -224,6 +224,31 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkButtonBox" id="i_a_d_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkButton" id="input_auto_detect">
+ <property name="label" translatable="yes">Help detect my keyboard layout</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">10</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]