2008-04-14 16:52:59 <timj@imendio.com>
authorTim Janik <timj@imendio.com>
Mon, 14 Apr 2008 14:57:44 +0000 (14:57 +0000)
committerTim Janik <timj@imendio.com>
Mon, 14 Apr 2008 14:57:44 +0000 (14:57 +0000)
* src/hildon-banner.c: guard force_to_wrap_truncated() against
        operating on unrealized widgets, fixes:
        Bug 83953 - Lock dialog is not visible when device is locked for the first time after flash

        * src/hildon-banner-private.h: coalesce boolean fields into bitfield.

ChangeLog
src/hildon-banner-private.h
src/hildon-banner.c

index 35aaecb..01017a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-04-14 16:52:59    <timj@imendio.com>
+
+       * src/hildon-banner.c: guard force_to_wrap_truncated() against
+       operating on unrealized widgets, fixes:
+       Bug 83953 - Lock dialog is not visible when device is locked for the first time after flash
+
+       * src/hildon-banner-private.h: coalesce boolean fields into bitfield.
+
 2008-04-09  Kristian Rietveld  <kris@imendio.com>
 
        Fixes: NB#77775: Media Player, Save Now playing list, too long name
index 1e805ce..6ced54e 100644 (file)
@@ -39,11 +39,9 @@ struct                                          _HildonBannerPrivate
     GtkWidget *label;
     GtkWidget *layout;
     guint timeout_id;
-    gboolean is_timed;
+    guint    is_timed : 1, has_been_wrapped : 1, has_been_truncated : 1;
     guint    timeout;
     GtkWindow *parent;
-    gboolean has_been_wrapped;
-    gboolean has_been_truncated;
 };
 
 /* For internal use of hildon libraries only */
index d711f7a..5f4a1cf 100644 (file)
@@ -641,10 +641,13 @@ force_to_wrap_truncated                         (HildonBanner *banner)
     GtkRequisition requisition;
     HildonBannerPrivate *priv = HILDON_BANNER_GET_PRIVATE (banner);
 
-    g_assert (priv);
+    g_return_if_fail (priv);
 
     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);