display signatures in grey
authorColin Leroy <colin@colino.net>
Tue, 3 Sep 2002 14:45:07 +0000 (14:45 +0000)
committerColin Leroy <colin@colino.net>
Tue, 3 Sep 2002 14:45:07 +0000 (14:45 +0000)
ChangeLog.claws
configure.in
src/textview.c
src/textview.h

index cef7b4d..9fd3ea6 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-03 [colin]     0.8.2claws25
+
+       * src/textview.[ch]
+               Grey the signature
+
 2002-09-03 [paul]      0.8.2claws24
 
        * sync with 0.8.2cvs8
index 4b8391f..48086b9 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws24
+EXTRA_VERSION=claws25
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index cc9a050..d8d5636 100644 (file)
@@ -78,6 +78,13 @@ static GdkColor quote_colors[3] = {
        {(gulong)0, (gushort)0, (gushort)0, (gushort)0}
 };
 
+static GdkColor signature_color = {
+       (gulong)0,
+       (gushort)0x7fff,
+       (gushort)0x7fff,
+       (gushort)0x7fff
+};
+       
 static GdkColor uri_color = {
        (gulong)0,
        (gushort)0,
@@ -606,7 +613,11 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo,
        conv = conv_code_converter_new(charset);
 
        tmpfp = procmime_decode_content(NULL, fp, mimeinfo);
+       
+       textview->is_in_signature = FALSE;
+
        if (tmpfp) {
+               
                if (mimeinfo->mime_type == MIME_TEXT_HTML)
                        textview_show_html(textview, tmpfp, conv);
                else if (mimeinfo->mime_type == MIME_TEXT_ENRICHED)
@@ -1079,6 +1090,11 @@ static void textview_write_line(TextView *textview, const gchar *str,
        else
                fg_color = &quote_colors[quotelevel];
 
+       if (prefs_common.enable_color && (strcmp(buf,"-- \n") == 0 || textview->is_in_signature)) {
+               fg_color = &signature_color;
+               textview->is_in_signature = TRUE;
+       }
+       
        if (prefs_common.head_space && spacingfont && buf[0] != '\n')
                gtk_stext_insert(text, spacingfont, NULL, NULL, " ", 1);
 
index d5d195a..4011d93 100644 (file)
@@ -47,7 +47,8 @@ struct _TextView
 
        gboolean text_is_mb;
        gboolean default_text;
-
+       gboolean is_in_signature;
+       
        GSList *uri_list;
        gint body_pos;
        gint cur_pos;