[gnome-control-center] keyboard: Improve shortcuts tab keynav
- From: StÃphane DÃmurget <stef src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] keyboard: Improve shortcuts tab keynav
- Date: Tue, 18 Dec 2012 11:18:37 +0000 (UTC)
commit 0e7192e6761c2d2b7a5e8f4ae50548030c69f4f1
Author: StÃphane DÃmurget <stephane demurget free fr>
Date: Tue Dec 18 00:04:16 2012 +0100
keyboard: Improve shortcuts tab keynav
The default focus traversal order inside the shortcuts tab was: the
shortcuts treeview, the section treeview and the shortcuts toolbar.
We set a focus cycle chain to swap the treeviews order for the keynav to
be more natural.
https://bugzilla.gnome.org/show_bug.cgi?id=690387
panels/keyboard/gnome-keyboard-panel.ui | 2 +-
panels/keyboard/keyboard-shortcuts.c | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/panels/keyboard/gnome-keyboard-panel.ui b/panels/keyboard/gnome-keyboard-panel.ui
index 95f01a2..ed2926a 100644
--- a/panels/keyboard/gnome-keyboard-panel.ui
+++ b/panels/keyboard/gnome-keyboard-panel.ui
@@ -676,7 +676,7 @@
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkTable" id="table11">
+ <object class="GtkTable" id="shortcuts_table">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
diff --git a/panels/keyboard/keyboard-shortcuts.c b/panels/keyboard/keyboard-shortcuts.c
index f034da7..0dd7539 100644
--- a/panels/keyboard/keyboard-shortcuts.c
+++ b/panels/keyboard/keyboard-shortcuts.c
@@ -1677,6 +1677,8 @@ setup_dialog (CcPanel *panel, GtkBuilder *builder)
GtkWidget *widget;
GtkTreeView *treeview;
GtkTreeSelection *selection;
+ GtkTable *table;
+ GList *focus_chain;
CcShell *shell;
GtkListStore *model;
GtkTreeModelSort *sort_model;
@@ -1793,6 +1795,15 @@ setup_dialog (CcPanel *panel, GtkBuilder *builder)
context = gtk_widget_get_style_context (widget);
gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP);
+ /* set up the focus chain */
+ focus_chain = g_list_append (NULL, WID (builder, "sections_swindow"));
+ focus_chain = g_list_append (focus_chain, WID (builder, "actions_swindow"));
+ focus_chain = g_list_append (focus_chain, WID (builder, "shortcut-toolbar"));
+
+ table = GTK_TABLE (gtk_builder_get_object (builder, "shortcuts_table"));
+ gtk_container_set_focus_chain (GTK_CONTAINER (table), focus_chain);
+ g_list_free (focus_chain);
+
/* set up the dialog */
shell = cc_panel_get_shell (CC_PANEL (panel));
widget = cc_shell_get_toplevel (shell);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]