From 121ab06e6fc722a5c7347e1e7243a272ce878526 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Fri, 23 Jan 2009 10:42:49 +0000 Subject: [PATCH] 2009-01-23 Alberto Garcia * src/hildon-window-stack-private.h * src/hildon-window-stack.c * src/hildon-stackable-window.c (hildon_stackable_window_show): Avoid calling gtk_widget_show() again indirectly from hildon_stackable_window_show() --- ChangeLog | 8 ++++++++ src/hildon-stackable-window.c | 6 +++--- src/hildon-window-stack-private.h | 4 ++++ src/hildon-window-stack.c | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98a7454..f429f22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-01-23 Alberto Garcia + * src/hildon-window-stack-private.h + * src/hildon-window-stack.c + * src/hildon-stackable-window.c (hildon_stackable_window_show): + Avoid calling gtk_widget_show() again indirectly from + hildon_stackable_window_show() + +2009-01-23 Alberto Garcia + * src/hildon-time-selector.c (hildon_time_selector_init): Remove unused variable. diff --git a/src/hildon-stackable-window.c b/src/hildon-stackable-window.c index 84e0c58..a040465 100644 --- a/src/hildon-stackable-window.c +++ b/src/hildon-stackable-window.c @@ -253,10 +253,10 @@ hildon_stackable_window_show (GtkWidget *widget) /* Stack the window if not already stacked */ if (priv->stack == NULL) { HildonWindowStack *stack = hildon_window_stack_get_default (); - hildon_window_stack_push_1 (stack, HILDON_STACKABLE_WINDOW (widget)); - } else { - GTK_WIDGET_CLASS (hildon_stackable_window_parent_class)->show (widget); + _hildon_window_stack_do_push (stack, HILDON_STACKABLE_WINDOW (widget)); } + + GTK_WIDGET_CLASS (hildon_stackable_window_parent_class)->show (widget); } static void diff --git a/src/hildon-window-stack-private.h b/src/hildon-window-stack-private.h index 49a619f..fb453b6 100644 --- a/src/hildon-window-stack-private.h +++ b/src/hildon-window-stack-private.h @@ -28,6 +28,10 @@ G_BEGIN_DECLS void G_GNUC_INTERNAL hildon_window_stack_remove (HildonStackableWindow *win); +gboolean G_GNUC_INTERNAL +_hildon_window_stack_do_push (HildonWindowStack *stack, + HildonStackableWindow *win); + G_END_DECLS #endif /* __HILDON_WINDOW_STACK_PRIVATE_H__ */ diff --git a/src/hildon-window-stack.c b/src/hildon-window-stack.c index 3a9cfdb..419aba0 100644 --- a/src/hildon-window-stack.c +++ b/src/hildon-window-stack.c @@ -207,7 +207,11 @@ hildon_window_stack_peek (HildonWindowStack *stack) return win; } -static gboolean +/* This function does everything to push a window to the stack _but_ + * actually calling gtk_widget_show(). + * It's up to each specific push function to decide the order in which + * to show windows. */ +gboolean G_GNUC_INTERNAL _hildon_window_stack_do_push (HildonWindowStack *stack, HildonStackableWindow *win) { -- 1.7.9.5