changeset 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 280ed2b617be
children e9f243406a3d
files src/gtkimhtml.c
diffstat 1 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtml.c	Wed Jan 08 20:13:09 2003 +0000
+++ b/src/gtkimhtml.c	Wed Jan 08 20:25:06 2003 +0000
@@ -186,6 +186,9 @@
 	imhtml->hand_cursor = gdk_cursor_new (GDK_HAND2);
 	imhtml->arrow_cursor = gdk_cursor_new (GDK_LEFT_PTR);
 
+	imhtml->show_smileys = TRUE;
+	imhtml->show_comments = TRUE;
+
 	imhtml->smiley_data = g_hash_table_new (g_str_hash, g_str_equal);
 	imhtml->default_smilies = gtk_smiley_tree_new();
 }
@@ -897,7 +900,8 @@
 					break;
 				case 49:	/* comment */
 					NEW_BIT (NEW_TEXT_BIT);
-					wpos = g_snprintf (ws, len, "%s", tag);
+					if (imhtml->show_comments)
+						wpos = g_snprintf (ws, len, "%s", tag);
 					NEW_BIT (NEW_COMMENT_BIT);
 					break;
 				default:
@@ -919,7 +923,7 @@
 			}
 			c++;
 			pos++;
-		} else if (gtk_imhtml_is_smiley (imhtml, fonts, c, &smilelen) || gtk_imhtml_is_smiley(imhtml, NULL, c, &smilelen)) {
+		} else if (imhtml->show_smileys && (gtk_imhtml_is_smiley (imhtml, fonts, c, &smilelen) || gtk_imhtml_is_smiley(imhtml, NULL, c, &smilelen))) {
 			FontDetail *fd;
 			gchar *sml = NULL;
 			if (fonts) {
@@ -1011,10 +1015,16 @@
 
 void       gtk_imhtml_remove_smileys   (GtkIMHtml        *imhtml){}
 void       gtk_imhtml_show_smileys     (GtkIMHtml        *imhtml,
-	gboolean          show){}
+					gboolean          show)
+{
+	imhtml->show_smileys = show;
+}
 
 void       gtk_imhtml_show_comments    (GtkIMHtml        *imhtml,
-	gboolean          show){}
+					gboolean          show)
+{
+	imhtml->show_comments = show;
+}
 
 void
 gtk_imhtml_clear (GtkIMHtml *imhtml)