diff src/gtkconv.c @ 8858:d7b5fbc451da

[gaim-migrate @ 9626] fix a couple things. a bug with topic changing when there was no topic, a bug with /commands in jabber when you had formatting turned on, and fix some warning in gtkimhtml, i forget what committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 02 May 2004 18:12:08 +0000
parents d5ca3e9a77e2
children 1ab2a9c17f4a
line wrap: on
line diff
--- a/src/gtkconv.c	Sun May 02 17:57:10 2004 +0000
+++ b/src/gtkconv.c	Sun May 02 18:12:08 2004 +0000
@@ -3483,7 +3483,8 @@
 	GaimConnection *gc;
 	GaimGtkConversation *gtkconv;
 	GaimGtkChatPane *gtkchat;
-	const char *topic;
+	const char *new_topic;
+	const char *current_topic;
 
 	gc      = gaim_conversation_get_gc(conv);
 
@@ -3495,12 +3496,14 @@
 
 	gtkconv = GAIM_GTK_CONVERSATION(conv);
 	gtkchat = gtkconv->u.chat;
-	topic = gtk_entry_get_text(GTK_ENTRY(gtkchat->topic_text));
-
-	if(!g_utf8_collate(topic, gaim_conv_chat_get_topic(GAIM_CONV_CHAT(conv))))
+	new_topic = gtk_entry_get_text(GTK_ENTRY(gtkchat->topic_text));
+	current_topic = gaim_conv_chat_get_topic(GAIM_CONV_CHAT(conv));
+
+	if(current_topic && !g_utf8_collate(new_topic, current_topic))
 		return;
 
-	prpl_info->set_chat_topic(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv)), topic);
+	prpl_info->set_chat_topic(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv)),
+			new_topic);
 }
 
 static GtkWidget *