[gnome-builder/wip/libide-merge] adjust focus when removing
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide-merge] adjust focus when removing
- Date: Thu, 19 Mar 2015 23:18:48 +0000 (UTC)
commit 7781331bdbb6e2705ebf682ad196dce6fa22048f
Author: Christian Hergert <christian hergert me>
Date: Thu Mar 19 16:18:29 2015 -0700
adjust focus when removing
src/views/gb-view-stack.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/views/gb-view-stack.c b/src/views/gb-view-stack.c
index 84ef9b4..364fae6 100644
--- a/src/views/gb-view-stack.c
+++ b/src/views/gb-view-stack.c
@@ -82,8 +82,15 @@ gb_view_stack_remove (GbViewStack *self,
if (controls)
gtk_container_remove (GTK_CONTAINER (self->controls_stack), controls);
gtk_container_remove (GTK_CONTAINER (self->stack), GTK_WIDGET (view));
+
if (self->focus_history)
- gtk_stack_set_visible_child (self->stack, self->focus_history->data);
+ {
+ GtkWidget *child;
+
+ child = self->focus_history->data;
+ gtk_stack_set_visible_child (self->stack, child);
+ gtk_widget_grab_focus (GTK_WIDGET (child));
+ }
else
g_signal_emit (self, gSignals [EMPTY], 0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]