diff options
author | Alberto Garcia <agarcia@igalia.com> | 2009-06-18 17:11:36 +0200 |
---|---|---|
committer | Alberto Garcia <agarcia@igalia.com> | 2009-06-18 17:43:25 +0200 |
commit | a010945fb1d11cfd15a7ea4d54437c80ebe6d42c (patch) | |
tree | e9674f96851d3bad77e3a54ce8e6cda318e09f29 | |
parent | a95518229100c97750b19c9308a2d30000461ef5 (diff) |
Use the index of the previous window to calculate the new stack index
* hildon/hildon-window-stack.c (_hildon_window_stack_do_push):
Use the index of the previous window rather than the stack length
to calculate the new index.
Fixes: NB#122389
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | hildon/hildon-window-stack.c | 7 |
2 files changed, 14 insertions, 1 deletions
@@ -1,3 +1,11 @@ +2009-06-18 Alberto Garcia <agarcia@igalia.com> + + * hildon/hildon-window-stack.c (_hildon_window_stack_do_push): + Use the index of the previous window rather than the stack length + to calculate the new index. + + Fixes: NB#122389 + 2009-06-17 Alejandro Pinheiro <apinheiro@igalia.com> * hildon/hildon-date-selector.c diff --git a/hildon/hildon-window-stack.c b/hildon/hildon-window-stack.c index f720818..a7a6182 100644 --- a/hildon/hildon-window-stack.c +++ b/hildon/hildon-window-stack.c @@ -285,9 +285,14 @@ _hildon_window_stack_do_push (HildonWindowStack *stack, if (current_stack == NULL) { GtkWidget *parent = hildon_window_stack_peek (stack); + gint pos = 0; + + if (parent) { + pos = HILDON_STACKABLE_WINDOW_GET_PRIVATE (parent)->stack_position + 1; + } /* Push the window */ - hildon_stackable_window_set_stack (win, stack, g_list_length (stack->priv->list)); + hildon_stackable_window_set_stack (win, stack, pos); stack->priv->list = g_list_prepend (stack->priv->list, win); /* Make the window part of the same group as its parent */ |