From: Colin Leroy Date: Sun, 16 Apr 2006 20:56:16 +0000 (+0000) Subject: 2006-04-16 [colin] 2.1.0cvs49 X-Git-Tag: rel_2_2_0~56 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=31072723dfdee1efd925c9f92bf85a02294589bf 2006-04-16 [colin] 2.1.0cvs49 * src/textview.c Fix bgcolor not unset on gtk 2.8, while preventing warnings with gtk < 2.8. Thanks to Fabien Vantard. --- diff --git a/ChangeLog b/ChangeLog index 68c9356fd..414441ed9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-04-16 [colin] 2.1.0cvs49 + + * src/textview.c + Fix bgcolor not unset on gtk 2.8, while preventing warnings + with gtk < 2.8. Thanks to Fabien Vantard. + 2006-04-15 [colin] 2.1.0cvs48 * src/etpan/imap-thread.c diff --git a/PATCHSETS b/PATCHSETS index 4bf4a2b8d..3adc45b17 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -1420,3 +1420,4 @@ ( cvs diff -u -r 1.17.2.26 -r 1.17.2.27 src/send_message.c; ) > 2.1.0cvs46.patchset ( cvs diff -u -r 1.115.2.79 -r 1.115.2.80 src/main.c; ) > 2.1.0cvs47.patchset ( cvs diff -u -r 1.1.4.32 -r 1.1.4.33 src/etpan/imap-thread.c; ) > 2.1.0cvs48.patchset +( cvs diff -u -r 1.96.2.110 -r 1.96.2.111 src/textview.c; ) > 2.1.0cvs49.patchset diff --git a/configure.ac b/configure.ac index 4fab533a1..b559563ae 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=1 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=48 +EXTRA_VERSION=49 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/textview.c b/src/textview.c index 2b1bb5031..ab3a6d09e 100644 --- a/src/textview.c +++ b/src/textview.c @@ -451,13 +451,19 @@ void textview_init(TextView *textview) textview_create_tags(GTK_TEXT_VIEW(textview->text), textview); } -#define CHANGE_TAG_COLOR(tagname, colorfg, colorbg) { \ +#if GTK_CHECK_VERSION(2, 8, 0) + #define CHANGE_TAG_COLOR(tagname, colorfg, colorbg) { \ tag = gtk_text_tag_table_lookup(tags, tagname); \ - if (tag && colorbg) \ + if (tag) \ g_object_set(G_OBJECT(tag), "foreground-gdk", colorfg, "paragraph-background-gdk", colorbg, NULL); \ - else if (tag) \ + } +#else + #define CHANGE_TAG_COLOR(tagname, colorfg, colorbg) { \ + tag = gtk_text_tag_table_lookup(tags, tagname); \ + if (tag) \ g_object_set(G_OBJECT(tag), "foreground-gdk", colorfg, NULL); \ -} + } +#endif static void textview_update_message_colors(TextView *textview) {