/soc/2013/ankitkv/gobjectification: 23b59a16c808: Replaced some ...

Ankit Vani a at nevitus.org
Sat Aug 17 15:16:04 EDT 2013


Changeset: 23b59a16c8084d2d7588be41ec43e456d361f1af
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-08-18 00:04 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/23b59a16c808

Description:

Replaced some _prpl_ stuff with _protocol_

diffstat:

 finch/gntaccount.c                                  |   22 +-
 finch/gntconv.c                                     |    2 +-
 finch/gntmedia.c                                    |    2 +-
 libpurple/cmds.c                                    |   32 +-
 libpurple/cmds.h                                    |   10 +-
 libpurple/ft.c                                      |   12 +-
 libpurple/ft.h                                      |    2 +-
 libpurple/log.c                                     |    6 +-
 libpurple/media.c                                   |   26 +-
 libpurple/media.h                                   |    6 +-
 libpurple/media/backend-fs2.c                       |    6 +-
 libpurple/mediamanager.c                            |    4 +-
 libpurple/plugins.h                                 |    4 +-
 libpurple/plugins/log_reader.c                      |   20 +-
 libpurple/plugins/perl/common/Cmds.xs               |   10 +-
 libpurple/plugins/perl/common/Prpl.xs               |   18 +-
 libpurple/plugins/perl/perl-handlers.c              |    8 +-
 libpurple/plugins/perl/perl-handlers.h              |    4 +-
 libpurple/plugins/tcl/tcl_cmd.c                     |    2 +-
 libpurple/plugins/tcl/tcl_cmds.c                    |    4 +-
 libpurple/plugins/tcl/tcl_purple.h                  |    2 +-
 libpurple/presence.c                                |    4 +-
 libpurple/protocol.c                                |   46 +-
 libpurple/protocol.h                                |   40 +-
 libpurple/protocols/bonjour/bonjour.c               |    2 +-
 libpurple/protocols/bonjour/buddy.c                 |    8 +-
 libpurple/protocols/gg/gg.c                         |    4 +-
 libpurple/protocols/gg/pubdir-prpl.c                |   16 +-
 libpurple/protocols/gg/pubdir-prpl.h                |    8 +-
 libpurple/protocols/gg/status.c                     |    6 +-
 libpurple/protocols/irc/irc.c                       |    4 +-
 libpurple/protocols/irc/msgs.c                      |    4 +-
 libpurple/protocols/irc/parse.c                     |    4 +-
 libpurple/protocols/jabber/adhoccommands.c          |    2 +-
 libpurple/protocols/jabber/buddy.c                  |    2 +-
 libpurple/protocols/jabber/caps.c                   |    4 +-
 libpurple/protocols/jabber/google/google_presence.c |    4 +-
 libpurple/protocols/jabber/google/google_roster.c   |    2 +-
 libpurple/protocols/jabber/google/google_session.c  |    6 +-
 libpurple/protocols/jabber/jabber.c                 |   66 ++--
 libpurple/protocols/jabber/jabber.h                 |    2 +-
 libpurple/protocols/jabber/jingle/rtp.c             |    4 +-
 libpurple/protocols/jabber/libfacebook.c            |    4 +-
 libpurple/protocols/jabber/libgtalk.c               |    4 +-
 libpurple/protocols/jabber/libxmpp.c                |    4 +-
 libpurple/protocols/jabber/message.c                |    2 +-
 libpurple/protocols/jabber/presence.c               |   14 +-
 libpurple/protocols/jabber/roster.c                 |    2 +-
 libpurple/protocols/jabber/si.c                     |    6 +-
 libpurple/protocols/jabber/usermood.c               |    4 +-
 libpurple/protocols/jabber/usertune.c               |    4 +-
 libpurple/protocols/msn/contact.c                   |    4 +-
 libpurple/protocols/msn/msg.c                       |    6 +-
 libpurple/protocols/msn/msn.c                       |   12 +-
 libpurple/protocols/msn/slplink.c                   |    2 +-
 libpurple/protocols/msn/slpmsg_part.c               |    2 +-
 libpurple/protocols/msn/user.c                      |   22 +-
 libpurple/protocols/mxit/mxit.c                     |    2 +-
 libpurple/protocols/mxit/roster.c                   |   22 +-
 libpurple/protocols/myspace/myspace.c               |   12 +-
 libpurple/protocols/myspace/myspace.h               |    2 +-
 libpurple/protocols/myspace/user.c                  |    6 +-
 libpurple/protocols/myspace/zap.c                   |    4 +-
 libpurple/protocols/novell/novell.c                 |    6 +-
 libpurple/protocols/null/nullprpl.c                 |    4 +-
 libpurple/protocols/oscar/authorization.c           |    4 +-
 libpurple/protocols/oscar/family_icbm.c             |    2 +-
 libpurple/protocols/oscar/family_icq.c              |    2 +-
 libpurple/protocols/oscar/family_locate.c           |   12 +-
 libpurple/protocols/oscar/libaim.c                  |    2 +-
 libpurple/protocols/oscar/libicq.c                  |    2 +-
 libpurple/protocols/oscar/oscar.c                   |   30 +-
 libpurple/protocols/sametime/sametime.c             |  246 ++++++++++----------
 libpurple/protocols/silc/buddy.c                    |    6 +-
 libpurple/protocols/silc/ops.c                      |    8 +-
 libpurple/protocols/silc/silc.c                     |  114 ++++----
 libpurple/protocols/simple/simple.c                 |   10 +-
 libpurple/protocols/yahoo/libyahoo.c                |   20 +-
 libpurple/protocols/yahoo/libyahoojp.c              |   20 +-
 libpurple/protocols/yahoo/libymsg.c                 |   22 +-
 libpurple/protocols/zephyr/zephyr.c                 |   62 ++--
 libpurple/status.c                                  |    2 +-
 libpurple/whiteboard.c                              |   48 +-
 libpurple/whiteboard.h                              |    2 +-
 pidgin/gtkaccount.c                                 |   10 +-
 pidgin/gtkblist.c                                   |   84 +++---
 pidgin/gtkconv.c                                    |   32 +-
 pidgin/gtkimhtmltoolbar.c                           |    2 +-
 pidgin/gtklog.c                                     |   10 +-
 pidgin/gtknotify.c                                  |    6 +-
 pidgin/gtkpounce.c                                  |    2 +-
 pidgin/gtkrequest.c                                 |    2 +-
 pidgin/gtksavedstatuses.c                           |    2 +-
 pidgin/gtkstatusbox.c                               |    2 +-
 pidgin/gtkutils.c                                   |   50 ++--
 pidgin/gtkutils.h                                   |    8 +-
 pidgin/gtkwebviewtoolbar.c                          |    2 +-
 pidgin/plugins/disco/xmppdisco.c                    |    6 +-
 pidgin/plugins/gevolution/add_buddy_dialog.c        |   12 +-
 pidgin/plugins/gevolution/assoc-buddy.c             |    8 +-
 pidgin/plugins/gevolution/eds-utils.c               |    2 +-
 pidgin/plugins/gevolution/gevo-util.c               |   12 +-
 pidgin/plugins/gevolution/gevolution.c              |    8 +-
 pidgin/plugins/gevolution/gevolution.h              |    4 +-
 pidgin/plugins/raw.c                                |   16 +-
 105 files changed, 742 insertions(+), 742 deletions(-)

diffs (truncated from 4973 to 300 lines):

diff --git a/finch/gntaccount.c b/finch/gntaccount.c
--- a/finch/gntaccount.c
+++ b/finch/gntaccount.c
@@ -74,7 +74,7 @@ typedef struct
 	GntWidget *splits;
 	GList *split_entries;
 
-	GList *prpl_entries;
+	GList *protocol_entries;
 	GntWidget *prpls;
 
 	GntWidget *newmail;
@@ -101,7 +101,7 @@ static void
 edit_dialog_destroy(AccountEditDialog *dialog)
 {
 	accountdialogs = g_list_remove(accountdialogs, dialog);
-	g_list_free(dialog->prpl_entries);
+	g_list_free(dialog->protocol_entries);
 	g_list_free(dialog->split_entries);
 	g_free(dialog);
 }
@@ -206,7 +206,7 @@ save_account_cb(AccountEditDialog *dialo
 	{
 		GList *iter, *entries;
 
-		for (iter = protocol->protocol_options, entries = dialog->prpl_entries;
+		for (iter = protocol->protocol_options, entries = dialog->protocol_entries;
 				iter && entries; iter = iter->next, entries = entries->next)
 		{
 			PurpleAccountOption *option = iter->data;
@@ -379,10 +379,10 @@ add_protocol_options(AccountEditDialog *
 		gnt_box_set_fill(GNT_BOX(vbox), TRUE);
 	}
 
-	if (dialog->prpl_entries)
+	if (dialog->protocol_entries)
 	{
-		g_list_free(dialog->prpl_entries);
-		dialog->prpl_entries = NULL;
+		g_list_free(dialog->protocol_entries);
+		dialog->protocol_entries = NULL;
 	}
 
 	vbox = dialog->prpls;
@@ -406,7 +406,7 @@ add_protocol_options(AccountEditDialog *
 		{
 			GntWidget *widget = gnt_check_box_new(purple_account_option_get_text(option));
 			gnt_box_add_widget(GNT_BOX(box), widget);
-			dialog->prpl_entries = g_list_append(dialog->prpl_entries, widget);
+			dialog->protocol_entries = g_list_append(dialog->protocol_entries, widget);
 
 			if (account)
 				gnt_check_box_set_checked(GNT_CHECK_BOX(widget),
@@ -434,7 +434,7 @@ add_protocol_options(AccountEditDialog *
 						purple_account_option_get_setting(option), dv);
 
 				gnt_box_add_widget(GNT_BOX(box), combo);
-				dialog->prpl_entries = g_list_append(dialog->prpl_entries, combo);
+				dialog->protocol_entries = g_list_append(dialog->protocol_entries, combo);
 
 				for ( ; opt_iter; opt_iter = opt_iter->next)
 				{
@@ -449,7 +449,7 @@ add_protocol_options(AccountEditDialog *
 			{
 				GntWidget *entry = gnt_entry_new(NULL);
 				gnt_box_add_widget(GNT_BOX(box), entry);
-				dialog->prpl_entries = g_list_append(dialog->prpl_entries, entry);
+				dialog->protocol_entries = g_list_append(dialog->protocol_entries, entry);
 
 				if (type == PURPLE_PREF_STRING)
 				{
@@ -514,7 +514,7 @@ update_user_options(AccountEditDialog *d
 }
 
 static void
-prpl_changed_cb(GntWidget *combo, PurpleProtocol *old, PurpleProtocol *new, AccountEditDialog *dialog)
+protocol_changed_cb(GntWidget *combo, PurpleProtocol *old, PurpleProtocol *new, AccountEditDialog *dialog)
 {
 	update_user_splits(dialog);
 	add_protocol_options(dialog);
@@ -582,7 +582,7 @@ edit_account_continue(PurpleAccount *acc
 	else
 		gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), list->data);
 
-	g_signal_connect(G_OBJECT(combo), "selection-changed", G_CALLBACK(prpl_changed_cb), dialog);
+	g_signal_connect(G_OBJECT(combo), "selection-changed", G_CALLBACK(protocol_changed_cb), dialog);
 
 	gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(_("Protocol:")));
 	gnt_box_add_widget(GNT_BOX(hbox), combo);
diff --git a/finch/gntconv.c b/finch/gntconv.c
--- a/finch/gntconv.c
+++ b/finch/gntconv.c
@@ -175,7 +175,7 @@ entry_key_pressed(GntWidget *w, FinchCon
 					purple_conversation_write(conv, "", _("That command only works in IMs, not chats."),
 							PURPLE_MESSAGE_NO_LOG, time(NULL));
 				break;
-			case PURPLE_CMD_STATUS_WRONG_PRPL:
+			case PURPLE_CMD_STATUS_WRONG_PROTOCOL:
 				purple_conversation_write(conv, "", _("That command doesn't work on this protocol."),
 						PURPLE_MESSAGE_NO_LOG, time(NULL));
 				break;
diff --git a/finch/gntmedia.c b/finch/gntmedia.c
--- a/finch/gntmedia.c
+++ b/finch/gntmedia.c
@@ -405,7 +405,7 @@ call_cmd_cb(PurpleConversation *conv, co
 {
 	PurpleAccount *account = purple_conversation_get_account(conv);
 
-	if (!purple_prpl_initiate_media(account,
+	if (!purple_protocol_initiate_media(account,
 			purple_conversation_get_name(conv),
 			PURPLE_MEDIA_AUDIO))
 		return PURPLE_CMD_STATUS_FAILED;
diff --git a/libpurple/cmds.c b/libpurple/cmds.c
--- a/libpurple/cmds.c
+++ b/libpurple/cmds.c
@@ -36,7 +36,7 @@ typedef struct _PurpleCmd {
 	gchar *args;
 	PurpleCmdPriority priority;
 	PurpleCmdFlag flags;
-	gchar *prpl_id;
+	gchar *protocol_id;
 	PurpleCmdFunc func;
 	gchar *help;
 	void *data;
@@ -54,7 +54,7 @@ static gint cmds_compare_func(const Purp
 
 PurpleCmdId purple_cmd_register(const gchar *cmd, const gchar *args,
                             PurpleCmdPriority p, PurpleCmdFlag f,
-                            const gchar *prpl_id, PurpleCmdFunc func,
+                            const gchar *protocol_id, PurpleCmdFunc func,
                             const gchar *helpstr, void *data)
 {
 	PurpleCmdId id;
@@ -72,7 +72,7 @@ PurpleCmdId purple_cmd_register(const gc
 	c->args = g_strdup(args);
 	c->priority = p;
 	c->flags = f;
-	c->prpl_id = g_strdup(prpl_id);
+	c->protocol_id = g_strdup(protocol_id);
 	c->func = func;
 	c->help = g_strdup(helpstr);
 	c->data = data;
@@ -88,7 +88,7 @@ static void purple_cmd_free(PurpleCmd *c
 {
 	g_free(c->cmd);
 	g_free(c->args);
-	g_free(c->prpl_id);
+	g_free(c->protocol_id);
 	g_free(c->help);
 	g_free(c);
 }
@@ -203,14 +203,14 @@ PurpleCmdStatus purple_cmd_do_command(Pu
 	GList *l;
 	gchar *err = NULL;
 	gboolean is_im = TRUE;
-	gboolean found = FALSE, tried_cmd = FALSE, right_type = FALSE, right_prpl = FALSE;
-	const gchar *prpl_id;
+	gboolean found = FALSE, tried_cmd = FALSE, right_type = FALSE, right_protocol = FALSE;
+	const gchar *protocol_id;
 	gchar **args = NULL;
 	gchar *cmd, *rest, *mrest;
 	PurpleCmdRet ret = PURPLE_CMD_RET_CONTINUE;
 
 	*error = NULL;
-	prpl_id = purple_account_get_protocol_id(purple_conversation_get_account(conv));
+	protocol_id = purple_account_get_protocol_id(purple_conversation_get_account(conv));
 
 	if (PURPLE_IS_CHAT_CONVERSATION(conv))
 		is_im = FALSE;
@@ -244,11 +244,11 @@ PurpleCmdStatus purple_cmd_do_command(Pu
 
 		right_type = TRUE;
 
-		if ((c->flags & PURPLE_CMD_FLAG_PRPL_ONLY) &&
-		    !purple_strequal(c->prpl_id, prpl_id))
+		if ((c->flags & PURPLE_CMD_FLAG_PROTOCOL_ONLY) &&
+		    !purple_strequal(c->protocol_id, protocol_id))
 			continue;
 
-		right_prpl = TRUE;
+		right_protocol = TRUE;
 
 		/* this checks the allow bad args flag for us */
 		if (!purple_cmd_parse_args(c, rest, mrest, &args)) {
@@ -280,8 +280,8 @@ PurpleCmdStatus purple_cmd_do_command(Pu
 
 	if (!right_type)
 		return PURPLE_CMD_STATUS_WRONG_TYPE;
-	if (!right_prpl)
-		return PURPLE_CMD_STATUS_WRONG_PRPL;
+	if (!right_protocol)
+		return PURPLE_CMD_STATUS_WRONG_PROTOCOL;
 	if (!tried_cmd)
 		return PURPLE_CMD_STATUS_WRONG_ARGS;
 
@@ -314,8 +314,8 @@ GList *purple_cmd_list(PurpleConversatio
 			if (!(c->flags & PURPLE_CMD_FLAG_CHAT))
 				continue;
 
-		if (conv && (c->flags & PURPLE_CMD_FLAG_PRPL_ONLY) &&
-		    !purple_strequal(c->prpl_id, purple_account_get_protocol_id(purple_conversation_get_account(conv))))
+		if (conv && (c->flags & PURPLE_CMD_FLAG_PROTOCOL_ONLY) &&
+		    !purple_strequal(c->protocol_id, purple_account_get_protocol_id(purple_conversation_get_account(conv))))
 			continue;
 
 		ret = g_list_append(ret, c->cmd);
@@ -346,8 +346,8 @@ GList *purple_cmd_help(PurpleConversatio
 			if (!(c->flags & PURPLE_CMD_FLAG_CHAT))
 				continue;
 
-		if (conv && (c->flags & PURPLE_CMD_FLAG_PRPL_ONLY) &&
-		    !purple_strequal(c->prpl_id, purple_account_get_protocol_id(purple_conversation_get_account(conv))))
+		if (conv && (c->flags & PURPLE_CMD_FLAG_PROTOCOL_ONLY) &&
+		    !purple_strequal(c->protocol_id, purple_account_get_protocol_id(purple_conversation_get_account(conv))))
 			continue;
 
 		ret = g_list_append(ret, c->help);
diff --git a/libpurple/cmds.h b/libpurple/cmds.h
--- a/libpurple/cmds.h
+++ b/libpurple/cmds.h
@@ -37,7 +37,7 @@ typedef enum {
 	PURPLE_CMD_STATUS_FAILED,
 	PURPLE_CMD_STATUS_NOT_FOUND,
 	PURPLE_CMD_STATUS_WRONG_ARGS,
-	PURPLE_CMD_STATUS_WRONG_PRPL,
+	PURPLE_CMD_STATUS_WRONG_PROTOCOL,
 	PURPLE_CMD_STATUS_WRONG_TYPE
 } PurpleCmdStatus;
 
@@ -72,7 +72,7 @@ typedef enum {
 	PURPLE_CMD_P_VERY_LOW  = -1000,
 	PURPLE_CMD_P_LOW       =     0,
 	PURPLE_CMD_P_DEFAULT   =  1000,
-	PURPLE_CMD_P_PRPL      =  2000,
+	PURPLE_CMD_P_PROTOCOL      =  2000,
 	PURPLE_CMD_P_PLUGIN    =  3000,
 	PURPLE_CMD_P_ALIAS     =  4000,
 	PURPLE_CMD_P_HIGH      =  5000,
@@ -91,7 +91,7 @@ typedef enum {
 	/** Command is usable in multi-user chats. */
 	PURPLE_CMD_FLAG_CHAT             = 0x02,
 	/** Command is usable only for a particular prpl. */
-	PURPLE_CMD_FLAG_PRPL_ONLY        = 0x04,
+	PURPLE_CMD_FLAG_PROTOCOL_ONLY        = 0x04,
 	/** Incorrect arguments to this command should be accepted anyway. */
 	PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS = 0x08
 } PurpleCmdFlag;
@@ -139,7 +139,7 @@ G_BEGIN_DECLS
  *          <tt>|</tt> (bitwise OR). You need to at least pass one of
  *          #PURPLE_CMD_FLAG_IM or #PURPLE_CMD_FLAG_CHAT (you may pass both) in
  *          order for the command to ever actually be called.
- * @param prpl_id If the #PURPLE_CMD_FLAG_PRPL_ONLY flag is set, this is the id
+ * @param protocol_id If the #PURPLE_CMD_FLAG_PROTOCOL_ONLY flag is set, this is the id
  *                of the prpl to which the command applies (such as
  *                <tt>"prpl-msn"</tt>). If the flag is not set, this parameter
  *                is ignored; pass @c NULL (or a humourous string of your
@@ -157,7 +157,7 @@ G_BEGIN_DECLS
  *         #purple_cmd_unregister, or @a 0 on failure.
  */
 PurpleCmdId purple_cmd_register(const gchar *cmd, const gchar *args, PurpleCmdPriority p, PurpleCmdFlag f,
-                             const gchar *prpl_id, PurpleCmdFunc func, const gchar *helpstr, void *data);
+                             const gchar *protocol_id, PurpleCmdFunc func, const gchar *helpstr, void *data);
 
 /**
  * Unregister a command with the core.
diff --git a/libpurple/ft.c b/libpurple/ft.c
--- a/libpurple/ft.c
+++ b/libpurple/ft.c
@@ -55,7 +55,7 @@ typedef struct _PurpleXferPrivData {
 	enum {
 		PURPLE_XFER_READY_NONE = 0x0,
 		PURPLE_XFER_READY_UI   = 0x1,
-		PURPLE_XFER_READY_PRPL = 0x2,
+		PURPLE_XFER_READY_PROTOCOL = 0x2,
 	} ready;
 
 	/* TODO: Should really use a PurpleCircBuffer for this. */
@@ -1307,7 +1307,7 @@ do_transfer(PurpleXfer *xfer)
 				}
 
 				/* Need to indicate the prpl is still ready... */
-				priv->ready |= PURPLE_XFER_READY_PRPL;
+				priv->ready |= PURPLE_XFER_READY_PROTOCOL;
 
 				g_return_if_reached();
 			}
@@ -1383,7 +1383,7 @@ transfer_cb(gpointer data, gint source, 
 		/* The UI is moderating its side manually */
 		PurpleXferPrivData *priv = g_hash_table_lookup(xfers_data, xfer);
 		if (0 == (priv->ready & PURPLE_XFER_READY_UI)) {
-			priv->ready |= PURPLE_XFER_READY_PRPL;
+			priv->ready |= PURPLE_XFER_READY_PROTOCOL;
 
 			purple_input_remove(xfer->watcher);
 			xfer->watcher = 0;
@@ -1458,7 +1458,7 @@ purple_xfer_ui_ready(PurpleXfer *xfer)
 	priv = g_hash_table_lookup(xfers_data, xfer);
 	priv->ready |= PURPLE_XFER_READY_UI;
 



More information about the Commits mailing list