changeset 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 7805a9a2c6ba
children 340cb17d3e37
files plugins/history.c plugins/iconaway.c src/server.c
diffstat 3 files changed, 11 insertions(+), 6 deletions(-) [+]
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);
--- a/plugins/iconaway.c	Sat May 31 14:29:44 2003 +0000
+++ b/plugins/iconaway.c	Sat May 31 14:38:03 2003 +0000
@@ -75,9 +75,9 @@
 	N_("Iconify on Away"),                            /**< name           */
 	VERSION,                                          /**< version        */
 	                                                  /**  summary        */
-	N_("Iconifies the away box and the buddy list when you go away."),
+	N_("Iconifies the buddy list and your conversations when you go away."),
 	                                                  /**  description    */
-	N_("Iconifies the away box and the buddy list when you go away."),
+	N_("Iconifies the buddy list and your conversations when you go away."),
 	"Eric Warmenhoven <eric@warmenhoven.org>",        /**< author         */
 	WEBSITE,                                          /**< homepage       */
 
--- a/src/server.c	Sat May 31 14:29:44 2003 +0000
+++ b/src/server.c	Sat May 31 14:38:03 2003 +0000
@@ -469,10 +469,10 @@
 	if (b->server_alias)
 		g_free(b->server_alias);
 
-	if(alias)
+	if (alias && g_utf8_validate(alias))
 		b->server_alias = g_strdup(alias);
 	else
-	       b->server_alias = NULL;
+		b->server_alias = NULL;
 
 	gaim_blist_update_buddy_status(b, b->uc);
 }