diff plugins/history.c @ 5598:8b24e4d1e082

[gaim-migrate @ 6002] (10:36:12) Robot101: fixes three things: (10:36:33) Robot101: linkifies text that's inserted by the history plugin, if you have that option enabled for conversations in general (10:37:02) Robot101: validates the UTF-8 in incoming server-side aliases, so trillian can't screw us over (10:37:38) Robot101: changes the wording in the iconaway plugin so it no longer claims to minimise the away window, which for the moment is a dialog and isn't meant to be minimised committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 31 May 2003 14:38:03 +0000
parents fefad67de2c7
children 340cb17d3e37
line wrap: on
line diff
--- a/plugins/history.c	Sat May 31 14:29:44 2003 +0000
+++ b/plugins/history.c	Sat May 31 14:38:03 2003 +0000
@@ -24,7 +24,7 @@
 	char *logfile = g_strdup_printf("%s.log", normalize(name));
 	char *path = g_build_filename(userdir, "logs", logfile, NULL);
 	char buf[HISTORY_SIZE+1];
-	char *tmp;
+	char *tmp, *tmp2;
 	int size;
 	GtkIMHtmlOptions options = GTK_IMHTML_NO_COLOURS;
 
@@ -50,10 +50,15 @@
 	if(*tmp == '<')
 		options |= GTK_IMHTML_NO_NEWLINE;
 
+	if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_urls_as_links")) {		tmp2 = linkify_text(tmp);
+	else
+		tmp2 = g_strdup(tmp);
+
 	gtkconv = GAIM_GTK_CONVERSATION(c);
 
-	gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), tmp, strlen(tmp), options);
+	gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), tmp2, strlen(tmp2), options);
 
+	g_free(tmp2);
 	g_free(userdir);
 	g_free(logfile);
 	g_free(path);