changeset 6878:618124fe3289

[gaim-migrate @ 7424] <javabsp> KingAnt: Should link in info enabled only if "show URL as links" is enabled? I actually thought about that last night, but for some reason I decided against it. It's definitely better this way. In other news, is anyone else in favor of removing the preference for Message Text->Show URLs as links? I don't know when you would want that to be off. It seems unnecessary to me. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 17 Sep 2003 13:42:38 +0000
parents 1b5b0cea6915
children 594682101ba6
files src/dialogs.c
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/dialogs.c	Wed Sep 17 06:46:36 2003 +0000
+++ b/src/dialogs.c	Wed Sep 17 13:42:38 2003 +0000
@@ -1869,15 +1869,21 @@
 	options ^= GTK_IMHTML_NO_NEWLINE;
 	options ^= GTK_IMHTML_NO_SCROLL;
 
-	linkifyinated = linkify_text(info);
-	gtk_imhtml_append_text(GTK_IMHTML(b->text), linkifyinated, -1, options);
-	g_free(linkifyinated);
+	if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_urls_as_links")) {
+		linkifyinated = linkify_text(info);
+		gtk_imhtml_append_text(GTK_IMHTML(b->text), linkifyinated, -1, options);
+		g_free(linkifyinated);
+	} else
+		gtk_imhtml_append_text(GTK_IMHTML(b->text), info, -1, options);
 
 	va_start(ap, info);
 	while ((more_info = va_arg(ap, char *)) != NULL) {
-		gchar *linkifyinated = linkify_text(more_info);
-		gtk_imhtml_append_text(GTK_IMHTML(b->text), linkifyinated, -1, options);
-		g_free(linkifyinated);
+		if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_urls_as_links")) {
+			linkifyinated = linkify_text(more_info);
+			gtk_imhtml_append_text(GTK_IMHTML(b->text), linkifyinated, -1, options);
+			g_free(linkifyinated);
+		} else
+			gtk_imhtml_append_text(GTK_IMHTML(b->text), more_info, -1, options);
 	}
 	va_end(ap);