Mercurial > pidgin
comparison libgaim/util.c @ 14333:cf8d25072151
[gaim-migrate @ 17029]
add font-weight support to gtkimhtml
use it in our outgoing text
closes sf 1083365
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 25 Aug 2006 16:42:38 +0000 |
parents | 611ca4e7b429 |
children | 01daacf7b771 |
comparison
equal
deleted
inserted
replaced
14332:af0d0e23b937 | 14333:cf8d25072151 |
---|---|
1269 c++; | 1269 c++; |
1270 } | 1270 } |
1271 } | 1271 } |
1272 } else { /* opening tag */ | 1272 } else { /* opening tag */ |
1273 ALLOW_TAG("a"); | 1273 ALLOW_TAG("a"); |
1274 ALLOW_TAG_ALT("b", "strong"); | |
1275 ALLOW_TAG("blockquote"); | 1274 ALLOW_TAG("blockquote"); |
1276 ALLOW_TAG_ALT("bold", "strong"); | |
1277 ALLOW_TAG("cite"); | 1275 ALLOW_TAG("cite"); |
1278 ALLOW_TAG("div"); | 1276 ALLOW_TAG("div"); |
1279 ALLOW_TAG("em"); | 1277 ALLOW_TAG("em"); |
1280 ALLOW_TAG("h1"); | 1278 ALLOW_TAG("h1"); |
1281 ALLOW_TAG("h2"); | 1279 ALLOW_TAG("h2"); |
1308 !g_ascii_strncasecmp(c+3, " />", 3))) { | 1306 !g_ascii_strncasecmp(c+3, " />", 3))) { |
1309 c = strchr(c, '>') + 1; | 1307 c = strchr(c, '>') + 1; |
1310 xhtml = g_string_append(xhtml, "<br/>"); | 1308 xhtml = g_string_append(xhtml, "<br/>"); |
1311 if(*c != '\n') | 1309 if(*c != '\n') |
1312 plain = g_string_append_c(plain, '\n'); | 1310 plain = g_string_append_c(plain, '\n'); |
1311 continue; | |
1312 } | |
1313 if(!g_ascii_strncasecmp(c, "<b>", 3) || !g_ascii_strncasecmp(c, "<bold>", strlen("<bold>"))) { | |
1314 struct gaim_parse_tag *pt = g_new0(struct gaim_parse_tag, 1); | |
1315 pt->src_tag = *(c+2) == '>' ? "b" : "bold"; | |
1316 pt->dest_tag = "span"; | |
1317 tags = g_list_prepend(tags, pt); | |
1318 c = strchr(c, '>') + 1; | |
1319 xhtml = g_string_append(xhtml, "<span style='font-weight: bold;'>"); | |
1313 continue; | 1320 continue; |
1314 } | 1321 } |
1315 if(!g_ascii_strncasecmp(c, "<u>", 3) || !g_ascii_strncasecmp(c, "<underline>", strlen("<underline>"))) { | 1322 if(!g_ascii_strncasecmp(c, "<u>", 3) || !g_ascii_strncasecmp(c, "<underline>", strlen("<underline>"))) { |
1316 struct gaim_parse_tag *pt = g_new0(struct gaim_parse_tag, 1); | 1323 struct gaim_parse_tag *pt = g_new0(struct gaim_parse_tag, 1); |
1317 pt->src_tag = *(c+2) == '>' ? "u" : "underline"; | 1324 pt->src_tag = *(c+2) == '>' ? "u" : "underline"; |