Mercurial > pidgin
comparison src/gtkimhtml.c @ 4253:6c8ea04270e1
[gaim-migrate @ 4504]
This will make the timestamp and smiley options seem to work. It should
be enough to please most people for now.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Wed, 08 Jan 2003 20:25:06 +0000 |
parents | 511c2b63caa4 |
children | 74f65a3d2a1f |
comparison
equal
deleted
inserted
replaced
4252:280ed2b617be | 4253:6c8ea04270e1 |
---|---|
183 gtk_text_buffer_create_tag(imhtml->text_buffer, "PRE", "family", "Monospace", NULL); | 183 gtk_text_buffer_create_tag(imhtml->text_buffer, "PRE", "family", "Monospace", NULL); |
184 | 184 |
185 /* When hovering over a link, we show the hand cursor--elsewhere we show the plain ol' pointer cursor */ | 185 /* When hovering over a link, we show the hand cursor--elsewhere we show the plain ol' pointer cursor */ |
186 imhtml->hand_cursor = gdk_cursor_new (GDK_HAND2); | 186 imhtml->hand_cursor = gdk_cursor_new (GDK_HAND2); |
187 imhtml->arrow_cursor = gdk_cursor_new (GDK_LEFT_PTR); | 187 imhtml->arrow_cursor = gdk_cursor_new (GDK_LEFT_PTR); |
188 | |
189 imhtml->show_smileys = TRUE; | |
190 imhtml->show_comments = TRUE; | |
188 | 191 |
189 imhtml->smiley_data = g_hash_table_new (g_str_hash, g_str_equal); | 192 imhtml->smiley_data = g_hash_table_new (g_str_hash, g_str_equal); |
190 imhtml->default_smilies = gtk_smiley_tree_new(); | 193 imhtml->default_smilies = gtk_smiley_tree_new(); |
191 } | 194 } |
192 | 195 |
895 case 47: /* P (opt) */ | 898 case 47: /* P (opt) */ |
896 case 48: /* H3 (opt) */ | 899 case 48: /* H3 (opt) */ |
897 break; | 900 break; |
898 case 49: /* comment */ | 901 case 49: /* comment */ |
899 NEW_BIT (NEW_TEXT_BIT); | 902 NEW_BIT (NEW_TEXT_BIT); |
900 wpos = g_snprintf (ws, len, "%s", tag); | 903 if (imhtml->show_comments) |
904 wpos = g_snprintf (ws, len, "%s", tag); | |
901 NEW_BIT (NEW_COMMENT_BIT); | 905 NEW_BIT (NEW_COMMENT_BIT); |
902 break; | 906 break; |
903 default: | 907 default: |
904 break; | 908 break; |
905 } | 909 } |
917 wpos++; | 921 wpos++; |
918 NEW_BIT (NEW_TEXT_BIT); | 922 NEW_BIT (NEW_TEXT_BIT); |
919 } | 923 } |
920 c++; | 924 c++; |
921 pos++; | 925 pos++; |
922 } else if (gtk_imhtml_is_smiley (imhtml, fonts, c, &smilelen) || gtk_imhtml_is_smiley(imhtml, NULL, c, &smilelen)) { | 926 } else if (imhtml->show_smileys && (gtk_imhtml_is_smiley (imhtml, fonts, c, &smilelen) || gtk_imhtml_is_smiley(imhtml, NULL, c, &smilelen))) { |
923 FontDetail *fd; | 927 FontDetail *fd; |
924 gchar *sml = NULL; | 928 gchar *sml = NULL; |
925 if (fonts) { | 929 if (fonts) { |
926 fd = fonts->data; | 930 fd = fonts->data; |
927 sml = fd->sml; | 931 sml = fd->sml; |
1009 void gtk_imhtml_set_img_handler (GtkIMHtml *imhtml, | 1013 void gtk_imhtml_set_img_handler (GtkIMHtml *imhtml, |
1010 GtkIMHtmlImage handler){} | 1014 GtkIMHtmlImage handler){} |
1011 | 1015 |
1012 void gtk_imhtml_remove_smileys (GtkIMHtml *imhtml){} | 1016 void gtk_imhtml_remove_smileys (GtkIMHtml *imhtml){} |
1013 void gtk_imhtml_show_smileys (GtkIMHtml *imhtml, | 1017 void gtk_imhtml_show_smileys (GtkIMHtml *imhtml, |
1014 gboolean show){} | 1018 gboolean show) |
1019 { | |
1020 imhtml->show_smileys = show; | |
1021 } | |
1015 | 1022 |
1016 void gtk_imhtml_show_comments (GtkIMHtml *imhtml, | 1023 void gtk_imhtml_show_comments (GtkIMHtml *imhtml, |
1017 gboolean show){} | 1024 gboolean show) |
1025 { | |
1026 imhtml->show_comments = show; | |
1027 } | |
1018 | 1028 |
1019 void | 1029 void |
1020 gtk_imhtml_clear (GtkIMHtml *imhtml) | 1030 gtk_imhtml_clear (GtkIMHtml *imhtml) |
1021 { | 1031 { |
1022 GtkTextIter start, end; | 1032 GtkTextIter start, end; |