From a56134d8ba220a364d23342d1e496b7a16a9f5ad Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 13 Sep 2010 03:10:55 +0000 Subject: [PATCH] Now handling text in italic as well --- src/ghtml-gtktextview.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ghtml-gtktextview.c b/src/ghtml-gtktextview.c index 3898565..eff989b 100644 --- a/src/ghtml-gtktextview.c +++ b/src/ghtml-gtktextview.c @@ -58,7 +58,7 @@ typedef struct _GHtmlTag GtkTextTag * tag; } GHtmlTag; -#define GHTML_TAGS_COUNT 20 +#define GHTML_TAGS_COUNT 21 typedef struct _GHtml { Surfer * surfer; @@ -153,6 +153,13 @@ static const GHtmlProperty _ghtml_properties_h6[] = { NULL, NULL } }; +static const GHtmlProperty _ghtml_properties_i[] = +{ + { "style", (void*)PANGO_STYLE_ITALIC }, + { "style-set", (void*)TRUE }, + { NULL, NULL } +}; + static const GHtmlProperty _ghtml_properties_pre[] = { { "family", "Monospace" }, @@ -189,6 +196,7 @@ static const GHtmlTag _ghtml_tags[GHTML_TAGS_COUNT] = { "h5", GHTML_DISPLAY_BLOCK, _ghtml_properties_h5, NULL }, { "h6", GHTML_DISPLAY_BLOCK, _ghtml_properties_h6, NULL }, { "hr", GHTML_DISPLAY_BLOCK, NULL, NULL }, + { "i", GHTML_DISPLAY_INLINE, _ghtml_properties_i, NULL }, { "li", GHTML_DISPLAY_BLOCK, NULL, NULL }, { "ol", GHTML_DISPLAY_BLOCK, NULL, NULL }, { "p", GHTML_DISPLAY_BLOCK, NULL, NULL },