2008-04-15 13:21:13 <timj@imendio.com>
authorTim Janik <timj@imendio.com>
Tue, 15 Apr 2008 11:24:10 +0000 (11:24 +0000)
committerTim Janik <timj@imendio.com>
Tue, 15 Apr 2008 11:24:10 +0000 (11:24 +0000)
* src/hildon-banner.c: refetch layout pointer after GtkLabel possibly
        recreated its layout, spotted by Kris. this fixes all remaining
        artefacts and stability issues with the banner code. in particular:
        Bug 83953 - Lock dialog is not visible when device is locked for the first time after flash

ChangeLog
src/hildon-banner.c

index 01017a1..f17aed5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-15 13:21:13    <timj@imendio.com>
+
+       * src/hildon-banner.c: refetch layout pointer after GtkLabel possibly
+       recreated its layout, spotted by Kris. this fixes all remaining
+       artefacts and stability issues with the banner code. in particular:
+       Bug 83953 - Lock dialog is not visible when device is locked for the first time after flash
+
 2008-04-14 16:52:59    <timj@imendio.com>
 
        * src/hildon-banner.c: guard force_to_wrap_truncated() against
index 5f4a1cf..b2fa6c3 100644 (file)
@@ -645,9 +645,6 @@ force_to_wrap_truncated                         (HildonBanner *banner)
 
     label = GTK_LABEL (priv->label);
 
-    if (!GTK_WIDGET_REALIZED (banner) || !GTK_WIDGET_REALIZED (label))
-      return;
-
     layout = gtk_label_get_layout (label);
 
     pango_layout_get_extents (layout, NULL, &logical);
@@ -667,10 +664,14 @@ force_to_wrap_truncated                         (HildonBanner *banner)
         priv->has_been_wrapped = TRUE;
     }
 
-    /* Make the label update its layout */
+    /* Make the label update its layout; and update our layout pointer
+     * because the layout will be cleared and refreshed.
+     */
     gtk_widget_set_size_request (GTK_WIDGET (label), width, height);
     gtk_widget_size_request (GTK_WIDGET (label), &requisition);
 
+    layout = gtk_label_get_layout (label);
+
     /* If the layout has now been wrapped and exceeds 3 lines, we truncate
      * the rest of the label according to spec.
      */