| 1453 gtk_text_buffer_create_tag(imhtml->text_buffer, "STRIKE", "strikethrough", TRUE, NULL); |
1453 gtk_text_buffer_create_tag(imhtml->text_buffer, "STRIKE", "strikethrough", TRUE, NULL); |
| 1454 gtk_text_buffer_create_tag(imhtml->text_buffer, "SUB", "rise", -5000, NULL); |
1454 gtk_text_buffer_create_tag(imhtml->text_buffer, "SUB", "rise", -5000, NULL); |
| 1455 gtk_text_buffer_create_tag(imhtml->text_buffer, "SUP", "rise", 5000, NULL); |
1455 gtk_text_buffer_create_tag(imhtml->text_buffer, "SUP", "rise", 5000, NULL); |
| 1456 gtk_text_buffer_create_tag(imhtml->text_buffer, "PRE", "family", "Monospace", NULL); |
1456 gtk_text_buffer_create_tag(imhtml->text_buffer, "PRE", "family", "Monospace", NULL); |
| 1457 gtk_text_buffer_create_tag(imhtml->text_buffer, "search", "background", "#22ff00", "weight", "bold", NULL); |
1457 gtk_text_buffer_create_tag(imhtml->text_buffer, "search", "background", "#22ff00", "weight", "bold", NULL); |
| 1458 #if GTK_CHECK_VERSION(2,10,10) |
1458 #if 0 |
| 1459 gtk_text_buffer_create_tag(imhtml->text_buffer, "comment", "invisible", FALSE, NULL); |
1459 gtk_text_buffer_create_tag(imhtml->text_buffer, "comment", "invisible", FALSE, NULL); |
| 1460 #endif |
1460 #endif |
| 1461 |
1461 |
| 1462 /* When hovering over a link, we show the hand cursor--elsewhere we show the plain ol' pointer cursor */ |
1462 /* When hovering over a link, we show the hand cursor--elsewhere we show the plain ol' pointer cursor */ |
| 1463 imhtml->hand_cursor = gdk_cursor_new (GDK_HAND2); |
1463 imhtml->hand_cursor = gdk_cursor_new (GDK_HAND2); |
| 2982 /* NEW_BIT (NEW_TEXT_BIT); */ |
2982 /* NEW_BIT (NEW_TEXT_BIT); */ |
| 2983 ws[wpos] = '\0'; |
2983 ws[wpos] = '\0'; |
| 2984 |
2984 |
| 2985 gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos); |
2985 gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos); |
| 2986 |
2986 |
| 2987 #if GTK_CHECK_VERSION(2,10,10) |
2987 #if 0 |
| 2988 wpos = g_snprintf (ws, len, "%s", tag); |
2988 wpos = g_snprintf (ws, len, "%s", tag); |
| 2989 gtk_text_buffer_insert_with_tags_by_name(imhtml->text_buffer, iter, ws, wpos, "comment", NULL); |
2989 gtk_text_buffer_insert_with_tags_by_name(imhtml->text_buffer, iter, ws, wpos, "comment", NULL); |
| 2990 #else |
2990 #else |
| 2991 if (imhtml->show_comments && !(options & GTK_IMHTML_NO_COMMENTS)) { |
2991 if (imhtml->show_comments && !(options & GTK_IMHTML_NO_COMMENTS)) { |
| 2992 wpos = g_snprintf (ws, len, "%s", tag); |
2992 wpos = g_snprintf (ws, len, "%s", tag); |
| 3136 } |
3136 } |
| 3137 |
3137 |
| 3138 void gtk_imhtml_show_comments (GtkIMHtml *imhtml, |
3138 void gtk_imhtml_show_comments (GtkIMHtml *imhtml, |
| 3139 gboolean show) |
3139 gboolean show) |
| 3140 { |
3140 { |
| 3141 #if GTK_CHECK_VERSION(2,10,10) |
3141 #if 0 |
| 3142 GtkTextTag *tag; |
3142 GtkTextTag *tag; |
| 3143 tag = gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(imhtml->text_buffer), "comment"); |
3143 tag = gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(imhtml->text_buffer), "comment"); |
| 3144 if (tag) |
3144 if (tag) |
| 3145 g_object_set(G_OBJECT(tag), "invisible", !show, NULL); |
3145 g_object_set(G_OBJECT(tag), "invisible", !show, NULL); |
| 3146 #endif |
3146 #endif |