2009-01-23 Alberto Garcia <agarcia@igalia.com>
authorAlberto Garcia <agarcia@igalia.com>
Fri, 23 Jan 2009 10:42:49 +0000 (10:42 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Fri, 23 Jan 2009 10:42:49 +0000 (10:42 +0000)
* 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
src/hildon-stackable-window.c
src/hildon-window-stack-private.h
src/hildon-window-stack.c

index 98a7454..f429f22 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2009-01-23  Alberto Garcia  <agarcia@igalia.com>
 
+       * 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  <agarcia@igalia.com>
+
        * src/hildon-time-selector.c (hildon_time_selector_init): Remove
        unused variable.
 
index 84e0c58..a040465 100644 (file)
@@ -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
index 49a619f..fb453b6 100644 (file)
@@ -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__ */
index 3a9cfdb..419aba0 100644 (file)
@@ -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)
 {