[gnome-builder] buildui: implement grab-focus for build perspective
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] buildui: implement grab-focus for build perspective
- Date: Sun, 23 Jul 2017 02:01:21 +0000 (UTC)
commit 5a60103882d6ae97347923a2911e47771d045367
Author: Christian Hergert <chergert redhat com>
Date: Sat Jul 22 18:52:23 2017 -0700
buildui: implement grab-focus for build perspective
This just focuses the listbox by default.
libide/buildui/ide-build-perspective.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/libide/buildui/ide-build-perspective.c b/libide/buildui/ide-build-perspective.c
index 039e527..3b10b9d 100644
--- a/libide/buildui/ide-build-perspective.c
+++ b/libide/buildui/ide-build-perspective.c
@@ -255,6 +255,16 @@ delete_configuration (GSimpleAction *action,
}
static void
+ide_build_perspective_grab_focus (GtkWidget *widget)
+{
+ IdeBuildPerspective *self = (IdeBuildPerspective *)widget;
+
+ g_assert (IDE_IS_BUILD_PERSPECTIVE (self));
+
+ gtk_widget_child_focus (GTK_WIDGET (self->list_box), GTK_DIR_TAB_FORWARD);
+}
+
+static void
ide_build_perspective_finalize (GObject *object)
{
IdeBuildPerspective *self = (IdeBuildPerspective *)object;
@@ -320,6 +330,8 @@ ide_build_perspective_class_init (IdeBuildPerspectiveClass *klass)
object_class->get_property = ide_build_perspective_get_property;
object_class->set_property = ide_build_perspective_set_property;
+ widget_class->grab_focus = ide_build_perspective_grab_focus;
+
properties [PROP_CONFIGURATION_MANAGER] =
g_param_spec_object ("configuration-manager",
"Configuration Manager",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]