[gnome-builder/wip/chergert/layout] layout: fix open-in-new-frame action
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/layout] layout: fix open-in-new-frame action
- Date: Wed, 5 Jul 2017 13:15:41 +0000 (UTC)
commit cf61f05a724ca5a268229c1a8dfee17a5cfc8757
Author: Christian Hergert <chergert redhat com>
Date: Wed Jul 5 06:15:11 2017 -0700
layout: fix open-in-new-frame action
We were still treating the stack as the child of the grid rather
than the intermediate column.
libide/layout/ide-layout-stack-actions.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libide/layout/ide-layout-stack-actions.c b/libide/layout/ide-layout-stack-actions.c
index 6aa66fa..4eaf029 100644
--- a/libide/layout/ide-layout-stack-actions.c
+++ b/libide/layout/ide-layout-stack-actions.c
@@ -132,6 +132,7 @@ ide_layout_stack_actions_open_in_new_frame (GSimpleAction *action,
IdeLayoutView *view;
IdeLayoutStack *dest;
GtkWidget *grid;
+ GtkWidget *column;
gint index = 0;
g_assert (G_IS_SIMPLE_ACTION (action));
@@ -156,7 +157,12 @@ ide_layout_stack_actions_open_in_new_frame (GSimpleAction *action,
g_return_if_fail (grid != NULL);
g_return_if_fail (IDE_IS_LAYOUT_GRID (grid));
- gtk_container_child_get (GTK_CONTAINER (grid), GTK_WIDGET (self),
+ column = gtk_widget_get_ancestor (GTK_WIDGET (self), IDE_TYPE_LAYOUT_GRID_COLUMN);
+
+ g_return_if_fail (column != NULL);
+ g_return_if_fail (IDE_IS_LAYOUT_GRID_COLUMN (column));
+
+ gtk_container_child_get (GTK_CONTAINER (grid), GTK_WIDGET (column),
"index", &index,
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]