comparison pidgin/gtkimhtml.c @ 22387:ff1258551f79

merge of 'b3b5983d1eb17af3007d26447c9215e9e8203189' and 'd1ef38716fb62522b4d8ce47ed39d9e34d2b2c77'
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Sun, 02 Mar 2008 20:08:27 +0000
parents f730ffc57ead 53873732f90a
children af83f19d8c08 019052a807a3 9cd7892b2c8b
comparison
equal deleted inserted replaced
22315:f730ffc57ead 22387:ff1258551f79
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 FALSE && GTK_CHECK_VERSION(2,10,10)
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 FALSE && GTK_CHECK_VERSION(2,10,10)
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 FALSE && GTK_CHECK_VERSION(2,10,10)
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