From ae4781b028cefc079cbf1326457064eede4f5b95 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Tue, 15 Apr 2008 11:24:10 +0000 Subject: [PATCH] 2008-04-15 13:21:13 * 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 | 7 +++++++ src/hildon-banner.c | 9 +++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 01017a1..f17aed5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-15 13:21:13 + + * 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 * src/hildon-banner.c: guard force_to_wrap_truncated() against diff --git a/src/hildon-banner.c b/src/hildon-banner.c index 5f4a1cf..b2fa6c3 100644 --- a/src/hildon-banner.c +++ b/src/hildon-banner.c @@ -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. */ -- 1.7.9.5