[maemo-commits] [maemo-commits] r15391 - in projects/haf/trunk/hildon-1: . src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Apr 14 17:58:20 EEST 2008
Author: timj
Date: 2008-04-14 17:57:44 +0300 (Mon, 14 Apr 2008)
New Revision: 15391

Modified:
   projects/haf/trunk/hildon-1/ChangeLog
   projects/haf/trunk/hildon-1/src/hildon-banner-private.h
   projects/haf/trunk/hildon-1/src/hildon-banner.c
Log:
2008-04-14 16:52:59    <timj at 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.




Modified: projects/haf/trunk/hildon-1/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-1/ChangeLog	2008-04-11 13:36:26 UTC (rev 15390)
+++ projects/haf/trunk/hildon-1/ChangeLog	2008-04-14 14:57:44 UTC (rev 15391)
@@ -1,3 +1,11 @@
+2008-04-14 16:52:59    <timj at 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 at imendio.com>
 
 	Fixes: NB#77775: Media Player, Save Now playing list, too long name

Modified: projects/haf/trunk/hildon-1/src/hildon-banner-private.h
===================================================================
--- projects/haf/trunk/hildon-1/src/hildon-banner-private.h	2008-04-11 13:36:26 UTC (rev 15390)
+++ projects/haf/trunk/hildon-1/src/hildon-banner-private.h	2008-04-14 14:57:44 UTC (rev 15391)
@@ -39,11 +39,9 @@
     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 */

Modified: projects/haf/trunk/hildon-1/src/hildon-banner.c
===================================================================
--- projects/haf/trunk/hildon-1/src/hildon-banner.c	2008-04-11 13:36:26 UTC (rev 15390)
+++ projects/haf/trunk/hildon-1/src/hildon-banner.c	2008-04-14 14:57:44 UTC (rev 15391)
@@ -641,10 +641,13 @@
     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);


More information about the maemo-commits mailing list