pidgin: 17307fa1: Our API really shouldn't have a 'gc' in ...

qulogic at pidgin.im qulogic at pidgin.im
Mon Oct 24 02:45:46 EDT 2011


----------------------------------------------------------------------
Revision: 17307fa16b87cf60ca1869e6eb0b603ebb36433c
Parent:   74dfd9c33635d6b2f0f747dad0c51272f80e417e
Author:   qulogic at pidgin.im
Date:     10/24/11 01:37:19
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/17307fa16b87cf60ca1869e6eb0b603ebb36433c

Changelog: 

Our API really shouldn't have a 'gc' in it anymore.

Changes against parent 74dfd9c33635d6b2f0f747dad0c51272f80e417e

  patched  ChangeLog.API
  patched  finch/gntconv.c
  patched  libpurple/conversation.c
  patched  libpurple/conversation.h
  patched  libpurple/plugins/perl/common/Conversation.xs
  patched  libpurple/protocols/irc/parse.c
  patched  libpurple/protocols/jabber/jabber.c
  patched  libpurple/protocols/mxit/mxit.c
  patched  libpurple/protocols/sametime/sametime.c
  patched  libpurple/protocols/silc/silc.c
  patched  libpurple/protocols/yahoo/libymsg.c
  patched  libpurple/protocols/zephyr/zephyr.c
  patched  pidgin/gtkconv.c
  patched  pidgin/gtkimhtmltoolbar.c
  patched  pidgin/plugins/musicmessaging/musicmessaging.c

-------------- next part --------------
============================================================
--- libpurple/conversation.c	eaa5ad0b59ef97c83609b8ed85946b979c753719
+++ libpurple/conversation.c	7188b6668d8ab65977dfab462915afb4ead6dade
@@ -241,7 +241,7 @@ send_typed_cb(gpointer data)
 
 	g_return_val_if_fail(conv != NULL, FALSE);
 
-	gc   = purple_conversation_get_gc(conv);
+	gc   = purple_conversation_get_connection(conv);
 	name = purple_conversation_get_name(conv);
 
 	if (gc != NULL && name != NULL) {
@@ -271,7 +271,7 @@ common_send(PurpleConversation *conv, co
 		return;
 
 	account = purple_conversation_get_account(conv);
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 
 	g_return_if_fail(account != NULL);
 	g_return_if_fail(gc != NULL);
@@ -594,7 +594,7 @@ purple_conversation_destroy(PurpleConver
 	purple_request_close_with_handle(conv);
 
 	ops  = purple_conversation_get_ui_ops(conv);
-	gc   = purple_conversation_get_gc(conv);
+	gc   = purple_conversation_get_connection(conv);
 	name = purple_conversation_get_name(conv);
 
 	if (gc != NULL)
@@ -819,7 +819,7 @@ PurpleConnection *
 }
 
 PurpleConnection *
-purple_conversation_get_gc(const PurpleConversation *conv)
+purple_conversation_get_connection(const PurpleConversation *conv)
 {
 	PurpleAccount *account;
 
@@ -1659,7 +1659,7 @@ purple_conv_chat_write(PurpleConvChat *c
 	g_return_if_fail(message != NULL);
 
 	conv      = purple_conv_chat_get_conversation(chat);
-	gc        = purple_conversation_get_gc(conv);
+	gc        = purple_conversation_get_connection(conv);
 	account   = purple_connection_get_account(gc);
 
 	/* Don't display this if the person who wrote it is ignored. */
@@ -1775,7 +1775,7 @@ purple_conv_chat_add_users(PurpleConvCha
 	conv = purple_conv_chat_get_conversation(chat);
 	ops  = purple_conversation_get_ui_ops(conv);
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 	g_return_if_fail(gc != NULL);
 	prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
 	g_return_if_fail(prpl_info != NULL);
@@ -1876,7 +1876,7 @@ purple_conv_chat_rename_user(PurpleConvC
 	conv = purple_conv_chat_get_conversation(chat);
 	ops  = purple_conversation_get_ui_ops(conv);
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 	g_return_if_fail(gc != NULL);
 	prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
 	g_return_if_fail(prpl_info != NULL);
@@ -1995,7 +1995,7 @@ purple_conv_chat_remove_users(PurpleConv
 
 	conv = purple_conv_chat_get_conversation(chat);
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 	g_return_if_fail(gc != NULL);
 	prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
 	g_return_if_fail(prpl_info != NULL);
@@ -2180,7 +2180,7 @@ purple_find_chat(const PurpleConnection 
 		conv = (PurpleConversation *)l->data;
 
 		if (purple_conv_chat_get_id(PURPLE_CONV_CHAT(conv)) == id &&
-			purple_conversation_get_gc(conv) == gc)
+			purple_conversation_get_connection(conv) == gc)
 			return conv;
 	}
 
@@ -2208,7 +2208,7 @@ invite_user_to_chat(gpointer data, Purpl
 	user = purple_request_fields_get_string(fields, "screenname");
 	message = purple_request_fields_get_string(fields, "message");
 
-	serv_chat_invite(purple_conversation_get_gc(conv), chat->id, message, user);
+	serv_chat_invite(purple_conversation_get_connection(conv), chat->id, message, user);
 }
 
 void purple_conv_chat_invite_user(PurpleConvChat *chat, const char *user,
============================================================
--- libpurple/protocols/jabber/jabber.c	10e566e21daec0feac82260fecf2dac28a2b5e4c
+++ libpurple/protocols/jabber/jabber.c	f8a6d992e6a1e9fd28662e7f2939d15ec1d06d6b
@@ -3001,7 +3001,7 @@ static PurpleCmdRet jabber_cmd_chat_invi
 	if(!args || !args[0])
 		return PURPLE_CMD_RET_FAILED;
 
-	jabber_chat_invite(purple_conversation_get_gc(conv),
+	jabber_chat_invite(purple_conversation_get_connection(conv),
 			purple_conv_chat_get_id(PURPLE_CONV_CHAT(conv)), args[1] ? args[1] : "",
 			args[0]);
 
@@ -3048,7 +3048,7 @@ static PurpleCmdRet jabber_cmd_chat_join
 	if (args[1])
 		g_hash_table_insert(components, "password", args[1]);
 
-	jabber_chat_join(purple_conversation_get_gc(conv), components);
+	jabber_chat_join(purple_conversation_get_connection(conv), components);
 
 	g_hash_table_destroy(components);
 	jabber_id_free(jid);
@@ -3082,7 +3082,7 @@ static PurpleCmdRet jabber_cmd_chat_msg(
 
 	who = g_strdup_printf("%s@%s/%s", chat->room, chat->server, args[0]);
 
-	jabber_message_send_im(purple_conversation_get_gc(conv), who, args[1], 0);
+	jabber_message_send_im(purple_conversation_get_connection(conv), who, args[1], 0);
 
 	g_free(who);
 	return PURPLE_CMD_RET_OK;
============================================================
--- libpurple/protocols/zephyr/zephyr.c	75aac58acf8b0d5a503ae96a01dfeb3dbd16437b
+++ libpurple/protocols/zephyr/zephyr.c	a3f40fb592600b8e01f75bf7c12226d4c9b9194a
@@ -2591,7 +2591,7 @@ static PurpleCmdRet zephyr_purple_cmd_ms
 				      const char *cmd, char **args, char **error, void *data)
 {
 	char *recipient;
-	PurpleConnection *gc = purple_conversation_get_gc(conv);
+	PurpleConnection *gc = purple_conversation_get_connection(conv);
 	zephyr_account *zephyr = purple_connection_get_protocol_data(gc);;
 	if (!g_ascii_strcasecmp(args[0],"*"))
 		return PURPLE_CMD_RET_FAILED;  /* "*" is not a valid argument */
@@ -2610,7 +2610,7 @@ static PurpleCmdRet zephyr_purple_cmd_zl
 static PurpleCmdRet zephyr_purple_cmd_zlocate(PurpleConversation *conv,
 					  const char *cmd, char **args, char **error, void *data)
 {
-	zephyr_zloc(purple_conversation_get_gc(conv),args[0]);
+	zephyr_zloc(purple_conversation_get_connection(conv),args[0]);
 	return PURPLE_CMD_RET_OK;
 }
 
@@ -2623,7 +2623,7 @@ static PurpleCmdRet zephyr_purple_cmd_in
 
 	PurpleConvChat *gcc = purple_conversation_get_chat_data(conv);
 	const char* instance = args[0];
-	zephyr_chat_set_topic(purple_conversation_get_gc(conv),purple_conv_chat_get_id(gcc),instance);
+	zephyr_chat_set_topic(purple_conversation_get_connection(conv),purple_conv_chat_get_id(gcc),instance);
 	return PURPLE_CMD_RET_OK;
 }
 
@@ -2635,7 +2635,7 @@ static PurpleCmdRet zephyr_purple_cmd_jo
 	g_hash_table_insert(triple,"class",args[0]);
 	g_hash_table_insert(triple,"instance",args[1]);
 	g_hash_table_insert(triple,"recipient",args[2]);
-	zephyr_join_chat(purple_conversation_get_gc(conv),triple);
+	zephyr_join_chat(purple_conversation_get_connection(conv),triple);
 	return PURPLE_CMD_RET_OK;
 }
 
@@ -2643,7 +2643,7 @@ static PurpleCmdRet zephyr_purple_cmd_zi
 				     const char *cmd, char **args, char **error, void *data)
 {
 	/* args = instance, message */
-	PurpleConnection *gc = purple_conversation_get_gc(conv);
+	PurpleConnection *gc = purple_conversation_get_connection(conv);
 	zephyr_account *zephyr = purple_connection_get_protocol_data(gc);
 	if ( zephyr_send_message(zephyr,"message",args[0],"",args[1],zephyr_get_signature(),""))
 		return PURPLE_CMD_RET_OK;
@@ -2655,7 +2655,7 @@ static PurpleCmdRet zephyr_purple_cmd_zc
 				      const char *cmd, char **args, char **error, void *data)
 {
 	/* args = class, instance, message */
-	PurpleConnection *gc = purple_conversation_get_gc(conv);
+	PurpleConnection *gc = purple_conversation_get_connection(conv);
 	zephyr_account *zephyr = purple_connection_get_protocol_data(gc);
 	if ( zephyr_send_message(zephyr,args[0],args[1],"",args[2],zephyr_get_signature(),""))
 		return PURPLE_CMD_RET_OK;
@@ -2667,7 +2667,7 @@ static PurpleCmdRet zephyr_purple_cmd_zc
 				       const char *cmd, char **args, char **error, void *data)
 {
 	/* args = class, instance, recipient, message */
-	PurpleConnection *gc = purple_conversation_get_gc(conv);
+	PurpleConnection *gc = purple_conversation_get_connection(conv);
 	zephyr_account *zephyr = purple_connection_get_protocol_data(gc);
 	if ( zephyr_send_message(zephyr,args[0],args[1],args[2],args[3],zephyr_get_signature(),""))
 		return PURPLE_CMD_RET_OK;
@@ -2679,7 +2679,7 @@ static PurpleCmdRet zephyr_purple_cmd_zi
 				      const char *cmd, char **args, char **error, void *data)
 {
 	/* args = instance, recipient, message */
-	PurpleConnection *gc = purple_conversation_get_gc(conv);
+	PurpleConnection *gc = purple_conversation_get_connection(conv);
 	zephyr_account *zephyr = purple_connection_get_protocol_data(gc);
 	if ( zephyr_send_message(zephyr,"message",args[0],args[1],args[2],zephyr_get_signature(),""))
 		return PURPLE_CMD_RET_OK;
@@ -2691,7 +2691,7 @@ static PurpleCmdRet zephyr_purple_cmd_zc
 				     const char *cmd, char **args, char **error, void *data)
 {
 	/* args = class, message */
-	PurpleConnection *gc = purple_conversation_get_gc(conv);
+	PurpleConnection *gc = purple_conversation_get_connection(conv);
 	zephyr_account *zephyr = purple_connection_get_protocol_data(gc);
 	if ( zephyr_send_message(zephyr,args[0],"PERSONAL","",args[1],zephyr_get_signature(),""))
 		return PURPLE_CMD_RET_OK;
============================================================
--- libpurple/protocols/yahoo/libymsg.c	c011e770810c77ce5a5a105dfc022713d3e3ca99
+++ libpurple/protocols/yahoo/libymsg.c	23474bb96a40b979634cbb4ed7a330f94521cee0
@@ -5232,7 +5232,7 @@ yahoopurple_cmd_chat_join(PurpleConversa
 	if (!args || !args[0])
 		return PURPLE_CMD_RET_FAILED;
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 	purple_debug_info("yahoo", "Trying to join %s \n", args[0]);
 
 	comp = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
============================================================
--- libpurple/conversation.h	e23cdc10184064bf2ef62564b3bbc1e1cccbf41e
+++ libpurple/conversation.h	b0f0a42820a06953a73980cbf1734e3034f56fce
@@ -355,13 +355,11 @@ PurpleAccount *purple_conversation_get_a
 /**
  * Returns the specified conversation's purple_connection.
  *
- * This is the same as purple_conversation_get_user(conv)->gc.
- *
  * @param conv The conversation.
  *
  * @return The conversation's purple_connection.
  */
-PurpleConnection *purple_conversation_get_gc(const PurpleConversation *conv);
+PurpleConnection *purple_conversation_get_connection(const PurpleConversation *conv);
 
 /**
  * Sets the specified conversation's title.
============================================================
--- pidgin/gtkconv.c	0226a01cbf41b8a54e64027617c2bc6ac3cdc74d
+++ pidgin/gtkconv.c	acd555e218fecc472d15c8ee3e7562c63b8ba982
@@ -563,7 +563,7 @@ check_for_and_do_command(PurpleConversat
 					PurplePluginProtocolInfo *prpl_info = NULL;
 					PurpleConnection *gc;
 
-					if ((gc = purple_conversation_get_gc(conv)))
+					if ((gc = purple_conversation_get_connection(conv)))
 						prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
 
 					if ((prpl_info != NULL) && (prpl_info->options & OPT_PROTO_SLASH_COMMANDS_NATIVE)) {
@@ -722,7 +722,7 @@ static void chat_do_info(PidginConversat
 	PurpleConversation *conv = gtkconv->active_conv;
 	PurpleConnection *gc;
 
-	if ((gc = purple_conversation_get_gc(conv))) {
+	if ((gc = purple_conversation_get_connection(conv))) {
 		pidgin_retrieve_user_info_in_chat(gc, who, purple_conv_chat_get_id(PURPLE_CONV_CHAT(conv)));
 	}
 }
@@ -734,7 +734,7 @@ info_cb(GtkWidget *widget, PidginConvers
 	PurpleConversation *conv = gtkconv->active_conv;
 
 	if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) {
-		pidgin_retrieve_user_info(purple_conversation_get_gc(conv),
+		pidgin_retrieve_user_info(purple_conversation_get_connection(conv),
 					  purple_conversation_get_name(conv));
 		gtk_widget_grab_focus(gtkconv->entry);
 	} else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) {
@@ -822,7 +822,7 @@ do_invite(GtkWidget *w, int resp, Invite
 		if (!g_ascii_strcasecmp(buddy, ""))
 			return;
 
-		serv_chat_invite(purple_conversation_get_gc(conv),
+		serv_chat_invite(purple_conversation_get_connection(conv),
 						 purple_conv_chat_get_id(PURPLE_CONV_CHAT(conv)),
 						 message, buddy);
 	}
@@ -1216,7 +1216,7 @@ menu_send_file_cb(gpointer data, guint a
 	PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win);
 
 	if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) {
-		serv_send_file(purple_conversation_get_gc(conv), purple_conversation_get_name(conv), NULL);
+		serv_send_file(purple_conversation_get_connection(conv), purple_conversation_get_name(conv), NULL);
 	}
 
 }
@@ -1233,7 +1233,7 @@ menu_get_attention_cb(gpointer data, gui
 			index = 0;
 		else
 			index = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "index"));
-		purple_prpl_send_attention(purple_conversation_get_gc(conv),
+		purple_prpl_send_attention(purple_conversation_get_connection(conv),
 			purple_conversation_get_name(conv), index);
 	}
 }
@@ -1568,7 +1568,7 @@ menu_chat_send_file_cb(GtkWidget *w, Pid
 	PurplePluginProtocolInfo *prpl_info;
 	PurpleConversation *conv = gtkconv->active_conv;
 	const char *who = g_object_get_data(G_OBJECT(w), "user_data");
-	PurpleConnection *gc  = purple_conversation_get_gc(conv);
+	PurpleConnection *gc  = purple_conversation_get_connection(conv);
 	gchar *real_who = NULL;
 
 	g_return_if_fail(gc != NULL);
@@ -2443,7 +2443,7 @@ delete_text_cb(GtkTextBuffer *textbuffer
 		/* We deleted all the text, so turn off typing. */
 		purple_conv_im_stop_send_typed_timeout(im);
 
-		serv_send_typing(purple_conversation_get_gc(conv),
+		serv_send_typing(purple_conversation_get_connection(conv),
 						 purple_conversation_get_name(conv),
 						 PURPLE_NOT_TYPING);
 	}
@@ -3396,7 +3396,7 @@ regenerate_attention_items(PidginWindow 
 	/* Remove the previous entries */
 	gtk_menu_item_set_submenu(GTK_MENU_ITEM(win->menu.get_attention), NULL);
 
-	pc = purple_conversation_get_gc(conv);
+	pc = purple_conversation_get_connection(conv);
 	if (pc != NULL)
 		prpl = purple_connection_get_prpl(pc);
 	if (prpl != NULL)
@@ -3706,7 +3706,7 @@ got_typing_keypress(PidginConversation *
 				  time(NULL) > purple_conv_im_get_type_again(im)))
 	{
 		unsigned int timeout;
-		timeout = serv_send_typing(purple_conversation_get_gc(conv),
+		timeout = serv_send_typing(purple_conversation_get_connection(conv),
 								   purple_conversation_get_name(conv),
 								   PURPLE_TYPING);
 		purple_conv_im_set_type_again(im, timeout);
@@ -4128,7 +4128,7 @@ add_chat_buddy_common(PurpleConversation
 	chat    = PURPLE_CONV_CHAT(conv);
 	gtkconv = PIDGIN_CONVERSATION(conv);
 	gtkchat = gtkconv->u.chat;
-	gc      = purple_conversation_get_gc(conv);
+	gc      = purple_conversation_get_connection(conv);
 
 	if (!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))))
 		return;
@@ -4438,7 +4438,7 @@ static void topic_callback(GtkWidget *w,
 	char *new_topic;
 	const char *current_topic;
 
-	gc      = purple_conversation_get_gc(conv);
+	gc      = purple_conversation_get_connection(conv);
 
 	if(!gc || !(prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc))))
 		return;
@@ -4581,7 +4581,7 @@ blist_node_aliased_cb(PurpleBlistNode *n
 	g_return_if_fail(node != NULL);
 	g_return_if_fail(conv != NULL);
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 	g_return_if_fail(gc != NULL);
 	g_return_if_fail(purple_connection_get_prpl(gc) != NULL);
 	prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
@@ -4791,7 +4791,7 @@ setup_chat_topic(PidginConversation *gtk
 setup_chat_topic(PidginConversation *gtkconv, GtkWidget *vbox)
 {
 	PurpleConversation *conv = gtkconv->active_conv;
-	PurpleConnection *gc = purple_conversation_get_gc(conv);
+	PurpleConnection *gc = purple_conversation_get_connection(conv);
 	PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
 	if (prpl_info->options & OPT_PROTO_CHAT_TOPIC)
 	{
@@ -5979,7 +5979,7 @@ static gboolean buddytag_event(GtkTextTa
 						&start, &end)) {
 				GtkWidget *menu = NULL;
 				PurpleConnection *gc =
-					purple_conversation_get_gc(conv);
+					purple_conversation_get_connection(conv);
 
 
 				menu = create_chat_menu(conv, buddyname, gc);
@@ -6922,7 +6922,7 @@ gray_stuff_out(PidginConversation *gtkco
 	PurpleAccount *account;
 
 	win     = pidgin_conv_get_window(gtkconv);
-	gc      = purple_conversation_get_gc(conv);
+	gc      = purple_conversation_get_connection(conv);
 	account = purple_conversation_get_account(conv);
 
 	if (gc != NULL)
@@ -7457,7 +7457,7 @@ pidgin_conv_update_buddy_icon(PurpleConv
 	if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons"))
 		return;
 
-	if (purple_conversation_get_gc(conv) == NULL)
+	if (purple_conversation_get_connection(conv) == NULL)
 		return;
 
 	buddy = purple_find_buddy(account, purple_conversation_get_name(conv));
@@ -9502,7 +9502,7 @@ infopane_entry_activate(PidginConversati
 		PurpleConnection *gc;
 		PurplePluginProtocolInfo *prpl_info = NULL;
 
-		gc = purple_conversation_get_gc(conv);
+		gc = purple_conversation_get_connection(conv);
 		if (gc != NULL)
 			prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
 		if (prpl_info && prpl_info->set_chat_topic == NULL)
============================================================
--- libpurple/protocols/irc/parse.c	be080899e23f71120d2648b1d5d40089dc9d7a89
+++ libpurple/protocols/irc/parse.c	911696a00320f49f6202743847a508fefa16e995
@@ -171,7 +171,7 @@ static PurpleCmdRet irc_parse_purple_cmd
 	struct irc_conn *irc;
 	struct _irc_user_cmd *cmdent;
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 	if (!gc)
 		return PURPLE_CMD_RET_FAILED;
 
============================================================
--- libpurple/plugins/perl/common/Conversation.xs	1d2c427dff5e5fad19190ca86eafa90546ecceb4
+++ libpurple/plugins/perl/common/Conversation.xs	f38bcaa0037f58ba2ef3715cd26ec8a296e115ec
@@ -146,7 +146,7 @@ Purple::Connection
 	Purple::Conversation conv
 
 Purple::Connection
-purple_conversation_get_gc(conv)
+purple_conversation_get_connection(conv)
 	Purple::Conversation conv
 
 void
============================================================
--- pidgin/gtkimhtmltoolbar.c	ce1bba421fc917e85fb2149252c224ea5ccf9ffb
+++ pidgin/gtkimhtmltoolbar.c	7fd17fae28b4f94cc8d88c73fc450d32099a35de
@@ -904,7 +904,7 @@ static void send_attention_cb(GtkWidget 
 	PurpleConversation *conv =
 		g_object_get_data(G_OBJECT(toolbar), "active_conv");
 	const gchar *who = purple_conversation_get_name(conv);
-	PurpleConnection *gc = purple_conversation_get_gc(conv);
+	PurpleConnection *gc = purple_conversation_get_connection(conv);
 
 	toggle_button_set_active_block(GTK_TOGGLE_BUTTON(attention), FALSE, toolbar);
 	purple_prpl_send_attention(gc, who, 0);
@@ -1581,7 +1581,7 @@ void gtk_imhtmltoolbar_switch_active_con
 void gtk_imhtmltoolbar_switch_active_conversation(GtkIMHtmlToolbar *toolbar,
 	PurpleConversation *conv)
 {
-	PurpleConnection *gc = purple_conversation_get_gc(conv);
+	PurpleConnection *gc = purple_conversation_get_connection(conv);
 	PurplePlugin *prpl = purple_connection_get_prpl(gc);
 	GtkWidget *attention =
 		g_object_get_data(G_OBJECT(toolbar), "attention");
============================================================
--- libpurple/protocols/silc/silc.c	ac98605ca1f26b42d3cca1b0b9cbfbb5cb99e3ed
+++ libpurple/protocols/silc/silc.c	f6bf84b3443f22cd069efd6c7058c596960d6a2c
@@ -1548,7 +1548,7 @@ static PurpleCmdRet silcpurple_cmd_chat_
 	PurpleConversation *convo = conv;
 	int id = 0;
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 
 	if (gc == NULL)
 		return PURPLE_CMD_RET_FAILED;
@@ -1577,7 +1577,7 @@ static PurpleCmdRet silcpurple_cmd_chat_
 	char *buf, *tmp, *tmp2;
 	const char *topic;
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 	id = purple_conv_chat_get_id(PURPLE_CONV_CHAT(conv));
 
 	if (gc == NULL || id == 0)
@@ -1623,7 +1623,7 @@ static PurpleCmdRet silcpurple_cmd_chat_
 	if(args[1])
 		g_hash_table_replace(comp, "passphrase", args[1]);
 
-	silcpurple_chat_join(purple_conversation_get_gc(conv), comp);
+	silcpurple_chat_join(purple_conversation_get_connection(conv), comp);
 
 	g_hash_table_destroy(comp);
 	return PURPLE_CMD_RET_OK;
@@ -1633,7 +1633,7 @@ static PurpleCmdRet silcpurple_cmd_chat_
         const char *cmd, char **args, char **error, void *data)
 {
 	PurpleConnection *gc;
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 	purple_roomlist_show_with_account(purple_connection_get_account(gc));
 	return PURPLE_CMD_RET_OK;
 }
@@ -1643,7 +1643,7 @@ static PurpleCmdRet silcpurple_cmd_whois
 {
 	PurpleConnection *gc;
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 
 	if (gc == NULL)
 		return PURPLE_CMD_RET_FAILED;
@@ -1659,7 +1659,7 @@ static PurpleCmdRet silcpurple_cmd_msg(P
 	int ret;
 	PurpleConnection *gc;
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 
 	if (gc == NULL)
 		return PURPLE_CMD_RET_FAILED;
@@ -1685,7 +1685,7 @@ static PurpleCmdRet silcpurple_cmd_query
 		return PURPLE_CMD_RET_FAILED;
 	}
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 
 	if (gc == NULL)
 		return PURPLE_CMD_RET_FAILED;
@@ -1713,7 +1713,7 @@ static PurpleCmdRet silcpurple_cmd_motd(
 	SilcPurple sg;
 	char *tmp;
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 
 	if (gc == NULL)
 		return PURPLE_CMD_RET_FAILED;
@@ -1742,7 +1742,7 @@ static PurpleCmdRet silcpurple_cmd_detac
 	PurpleConnection *gc;
 	SilcPurple sg;
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 
 	if (gc == NULL)
 		return PURPLE_CMD_RET_FAILED;
@@ -1767,7 +1767,7 @@ static PurpleCmdRet silcpurple_cmd_cmode
 	char *silccmd, *silcargs, *msg, tmp[256];
 	const char *chname;
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 
 	if (gc == NULL || !args || purple_connection_get_protocol_data(gc) == NULL)
 		return PURPLE_CMD_RET_FAILED;
@@ -1818,7 +1818,7 @@ static PurpleCmdRet silcpurple_cmd_gener
 	SilcPurple sg;
 	char *silccmd, *silcargs;
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 
 	if (gc == NULL)
 		return PURPLE_CMD_RET_FAILED;
@@ -1850,7 +1850,7 @@ static PurpleCmdRet silcpurple_cmd_quit(
 	const char *ui_name = NULL, *ui_website = NULL;
 	char *quit_msg;
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 
 	if (gc == NULL)
 		return PURPLE_CMD_RET_FAILED;
@@ -1887,7 +1887,7 @@ static PurpleCmdRet silcpurple_cmd_call(
 	PurpleConnection *gc;
 	SilcPurple sg;
 
-	gc = purple_conversation_get_gc(conv);
+	gc = purple_conversation_get_connection(conv);
 
 	if (gc == NULL)
 		return PURPLE_CMD_RET_FAILED;
============================================================
--- ChangeLog.API	6eb02652a82553263f8c1583a5cf3be284a0c46d
+++ ChangeLog.API	d300e384bade3f76669ef2100581e68363df7251
@@ -74,6 +74,8 @@ version 3.0.0 (??/??/????):
 		  PurpleCertificate*s as the second parameter
 		* purple_connection_error now takes a PurpleConnectionError
 		  as the second parameter
+		* purple_conversation_get_gc renamed to
+		  purple_conversation_get_connection
 		* purple_dnsquery_a now takes a PurpleAccount as the first parameter
 		* purple_network_listen now takes the protocol family as the second
 		  parameter
============================================================
--- libpurple/protocols/sametime/sametime.c	45ec2ffd890f1cbd5d6d2e4a7e3dd81dff785679
+++ libpurple/protocols/sametime/sametime.c	d9cee16c638eb7c772059756d69ece28d507ab99
@@ -1280,7 +1280,7 @@ static void conversation_created_cb(Purp
   struct mwIdBlock who = { 0, 0 };
   struct mwConversation *conv;
 
-  gc = purple_conversation_get_gc(g_conv);
+  gc = purple_conversation_get_connection(g_conv);
   if(pd->gc != gc)
     return; /* not ours */
 
@@ -2528,7 +2528,7 @@ static void convo_nofeatures(struct mwCo
   gconv = convo_get_gconv(conv);
   if(! gconv) return;
 
-  gc = purple_conversation_get_gc(gconv);
+  gc = purple_conversation_get_connection(gconv);
   if(! gc) return;
 
   purple_conversation_set_features(gconv, purple_connection_get_flags(gc));
============================================================
--- pidgin/plugins/musicmessaging/musicmessaging.c	9d0f69ad3189f27bc1bc7386f9fe4339e5837722
+++ pidgin/plugins/musicmessaging/musicmessaging.c	b30aae9f2d30f4a41b4595a739d3754814b569f3
@@ -466,14 +466,14 @@ static void send_request(MMConversation 
 
 static void send_request(MMConversation *mmconv)
 {
-	PurpleConnection *connection = purple_conversation_get_gc(mmconv->conv);
+	PurpleConnection *connection = purple_conversation_get_connection(mmconv->conv);
 	const char *convName = purple_conversation_get_name(mmconv->conv);
 	serv_send_im(connection, convName, MUSICMESSAGING_START_MSG, PURPLE_MESSAGE_SEND);
 }
 
 static void send_request_confirmed(MMConversation *mmconv)
 {
-	PurpleConnection *connection = purple_conversation_get_gc(mmconv->conv);
+	PurpleConnection *connection = purple_conversation_get_connection(mmconv->conv);
 	const char *convName = purple_conversation_get_name(mmconv->conv);
 	serv_send_im(connection, convName, MUSICMESSAGING_CONFIRM_MSG, PURPLE_MESSAGE_SEND);
 }
============================================================
--- finch/gntconv.c	57f9659eb07dc1876e832e03d93bb4048b63a917
+++ finch/gntconv.c	bc01c894f215b8eb38cc8797028459561fe0420a
@@ -123,7 +123,7 @@ send_typing_notification(GntWidget *w, F
 			if (send || (purple_conv_im_get_type_again(im) != 0 &&
 						  time(NULL) > purple_conv_im_get_type_again(im))) {
 				unsigned int timeout;
-				timeout = serv_send_typing(purple_conversation_get_gc(conv),
+				timeout = serv_send_typing(purple_conversation_get_connection(conv),
 										   purple_conversation_get_name(conv),
 										   PURPLE_TYPING);
 				purple_conv_im_set_type_again(im, timeout);
@@ -131,7 +131,7 @@ send_typing_notification(GntWidget *w, F
 		} else {
 			purple_conv_im_stop_send_typed_timeout(im);
 
-			serv_send_typing(purple_conversation_get_gc(conv),
+			serv_send_typing(purple_conversation_get_connection(conv),
 							 purple_conversation_get_name(conv),
 							 PURPLE_NOT_TYPING);
 		}
@@ -414,7 +414,7 @@ send_file_cb(GntMenuItem *item, gpointer
 send_file_cb(GntMenuItem *item, gpointer ggconv)
 {
 	FinchConv *ggc = ggconv;
-	serv_send_file(purple_conversation_get_gc(ggc->active_conv),
+	serv_send_file(purple_conversation_get_connection(ggc->active_conv),
 			purple_conversation_get_name(ggc->active_conv), NULL);
 }
 
@@ -431,7 +431,7 @@ get_info_cb(GntMenuItem *item, gpointer 
 get_info_cb(GntMenuItem *item, gpointer ggconv)
 {
 	FinchConv *ggc = ggconv;
-	finch_retrieve_user_info(purple_conversation_get_gc(ggc->active_conv),
+	finch_retrieve_user_info(purple_conversation_get_connection(ggc->active_conv),
 			purple_conversation_get_name(ggc->active_conv));
 }
 
============================================================
--- libpurple/protocols/mxit/mxit.c	7f9aabeef487156d7a33e0051fca12ff09206050
+++ libpurple/protocols/mxit/mxit.c	935121cd3dabbd0b544e80e8c3c5bfcfd836e348
@@ -176,7 +176,7 @@ static void mxit_cb_chat_created( Purple
 	const char*			who;
 	char*				tmp;
 
-	gc = purple_conversation_get_gc( conv );
+	gc = purple_conversation_get_connection( conv );
 	if ( session->con != gc ) {
 		/* not our conversation */
 		return;


More information about the Commits mailing list