changeset 7975:2311532f9036

[gaim-migrate @ 8652] marv pointed this out. damn buttons. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 03 Jan 2004 06:22:54 +0000
parents 415df6fa0395
children 8e5a21b1efa6
files src/gtkconv.c
diffstat 1 files changed, 22 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Fri Jan 02 15:34:04 2004 +0000
+++ b/src/gtkconv.c	Sat Jan 03 06:22:54 2004 +0000
@@ -480,6 +480,26 @@
 	gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry);
 }
 
+static void chat_do_info(GaimConversation *conv, const char *who)
+{
+	GaimPluginProtocolInfo *prpl_info = NULL;
+	GaimConnection *gc;
+
+	if ((gc = gaim_conversation_get_gc(conv))) {
+		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
+
+		/*
+		 * If there are special needs for getting info on users in
+		 * buddy chat "rooms"...
+		 */
+		if (prpl_info->get_cb_info != NULL)
+			prpl_info->get_cb_info(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv)), who);
+		else
+			prpl_info->get_info(gc, who);
+	}
+}
+
+
 static void
 info_cb(GtkWidget *widget, GaimConversation *conv)
 {
@@ -510,7 +530,7 @@
 		else
 			return;
 
-		serv_get_info(gaim_conversation_get_gc(conv), name);
+		chat_do_info(conv, name);
 	}
 }
 
@@ -1074,25 +1094,11 @@
 static void
 menu_chat_info_cb(GtkWidget *w, GaimConversation *conv)
 {
-	GaimPluginProtocolInfo *prpl_info = NULL;
-	GaimConnection *gc;
 	char *who;
 
-	gc = gaim_conversation_get_gc(conv);
 	who = g_object_get_data(G_OBJECT(w), "user_data");
 
-	if (gc != NULL) {
-		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
-
-		/*
-		 * If there are special needs for getting info on users in
-		 * buddy chat "rooms"...
-		 */
-		if (prpl_info->get_cb_info != NULL)
-			prpl_info->get_cb_info(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(conv)), who);
-		else
-			prpl_info->get_info(gc, who);
-	}
+	chat_do_info(conv, who);
 }
 
 static void