/soc/2013/ankitkv/gobjectification: caaadef03507: Renamed purple...

Ankit Vani a at nevitus.org
Sat Aug 31 15:28:41 EDT 2013


Changeset: caaadef035072fa5c367e235229c381d6f9ff8fe
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-08-31 23:22 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/caaadef03507

Description:

Renamed purple_connection_get_protocol_info() to purple_connection_get_protocol()

diffstat:

 finch/gntblist.c                      |  12 +++++-----
 finch/gntconv.c                       |   6 ++--
 finch/gntroomlist.c                   |   4 +-
 libpurple/account.c                   |  20 +++++++++---------
 libpurple/blistnodetypes.c            |   2 +-
 libpurple/buddyicon.c                 |   2 +-
 libpurple/connection.c                |   4 +-
 libpurple/connection.h                |   2 +-
 libpurple/conversation.c              |   2 +-
 libpurple/conversationtypes.c         |   8 +++---
 libpurple/plugins/perl/common/Prpl.xs |   2 +-
 libpurple/plugins/signals-test.c      |   2 +-
 libpurple/presence.c                  |   2 +-
 libpurple/protocols.c                 |   4 +-
 libpurple/protocols/irc/msgs.c        |   2 +-
 libpurple/protocols/jabber/iq.c       |   4 +-
 libpurple/protocols/jabber/jabber.c   |   6 ++--
 libpurple/protocols/jabber/message.c  |   2 +-
 libpurple/protocols/jabber/presence.c |   2 +-
 libpurple/protocols/oscar/oscar.c     |   4 +-
 libpurple/roomlist.c                  |   6 ++--
 libpurple/server.c                    |  36 +++++++++++++++++-----------------
 libpurple/whiteboard.c                |   2 +-
 pidgin/gtkblist.c                     |  30 ++++++++++++++--------------
 pidgin/gtkconv.c                      |  30 ++++++++++++++--------------
 pidgin/gtkdocklet.c                   |   6 ++--
 pidgin/gtkimhtmltoolbar.c             |   2 +-
 pidgin/gtkroomlist.c                  |   4 +-
 pidgin/gtkutils.c                     |   8 +++---
 pidgin/gtkwebviewtoolbar.c            |   2 +-
 pidgin/plugins/disco/xmppdisco.c      |   8 +++---
 pidgin/plugins/xmppconsole.c          |   2 +-
 32 files changed, 114 insertions(+), 114 deletions(-)

diffs (truncated from 1101 to 300 lines):

diff --git a/finch/gntblist.c b/finch/gntblist.c
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -742,7 +742,7 @@ add_chat_cb(void *data, PurpleRequestFie
 		group = _("Chats");
 
 	gc = purple_account_get_connection(account);
-	protocol = purple_connection_get_protocol_info(gc);
+	protocol = purple_connection_get_protocol(gc);
 	if (protocol->chat_info_defaults != NULL)
 		hash = purple_protocol_iface_chat_info_defaults(protocol, gc, name);
 
@@ -1062,7 +1062,7 @@ static void
 append_proto_menu(GntMenu *menu, PurpleConnection *gc, PurpleBlistNode *node)
 {
 	GList *list;
-	PurpleProtocol *protocol = purple_connection_get_protocol_info(gc);
+	PurpleProtocol *protocol = purple_connection_get_protocol(gc);
 
 	if(!protocol || !protocol->blist_node_menu)
 		return;
@@ -1126,7 +1126,7 @@ chat_components_edit(PurpleBlistNode *se
 	purple_request_fields_add_group(fields, group);
 
 	gc = purple_account_get_connection(purple_chat_get_account(chat));
-	parts = purple_connection_get_protocol_info(gc)->chat_info(gc);
+	parts = purple_connection_get_protocol(gc)->chat_info(gc);
 
 	for (iter = parts; iter; iter = iter->next) {
 		pce = iter->data;
@@ -1277,7 +1277,7 @@ create_buddy_menu(GntMenu *menu, PurpleB
 	PurpleProtocol *protocol;
 	PurpleConnection *gc = purple_account_get_connection(purple_buddy_get_account(buddy));
 
-	protocol = purple_connection_get_protocol_info(gc);
+	protocol = purple_connection_get_protocol(gc);
 	if (protocol && protocol->get_info)
 	{
 		add_custom_action(menu, _("Get Info"),
@@ -2611,7 +2611,7 @@ reconstruct_accounts_menu(void)
 
 		if (!gc || !PURPLE_CONNECTION_IS_CONNECTED(gc))
 			continue;
-		protocol = purple_connection_get_protocol_info(gc);
+		protocol = purple_connection_get_protocol(gc);
 
 		if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(protocol, get_actions)) {
 			item = gnt_menuitem_new(purple_account_get_username(account));
@@ -2816,7 +2816,7 @@ join_chat_select_cb(gpointer data, Purpl
 
 	chat = purple_blist_find_chat(account, name);
 	if (chat == NULL) {
-		PurpleProtocol *protocol = purple_connection_get_protocol_info(gc);
+		PurpleProtocol *protocol = purple_connection_get_protocol(gc);
 		if (protocol->chat_info_defaults != NULL)
 			hash = purple_protocol_iface_chat_info_defaults(protocol, gc, name);
 	} else {
diff --git a/finch/gntconv.c b/finch/gntconv.c
--- a/finch/gntconv.c
+++ b/finch/gntconv.c
@@ -339,7 +339,7 @@ account_signed_on_off(PurpleConnection *
 
 			chat = find_chat_for_conversation(conv);
 			if (chat == NULL) {
-				PurpleProtocol *info = purple_connection_get_protocol_info(gc);
+				PurpleProtocol *info = purple_connection_get_protocol(gc);
 				if (info->chat_info_defaults != NULL)
 					comps = info->chat_info_defaults(gc, purple_conversation_get_name(conv));
 			} else {
@@ -637,7 +637,7 @@ gg_create_menu(FinchConv *ggc)
 		PurpleAccount *account = purple_conversation_get_account(ggc->active_conv);
 		PurpleConnection *gc = purple_account_get_connection(account);
 		PurpleProtocol *pinfo =
-			gc ? purple_connection_get_protocol_info(gc) : NULL;
+			gc ? purple_connection_get_protocol(gc) : NULL;
 
 		if (pinfo && pinfo->get_info) {
 			item = gnt_menuitem_new(_("Get Info"));
@@ -703,7 +703,7 @@ create_conv_from_userlist(GntWidget *wid
 
 	name = gnt_tree_get_selection_data(GNT_TREE(widget));
 
-	protocol = purple_connection_get_protocol_info(gc);
+	protocol = purple_connection_get_protocol(gc);
 	if (protocol && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(protocol, get_cb_real_name))
 		realname = purple_protocol_iface_get_cb_real_name(protocol, gc, purple_chat_conversation_get_id(
 				PURPLE_CHAT_CONVERSATION(fc->active_conv)), name);
diff --git a/finch/gntroomlist.c b/finch/gntroomlist.c
--- a/finch/gntroomlist.c
+++ b/finch/gntroomlist.c
@@ -118,7 +118,7 @@ static void fl_add_chat(GntWidget *butto
 	if (gc == NULL || room == NULL)
 		return;
 
-	protocol = purple_connection_get_protocol_info(gc);
+	protocol = purple_connection_get_protocol(gc);
 
 	if(protocol != NULL && protocol->roomlist_room_serialize)
 		name = purple_protocol_iface_roomlist_room_serialize(protocol, room);
@@ -240,7 +240,7 @@ reset_account_list(PurpleAccount *accoun
 		PurpleProtocol *protocol = NULL;
 		PurpleConnection *gc = list->data;
 
-		protocol = purple_connection_get_protocol_info(gc);
+		protocol = purple_connection_get_protocol(gc);
 		if (PURPLE_CONNECTION_IS_CONNECTED(gc) &&
 		        protocol->roomlist_get_list != NULL) {
 			PurpleAccount *account = purple_connection_get_account(gc);
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -622,7 +622,7 @@ purple_account_request_change_password(P
 
 	gc = purple_account_get_connection(account);
 	if (gc != NULL)
-		protocol = purple_connection_get_protocol_info(gc);
+		protocol = purple_connection_get_protocol(gc);
 
 	fields = purple_request_fields_new();
 
@@ -1021,7 +1021,7 @@ purple_account_set_public_alias(PurpleAc
 	g_return_if_fail(purple_account_is_connected(account));
 
 	gc = purple_account_get_connection(account);
-	protocol = purple_connection_get_protocol_info(gc);
+	protocol = purple_connection_get_protocol(gc);
 
 	if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, set_public_alias))
 		purple_protocol_iface_set_public_alias(protocol, gc, alias, success_cb, failure_cb);
@@ -1059,7 +1059,7 @@ purple_account_get_public_alias(PurpleAc
 	g_return_if_fail(purple_account_is_connected(account));
 
 	gc = purple_account_get_connection(account);
-	protocol = purple_connection_get_protocol_info(gc);
+	protocol = purple_connection_get_protocol(gc);
 
 	if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, get_public_alias))
 		purple_protocol_iface_get_public_alias(protocol, gc, success_cb, failure_cb);
@@ -2218,7 +2218,7 @@ purple_account_add_buddy(PurpleAccount *
 
 	gc = purple_account_get_connection(account);
 	if (gc != NULL)
-		protocol = purple_connection_get_protocol_info(gc);
+		protocol = purple_connection_get_protocol(gc);
 
 	if (protocol != NULL)
 		purple_protocol_iface_add_buddy(protocol, gc, buddy,
@@ -2232,7 +2232,7 @@ purple_account_add_buddies(PurpleAccount
 	PurpleConnection *gc = purple_account_get_connection(account);
 
 	if (gc != NULL)
-		protocol = purple_connection_get_protocol_info(gc);
+		protocol = purple_connection_get_protocol(gc);
 
 	if (protocol) {
 		GList *cur, *groups = NULL;
@@ -2267,7 +2267,7 @@ purple_account_remove_buddy(PurpleAccoun
 	PurpleConnection *gc = purple_account_get_connection(account);
 
 	if (gc != NULL)
-		protocol = purple_connection_get_protocol_info(gc);
+		protocol = purple_connection_get_protocol(gc);
 
 	if (protocol)
 		purple_protocol_iface_remove_buddy(protocol, gc, buddy, group);
@@ -2280,7 +2280,7 @@ purple_account_remove_buddies(PurpleAcco
 	PurpleConnection *gc = purple_account_get_connection(account);
 
 	if (gc != NULL)
-		protocol = purple_connection_get_protocol_info(gc);
+		protocol = purple_connection_get_protocol(gc);
 
 	if (protocol) {
 		if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, remove_buddies))
@@ -2304,7 +2304,7 @@ purple_account_remove_group(PurpleAccoun
 	PurpleConnection *gc = purple_account_get_connection(account);
 
 	if (gc != NULL)
-		protocol = purple_connection_get_protocol_info(gc);
+		protocol = purple_connection_get_protocol(gc);
 
 	if (protocol)
 		purple_protocol_iface_remove_group(protocol, gc, group);
@@ -2320,7 +2320,7 @@ purple_account_change_password(PurpleAcc
 	purple_account_set_password(account, new_pw, NULL, NULL);
 
 	if (gc != NULL)
-		protocol = purple_connection_get_protocol_info(gc);
+		protocol = purple_connection_get_protocol(gc);
 
 	if (protocol)
 		purple_protocol_iface_change_passwd(protocol, gc, orig_pw, new_pw);
@@ -2338,7 +2338,7 @@ gboolean purple_account_supports_offline
 	if (gc == NULL)
 		return FALSE;
 
-	protocol = purple_connection_get_protocol_info(gc);
+	protocol = purple_connection_get_protocol(gc);
 
 	if (!protocol)
 		return FALSE;
diff --git a/libpurple/blistnodetypes.c b/libpurple/blistnodetypes.c
--- a/libpurple/blistnodetypes.c
+++ b/libpurple/blistnodetypes.c
@@ -1522,7 +1522,7 @@ void purple_group_set_name(PurpleGroup *
 			gc = purple_account_get_connection(account);
 
 			if(gc)
-				protocol = purple_connection_get_protocol_info(gc);
+				protocol = purple_connection_get_protocol(gc);
 
 			if(!protocol)
 				continue;
diff --git a/libpurple/buddyicon.c b/libpurple/buddyicon.c
--- a/libpurple/buddyicon.c
+++ b/libpurple/buddyicon.c
@@ -748,7 +748,7 @@ purple_buddy_icons_set_account_icon(Purp
 		PurpleProtocol *protocol;
 
 		gc = purple_account_get_connection(account);
-		protocol = purple_connection_get_protocol_info(gc);
+		protocol = purple_connection_get_protocol(gc);
 
 		if (protocol)
 			purple_protocol_iface_set_buddy_icon(protocol, gc, img);
diff --git a/libpurple/connection.c b/libpurple/connection.c
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -316,7 +316,7 @@ purple_connection_get_account(const Purp
 }
 
 PurpleProtocol *
-purple_connection_get_protocol_info(const PurpleConnection *gc)
+purple_connection_get_protocol(const PurpleConnection *gc)
 {
 	PurpleConnectionPrivate *priv = PURPLE_CONNECTION_GET_PRIVATE(gc);
 
@@ -649,7 +649,7 @@ purple_connection_get_property(GObject *
 
 	switch (param_id) {
 		case PROP_PROTOCOL:
-			g_value_set_object(value, purple_connection_get_protocol_info(gc));
+			g_value_set_object(value, purple_connection_get_protocol(gc));
 			break;
 		case PROP_FLAGS:
 			g_value_set_flags(value, purple_connection_get_flags(gc));
diff --git a/libpurple/connection.h b/libpurple/connection.h
--- a/libpurple/connection.h
+++ b/libpurple/connection.h
@@ -358,7 +358,7 @@ PurpleAccount *purple_connection_get_acc
  *
  * @return The protocol plugin.
  */
-PurpleProtocol *purple_connection_get_protocol_info(const PurpleConnection *gc);
+PurpleProtocol *purple_connection_get_protocol(const PurpleConnection *gc);
 
 /**
  * Returns the connection's password.
diff --git a/libpurple/conversation.c b/libpurple/conversation.c
--- a/libpurple/conversation.c
+++ b/libpurple/conversation.c
@@ -893,7 +893,7 @@ purple_conversation_get_max_message_size
 
 	g_return_val_if_fail(conv != NULL, 0);
 
-	protocol = purple_connection_get_protocol_info(
+	protocol = purple_connection_get_protocol(
 		purple_conversation_get_connection(conv));
 
 	g_return_val_if_fail(protocol != NULL, 0);
diff --git a/libpurple/conversationtypes.c b/libpurple/conversationtypes.c
--- a/libpurple/conversationtypes.c
+++ b/libpurple/conversationtypes.c
@@ -460,7 +460,7 @@ purple_im_conversation_dispose(GObject *
 	if (gc != NULL)
 	{
 		/* Still connected */
-		protocol = purple_connection_get_protocol_info(gc);
+		protocol = purple_connection_get_protocol(gc);
 
 		if (purple_prefs_get_bool("/purple/conversations/im/send_typing"))
 			serv_send_typing(gc, name, PURPLE_IM_NOT_TYPING);
@@ -847,7 +847,7 @@ purple_chat_conversation_add_users(Purpl
 	account = purple_conversation_get_account(conv);
 	gc = purple_conversation_get_connection(conv);
 	g_return_if_fail(gc != NULL);
-	protocol = purple_connection_get_protocol_info(gc);
+	protocol = purple_connection_get_protocol(gc);
 	g_return_if_fail(protocol != NULL);
 
 	ul = users;
@@ -954,7 +954,7 @@ purple_chat_conversation_rename_user(Pur
 
 	gc = purple_conversation_get_connection(conv);
 	g_return_if_fail(gc != NULL);
-	protocol = purple_connection_get_protocol_info(gc);
+	protocol = purple_connection_get_protocol(gc);
 	g_return_if_fail(protocol != NULL);
 
 	if (purple_strequal(priv->nick, purple_normalize(account, old_user))) {



More information about the Commits mailing list