[gnome-software] Improve keynav on the details page
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Improve keynav on the details page
- Date: Tue, 8 Oct 2013 01:05:50 +0000 (UTC)
commit 3586c4f51a5bc89f3a77a2fc829c52354125e37a
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Oct 7 20:58:43 2013 -0400
Improve keynav on the details page
Arrange things so Page Up/Down work to scroll the list when
the details page appears. Also keep the focus widget in view
when tabbing around.
src/gnome-software.ui | 2 +-
src/gs-shell-details.c | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-software.ui b/src/gnome-software.ui
index 73465a9..cf77ce1 100644
--- a/src/gnome-software.ui
+++ b/src/gnome-software.ui
@@ -692,7 +692,7 @@
<object class="GtkScrolledWindow" id="scrolledwindow_details">
<property name="visible">True</property>
<property name="shadow_type">none</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">automatic</property>
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index eb2f919..a2de051 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -166,6 +166,9 @@ gs_shell_details_refresh (GsShellDetails *shell_details)
g_assert_not_reached ();
}
}
+
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "scrolledwindow_details"));
+ gs_grab_focus_when_mapped (widget);
}
/**
@@ -621,6 +624,7 @@ gs_shell_details_setup (GsShellDetails *shell_details,
GtkWidget *widget;
GtkListBox *list_box;
GtkWidget *sw;
+ GtkAdjustment *adj;
g_return_if_fail (GS_IS_SHELL_DETAILS (shell_details));
@@ -664,6 +668,12 @@ gs_shell_details_setup (GsShellDetails *shell_details,
widget = gtk_scrolled_window_get_vscrollbar (GTK_SCROLLED_WINDOW (sw));
g_signal_connect (widget, "map", G_CALLBACK (scrollbar_mapped_cb), sw);
g_signal_connect (widget, "unmap", G_CALLBACK (scrollbar_mapped_cb), sw);
+
+ sw = GTK_WIDGET (gtk_builder_get_object (priv->builder, "scrolledwindow_details"));
+ adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sw));
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "box_details"));
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (widget), adj);
+
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]