Index: gtktextdisplay.c
===================================================================
--- gtktextdisplay.c	(revisão 17234)
+++ gtktextdisplay.c	(cópia de trabalho)
@@ -104,6 +104,8 @@
   GdkRectangle clip_rect;
   
   GdkColor *error_color;	/* Error underline color for this widget */
+  GdkColor *underline_color;    /* Underline color. Equal to error_color when this is seted */
+  GdkColor *strikethrough_color;
   GList *widgets;		/* widgets encountered when drawing */
   
   gboolean selected;
@@ -172,13 +174,46 @@
   return NULL;
 }
 
+static GdkColor *
+text_renderer_get_strikethrough_color (PangoRenderer *pango_renderer,
+                                       PangoLayoutRun *run)
+{
+
+  GtkTextRenderer* text_renderer = GTK_TEXT_RENDERER (pango_renderer);
+  GtkTextAppearance *appearance;
+
+  appearance = get_item_appearance (run->item);
+  g_assert (appearance != NULL);
+
+  text_renderer->strikethrough_color = gdk_color_copy (&appearance->strikethrough_color);
+
+  return text_renderer->strikethrough_color;
+}
+
+static GdkColor *
+text_renderer_get_underline_color (PangoRenderer *pango_renderer,
+                                   PangoLayoutRun *run)
+{
+
+  GtkTextRenderer* text_renderer = GTK_TEXT_RENDERER (pango_renderer);
+  GtkTextAppearance *appearance;
+
+  appearance = get_item_appearance (run->item);
+  g_assert (appearance != NULL);
+
+  if (!text_renderer->underline_color)
+    text_renderer->underline_color = gdk_color_copy (&appearance->underline_color);
+
+  return text_renderer->underline_color;
+}
+
 static void
 gtk_text_renderer_prepare_run (PangoRenderer  *renderer,
 			       PangoLayoutRun *run)
 {
   GtkTextRenderer *text_renderer = GTK_TEXT_RENDERER (renderer);
   GdkPangoRenderer *gdk_renderer = GDK_PANGO_RENDERER (renderer);
-  GdkColor *bg_color, *fg_color, *underline_color;
+  GdkColor *bg_color, *fg_color, *strikethrough_color, *underline_color;
   GdkPixmap *fg_stipple, *bg_stipple;
   GtkTextAppearance *appearance;
 
@@ -205,13 +240,15 @@
     fg_color = &appearance->fg_color;
 
   text_renderer_set_gdk_color (text_renderer, PANGO_RENDER_PART_FOREGROUND, fg_color);
-  text_renderer_set_gdk_color (text_renderer, PANGO_RENDER_PART_STRIKETHROUGH, fg_color);
 
-  if (appearance->underline == PANGO_UNDERLINE_ERROR)
-    underline_color = text_renderer_get_error_color (text_renderer);
-  else
-    underline_color = fg_color;
+  strikethrough_color = text_renderer_get_strikethrough_color (renderer, run);
+  text_renderer_set_gdk_color (text_renderer, PANGO_RENDER_PART_STRIKETHROUGH, strikethrough_color);
 
+/*   if (appearance->underline == PANGO_UNDERLINE_ERROR) */
+/*     underline_color = text_renderer_get_error_color (text_renderer); */
+
+  underline_color = text_renderer_get_underline_color (renderer, run);
+
   text_renderer_set_gdk_color (text_renderer, PANGO_RENDER_PART_UNDERLINE, underline_color);
 
   fg_stipple = appearance->fg_stipple;
@@ -397,6 +434,18 @@
       text_renderer->error_color = NULL;
     }
 
+  if (text_renderer->underline_color)
+    {
+      gdk_color_free (text_renderer->underline_color);
+      text_renderer->underline_color = NULL;
+    }
+
+  if (text_renderer->strikethrough_color)
+    {
+      gdk_color_free (text_renderer->strikethrough_color);
+      text_renderer->strikethrough_color = NULL;
+    }
+
   gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (text_renderer), NULL);
   gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (text_renderer), NULL);
 
Index: gtktexttag.c
===================================================================
--- gtktexttag.c	(revisão 17234)
+++ gtktexttag.c	(cópia de trabalho)
@@ -97,8 +97,12 @@
   PROP_LEFT_MARGIN,
   PROP_INDENT,
   PROP_STRIKETHROUGH,
+  PROP_STRIKETHROUGH_COLOR,
+  PROP_STRIKETHROUGH_COLOR_GDK,
   PROP_RIGHT_MARGIN,
   PROP_UNDERLINE,
+  PROP_UNDERLINE_COLOR,
+  PROP_UNDERLINE_COLOR_GDK,
   PROP_RISE,
   PROP_BACKGROUND_FULL_HEIGHT,
   PROP_LANGUAGE,
@@ -128,8 +132,10 @@
   PROP_LEFT_MARGIN_SET,
   PROP_INDENT_SET,
   PROP_STRIKETHROUGH_SET,
+  PROP_STRIKETHROUGH_COLOR_SET,
   PROP_RIGHT_MARGIN_SET,
   PROP_UNDERLINE_SET,
+  PROP_UNDERLINE_COLOR_SET,
   PROP_RISE_SET,
   PROP_BACKGROUND_FULL_HEIGHT_SET,
   PROP_LANGUAGE_SET,
@@ -456,8 +462,24 @@
                                                          P_("Whether to strike through the text"),
                                                          FALSE,
                                                          GTK_PARAM_READWRITE));
+
+  g_object_class_install_property (object_class,
+                                   PROP_STRIKETHROUGH_COLOR,
+                                   g_param_spec_string ("strikethrough-color",
+                                                        P_("Strikethrough color"),
+                                                        P_("Strike through color as a string"),
+                                                        NULL,
+                                                        GTK_PARAM_READWRITE));
   
   g_object_class_install_property (object_class,
+                                   PROP_STRIKETHROUGH_COLOR_GDK,
+                                   g_param_spec_boxed ("strikethrough-color-gdk",
+                                                       P_("Strikethrough color"),
+                                                       P_("Color of the strike through the text as a string"),
+                                                       GDK_TYPE_COLOR,
+                                                       GTK_PARAM_READWRITE));
+
+  g_object_class_install_property (object_class,
                                    PROP_UNDERLINE,
                                    g_param_spec_enum ("underline",
                                                       P_("Underline"),
@@ -465,6 +487,23 @@
                                                       PANGO_TYPE_UNDERLINE,
                                                       PANGO_UNDERLINE_NONE,
                                                       GTK_PARAM_READWRITE));
+
+
+  g_object_class_install_property (object_class,
+                                   PROP_UNDERLINE_COLOR,
+                                   g_param_spec_string ("underline-color",
+                                                        P_("Underline color"),
+                                                        P_("Underline color as a string"),
+                                                        NULL,
+                                                        GTK_PARAM_READWRITE));
+
+  g_object_class_install_property (object_class,
+                                   PROP_UNDERLINE_COLOR_GDK,
+                                   g_param_spec_boxed ("underline-color-gdk",
+                                                       P_("Underline color"),
+                                                       P_("Underline color as GdkColor"),
+                                                       GDK_TYPE_COLOR,
+                                                       GTK_PARAM_READWRITE));
   
   g_object_class_install_property (object_class,
                                    PROP_WRAP_MODE,
@@ -626,6 +665,10 @@
                 P_("Strikethrough set"),
                 P_("Whether this tag affects strikethrough"));
   
+  ADD_SET_PROP ("strikethrough-color-set", PROP_STRIKETHROUGH_COLOR_SET,
+                P_("Strikethrough color set"),
+                P_("Whether this tag affects strikethrough-color"));
+
   ADD_SET_PROP ("right-margin-set", PROP_RIGHT_MARGIN_SET,
                 P_("Right margin set"),
                 P_("Whether this tag affects the right margin"));
@@ -634,6 +677,10 @@
                 P_("Underline set"),
                 P_("Whether this tag affects underlining"));
 
+  ADD_SET_PROP ("underline-color-set", PROP_UNDERLINE_COLOR_SET,
+                P_("Underline color set"),
+                P_("Whether this tag affects underlining color"));
+
   ADD_SET_PROP ("wrap-mode-set", PROP_WRAP_MODE_SET,
                 P_("Wrap mode set"),
                 P_("Whether this tag affects line wrap mode"));
@@ -785,6 +832,53 @@
     }
 }
 
+static void
+set_strikethrough_color (GtkTextTag *tag, GdkColor *color)
+{
+  if (color)
+    {
+      if (!tag->strikethrough_color_set)
+        {
+          tag->strikethrough_color_set = TRUE;
+          g_object_notify (G_OBJECT (tag), "strikethrough-color-set");
+        }
+      
+      tag->values->appearance.strikethrough_color = *color;
+    }
+  else
+    {
+      if (tag->strikethrough_color_set)
+        {
+          tag->strikethrough_color_set = FALSE;
+          g_object_notify (G_OBJECT (tag), "strikethrough-color-set");
+        }
+    }
+}
+
+static void
+set_underline_color (GtkTextTag *tag, GdkColor *color)
+{
+  if (color)
+    {
+      if (!tag->underline_color_set)
+        {
+          tag->underline_color_set = TRUE;
+          g_object_notify (G_OBJECT (tag), "underline-color-set");
+        }
+      
+      tag->values->appearance.underline_color = *color;
+    }
+  else
+    {
+      if (tag->underline_color_set)
+        {
+          tag->underline_color_set = FALSE;
+          g_object_notify (G_OBJECT (tag), "underline-color-set");
+        }
+    }
+}
+
+
 static PangoFontMask
 get_property_font_set_mask (guint prop_id)
 {
@@ -1202,6 +1296,27 @@
       g_object_notify (object, "strikethrough-set");
       break;
 
+    case PROP_STRIKETHROUGH_COLOR:
+      {
+        GdkColor color;
+
+        if (gdk_color_parse (g_value_get_string (value), &color))
+          set_strikethrough_color (text_tag, &color);
+        else
+          g_warning ("Don't know color `%s'", g_value_get_string (value));
+
+        g_object_notify (object, "strikethrough-color-gdk");
+      }
+      break;
+
+    case PROP_STRIKETHROUGH_COLOR_GDK:
+      {
+        GdkColor *color = g_value_get_boxed (value);
+
+        set_strikethrough_color (text_tag, color);
+      }
+      break;
+
     case PROP_RIGHT_MARGIN:
       text_tag->right_margin_set = TRUE;
       text_tag->values->right_margin = g_value_get_int (value);
@@ -1215,6 +1330,26 @@
       g_object_notify (object, "underline-set");
       break;
 
+    case PROP_UNDERLINE_COLOR:
+      {
+        GdkColor color;
+
+        if (gdk_color_parse (g_value_get_string (value), &color))
+          set_underline_color (text_tag, &color);
+        else
+          g_warning ("Don't know color `%s'", g_value_get_string (value));
+
+        g_object_notify (object, "underline-color-gdk");
+      }
+      break;
+
+    case PROP_UNDERLINE_COLOR_GDK:
+      {
+        GdkColor *color = g_value_get_boxed (value);
+
+        set_underline_color (text_tag, color);
+      }
+
     case PROP_RISE:
       text_tag->rise_set = TRUE;
       text_tag->values->appearance.rise = g_value_get_int (value);
@@ -1378,6 +1513,10 @@
       text_tag->strikethrough_set = g_value_get_boolean (value);
       break;
 
+    case PROP_STRIKETHROUGH_COLOR_SET:
+      text_tag->strikethrough_color_set = g_value_get_boolean (value);
+      break;
+
     case PROP_RIGHT_MARGIN_SET:
       text_tag->right_margin_set = g_value_get_boolean (value);
       size_changed = TRUE;
@@ -1387,6 +1526,10 @@
       text_tag->underline_set = g_value_get_boolean (value);
       break;
 
+    case PROP_UNDERLINE_COLOR_SET:
+      text_tag->underline_color_set = g_value_get_boolean (value);
+      break;
+
     case PROP_RISE_SET:
       text_tag->rise_set = g_value_get_boolean (value);
       size_changed = TRUE;
@@ -1570,6 +1713,10 @@
       g_value_set_boolean (value, tag->values->appearance.strikethrough);
       break;
 
+    case PROP_STRIKETHROUGH_COLOR_GDK:
+      g_value_set_boxed (value, &tag->values->appearance.strikethrough_color);
+      break;
+
     case PROP_RIGHT_MARGIN:
       g_value_set_int (value, tag->values->right_margin);
       break;
@@ -1578,6 +1725,10 @@
       g_value_set_enum (value, tag->values->appearance.underline);
       break;
 
+    case PROP_UNDERLINE_COLOR_GDK:
+      g_value_set_boxed (value, &tag->values->appearance.underline_color);
+      break;
+
     case PROP_RISE:
       g_value_set_int (value, tag->values->appearance.rise);
       break;
@@ -1673,6 +1824,10 @@
       g_value_set_boolean (value, tag->strikethrough_set);
       break;
 
+    case PROP_STRIKETHROUGH_COLOR_SET:
+      g_value_set_boolean (value, tag->strikethrough_color_set);
+      break;
+
     case PROP_RIGHT_MARGIN_SET:
       g_value_set_boolean (value, tag->right_margin_set);
       break;
@@ -1681,6 +1836,10 @@
       g_value_set_boolean (value, tag->underline_set);
       break;
 
+    case PROP_UNDERLINE_COLOR_SET:
+      g_value_set_boolean (value, tag->underline_color_set);
+      break;
+
     case PROP_RISE_SET:
       g_value_set_boolean (value, tag->rise_set);
       break;
@@ -1708,7 +1867,9 @@
     case PROP_BACKGROUND:
     case PROP_FOREGROUND:
     case PROP_PARAGRAPH_BACKGROUND:
-      g_warning ("'foreground', 'background' and 'paragraph_background' properties are not readable, use 'foreground_gdk', 'background_gdk' and 'paragraph_background_gdk'");
+    case PROP_STRIKETHROUGH_COLOR:
+    case PROP_UNDERLINE_COLOR:
+      g_warning ("'foreground', 'background', 'paragraph_background', 'strikethrought-color' and 'underline-color' properties are not readable, use 'foreground_gdk', 'background_gdk', 'paragraph_background_gdk', 'strikethrought-color-gdk' and 'underline-color-gdk'");
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -2230,9 +2391,15 @@
       if (tag->underline_set)
         dest->appearance.underline = vals->appearance.underline;
 
+      if (tag->underline_color_set)
+        dest->appearance.underline_color = vals->appearance.underline_color;
+
       if (tag->strikethrough_set)
         dest->appearance.strikethrough = vals->appearance.strikethrough;
 
+      if (tag->strikethrough_color_set)
+        dest->appearance.strikethrough_color = vals->appearance.strikethrough_color;
+
       if (tag->invisible_set)
         dest->invisible = vals->invisible;
 
Index: gtktexttag.h
===================================================================
--- gtktexttag.h	(revisão 17234)
+++ gtktexttag.h	(cópia de trabalho)
@@ -125,8 +125,8 @@
   guint editable_set : 1;
   guint language_set : 1;
   guint pg_bg_color_set : 1;
-  guint pad1 : 1;
-  guint pad2 : 1;
+  guint underline_color_set : 1;
+  guint strikethrough_color_set : 1;
 };
 
 struct _GtkTextTagClass
@@ -169,6 +169,9 @@
   GdkBitmap *bg_stipple;
   GdkBitmap *fg_stipple;
 
+  GdkColor underline_color;
+  GdkColor strikethrough_color;
+
   /* super/subscript rise, can be negative */
   gint rise;
 
