2005-09-26 [colin] 1.9.14cvs54
[claws.git] / src / gtk / gtkaspell.c
index f1c00f368f7489ec158dc4a6bcd146f6a02f2df2..06ea0db796dc1a89866e49b0881a2b78d03354ac 100644 (file)
@@ -2401,8 +2401,13 @@ static void allocate_color(GtkAspell *gtkaspell, gint rgbvalue)
        color->blue  = (int) (((gdouble) (rgbvalue & 0x0000ff)        / 255.0)
                        * 65535.0);
 
-       gtk_text_buffer_create_tag(buffer, "misspelled",
+       if (rgbvalue != 0)
+               gtk_text_buffer_create_tag(buffer, "misspelled",
                                   "foreground-gdk", color, NULL);
+       else
+               gtk_text_buffer_create_tag(buffer, "misspelled",
+                                  "underline", PANGO_UNDERLINE_ERROR, NULL);
+
 }
 
 static void change_color(GtkAspell * gtkaspell, 
@@ -2422,6 +2427,7 @@ static void change_color(GtkAspell * gtkaspell,
        buffer = gtk_text_view_get_buffer(gtktext);
        gtk_text_buffer_get_iter_at_offset(buffer, &startiter, start);
        gtk_text_buffer_get_iter_at_offset(buffer, &enditer, end);
+       gtk_text_iter_forward_char(&enditer);
        if (color)
                gtk_text_buffer_apply_tag_by_name(buffer, "misspelled",
                                                  &startiter, &enditer);