+2004-08-23 Matthias Clasen <mclasen@redhat.com>
+
+ Fix #150822, reported by Christian Persch
+
+ * gtk/gtklabel.c (gtk_label_ensure_layout): Set the layout width
+ appropriately when ellipsized.
+ (gtk_label_size_allocate): Only set the layout width if there
+ is a layout.
+
2004-08-23 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_focus): Support the latest
+2004-08-23 Matthias Clasen <mclasen@redhat.com>
+
+ Fix #150822, reported by Christian Persch
+
+ * gtk/gtklabel.c (gtk_label_ensure_layout): Set the layout width
+ appropriately when ellipsized.
+ (gtk_label_size_allocate): Only set the layout width if there
+ is a layout.
+
2004-08-23 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_focus): Support the latest
+2004-08-23 Matthias Clasen <mclasen@redhat.com>
+
+ Fix #150822, reported by Christian Persch
+
+ * gtk/gtklabel.c (gtk_label_ensure_layout): Set the layout width
+ appropriately when ellipsized.
+ (gtk_label_size_allocate): Only set the layout width if there
+ is a layout.
+
2004-08-23 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_focus): Support the latest
+2004-08-23 Matthias Clasen <mclasen@redhat.com>
+
+ Fix #150822, reported by Christian Persch
+
+ * gtk/gtklabel.c (gtk_label_ensure_layout): Set the layout width
+ appropriately when ellipsized.
+ (gtk_label_size_allocate): Only set the layout width if there
+ is a layout.
+
2004-08-23 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_focus): Support the latest
pango_layout_set_alignment (label->layout, align);
pango_layout_set_ellipsize (label->layout, label->ellipsize);
- if (label->wrap)
+ if (label->ellipsize)
+ pango_layout_set_width (label->layout,
+ widget->allocation.width * PANGO_SCALE);
+ else if (label->wrap)
{
GtkWidgetAuxInfo *aux_info;
gint longest_paragraph;
pango_layout_set_width (label->layout, width);
}
}
- else /* !label->wrap */
+ else /* !label->wrap */
pango_layout_set_width (label->layout, -1);
}
}
(* GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation);
if (label->ellipsize)
- pango_layout_set_width (label->layout, allocation->width * PANGO_SCALE);
+ {
+ if (label->layout)
+ pango_layout_set_width (label->layout, allocation->width * PANGO_SCALE);
+ }
if (label->select_info && label->select_info->window)
{