changeset 6124:16fd7811effd

[gaim-migrate @ 6598] Remove the f2-toggles-timestamps patch because it makes highlighting act ungood when timestamps are off. Another day, perhaps. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 14 Jul 2003 23:05:21 +0000
parents adabfcf8abe1
children e8204ffce9f8
files ChangeLog src/gtkimhtml.c src/gtkimhtml.h
diffstat 3 files changed, 5 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jul 14 22:11:49 2003 +0000
+++ b/ChangeLog	Mon Jul 14 23:05:21 2003 +0000
@@ -29,8 +29,6 @@
 	* Ability to view iChat "Available" messages for AIM
 	* Stores your buddy icon on the server for AIM
 	* Support for non-ascii characters with Yahoo! Messenger
-	* F2 toggles the display of timestamps retroactively once again 
-	  (Thanks Ka-Hing Cheung)
 
 version 0.64 (05/29/2003):
 	* Buddy list sorting in buddy list preferences.
--- a/src/gtkimhtml.c	Mon Jul 14 22:11:49 2003 +0000
+++ b/src/gtkimhtml.c	Mon Jul 14 23:05:21 2003 +0000
@@ -415,6 +415,7 @@
 	imhtml->arrow_cursor = gdk_cursor_new (GDK_LEFT_PTR);
 
 	imhtml->show_smileys = TRUE;
+	imhtml->show_comments = TRUE;
 
 	imhtml->smiley_data = g_hash_table_new_full(g_str_hash, g_str_equal,
 			g_free, (GDestroyNotify)gtk_smiley_tree_destroy);
@@ -431,8 +432,6 @@
 	imhtml->tip_window = NULL;
 
 	imhtml->scalables = NULL;
-
-	gtk_text_buffer_create_tag(imhtml->text_buffer, "comment", "invisible", FALSE, NULL);
 }
 
 GtkWidget *gtk_imhtml_new(void *a, void *b)
@@ -993,9 +992,6 @@
 								imhtml->scalables = g_list_append(imhtml->scalables, scalable); \
 								gtk_text_buffer_get_end_iter(imhtml->text_buffer, &iter); \
                         } \
-						if (x == NEW_COMMENT_BIT) { \
-							gtk_text_buffer_apply_tag_by_name(imhtml->text_buffer, "comment", &siter, &iter); \
-						} \
 
 
 
@@ -1352,7 +1348,8 @@
 					break;
 				case 59:	/* 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:
@@ -1480,14 +1477,7 @@
 void       gtk_imhtml_show_comments    (GtkIMHtml        *imhtml,
 					gboolean          show)
 {
-	GtkTextIter iter;
-	GtkTextTagTable *table = gtk_text_buffer_get_tag_table(imhtml->text_buffer);
-	GtkTextTag *tag = gtk_text_tag_table_lookup(table, "comment");
-	g_object_set(G_OBJECT(tag), "invisible", !show, NULL);
-	gtk_text_buffer_get_end_iter(imhtml->text_buffer, &iter);
-	gtk_text_buffer_move_mark_by_name(imhtml->text_buffer, "insert", &iter);
-	gtk_text_buffer_move_mark_by_name(imhtml->text_buffer, "selection_bound", &iter);
-
+	imhtml->show_comments = show;
 }
 
 void
--- a/src/gtkimhtml.h	Mon Jul 14 22:11:49 2003 +0000
+++ b/src/gtkimhtml.h	Mon Jul 14 23:05:21 2003 +0000
@@ -58,6 +58,7 @@
 	GtkSmileyTree *default_smilies;
 
 	gboolean show_smileys;
+	gboolean show_comments;
 
 	GtkWidget *tip_window;
 	char *tip;