--- gtkcellrenderertext.c.old	2005-11-11 11:25:08.000000000 +0300
+++ gtkcellrenderertext.c	2005-11-11 12:25:03.000000000 +0300
@@ -1424,6 +1424,8 @@ get_layout (GtkCellRendererText *celltex
   if (celltext->rise_set)
     add_attr (attr_list, pango_attr_rise_new (celltext->rise));
 
+  pango_layout_set_attributes (layout, attr_list);
+
   if (priv->ellipsize_set)
     pango_layout_set_ellipsize (layout, priv->ellipsize);
   else
@@ -1433,12 +1435,6 @@ get_layout (GtkCellRendererText *celltex
     {
       pango_layout_set_width (layout, priv->wrap_width * PANGO_SCALE);
       pango_layout_set_wrap (layout, priv->wrap_mode);
-
-      if (pango_layout_get_line_count (layout) == 1)
-	{
-	  pango_layout_set_width (layout, -1);
-	  pango_layout_set_wrap (layout, PANGO_WRAP_CHAR);
-	}
     }
   else
     {
@@ -1446,8 +1442,6 @@ get_layout (GtkCellRendererText *celltex
       pango_layout_set_wrap (layout, PANGO_WRAP_CHAR);
     }
 
-  pango_layout_set_attributes (layout, attr_list);
-
   pango_attr_list_unref (attr_list);
   
   return layout;
@@ -1512,6 +1506,9 @@ get_size (GtkCellRenderer *cell,
     g_object_ref (layout);
   else
     layout = get_layout (celltext, widget, FALSE, 0);
+    
+  if (priv->ellipsize_set)
+    pango_layout_set_width (layout, (cell_area->width - 2 * cell->xpad) * PANGO_SCALE);
 
   pango_layout_get_pixel_extents (layout, NULL, &rect);
 
@@ -1521,7 +1518,7 @@ get_size (GtkCellRenderer *cell,
   /* The minimum size for ellipsized labels is ~ 3 chars */
   if (width)
     {
-      if (priv->ellipsize || priv->width_chars > 0)
+      if (priv->ellipsize_set || priv->width_chars > 0)
 	{
 	  PangoContext *context;
 	  PangoFontMetrics *metrics;
@@ -1644,12 +1641,6 @@ gtk_cell_renderer_text_render (GtkCellRe
       cairo_destroy (cr);
     }
 
-  if (priv->ellipsize_set)
-    pango_layout_set_width (layout, 
-			    (cell_area->width - x_offset - 2 * cell->xpad) * PANGO_SCALE);
-  else if (priv->wrap_width == -1)
-    pango_layout_set_width (layout, -1);
-
   gtk_paint_layout (widget->style,
                     window,
                     state,
