/soc/2013/ankitkv/gobjectification: 1bf8b6ef5aea: Renamed Purple...
Ankit Vani
a at nevitus.org
Sat Aug 17 15:16:02 EDT 2013
Changeset: 1bf8b6ef5aea8edd93f943f547a0de9d4e35fae7
Author: Ankit Vani <a at nevitus.org>
Date: 2013-08-17 23:28 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/1bf8b6ef5aea
Description:
Renamed PurplePluginProtocolInfo to PurpleProtocol
diffstat:
finch/gntaccount.c | 60 +++++-----
finch/gntblist.c | 64 +++++-----
finch/gntconv.c | 12 +-
finch/gntroomlist.c | 14 +-
libpurple/account.c | 138 +++++++++++-----------
libpurple/blistnodetypes.c | 26 ++--
libpurple/buddyicon.c | 8 +-
libpurple/buddylist.c | 10 +-
libpurple/connection.c | 58 ++++----
libpurple/connection.h | 2 +-
libpurple/conversation.c | 6 +-
libpurple/conversationtypes.c | 36 +++---
libpurple/example/nullclient.c | 2 +-
libpurple/log.c | 24 ++--
libpurple/plugins/log_reader.c | 22 +-
libpurple/plugins/one_time_password.c | 18 +-
libpurple/plugins/perl/common/Prpl.xs | 8 +-
libpurple/plugins/perl/common/module.h | 2 +-
libpurple/presence.c | 8 +-
libpurple/protocol.c | 86 +++++++-------
libpurple/protocol.h | 20 +-
libpurple/protocols/bonjour/bonjour.c | 22 +-
libpurple/protocols/gg/gg.c | 16 +-
libpurple/protocols/irc/irc.c | 28 ++--
libpurple/protocols/irc/msgs.c | 4 +-
libpurple/protocols/irc/parse.c | 2 +-
libpurple/protocols/jabber/jabber.c | 54 ++++----
libpurple/protocols/jabber/jabber.h | 4 +-
libpurple/protocols/jabber/libfacebook.c | 24 ++--
libpurple/protocols/jabber/libgtalk.c | 26 ++--
libpurple/protocols/jabber/libxmpp.c | 26 ++--
libpurple/protocols/msn/msn.c | 24 ++--
libpurple/protocols/mxit/mxit.c | 4 +-
libpurple/protocols/myspace/myspace.c | 26 ++--
libpurple/protocols/novell/novell.c | 18 +-
libpurple/protocols/null/nullprpl.c | 12 +-
libpurple/protocols/oscar/libaim.c | 10 +-
libpurple/protocols/oscar/libicq.c | 12 +-
libpurple/protocols/oscar/oscar.c | 20 +-
libpurple/protocols/oscar/oscarcommon.h | 2 +-
libpurple/protocols/sametime/sametime.c | 12 +-
libpurple/protocols/silc/silc.c | 34 ++--
libpurple/protocols/simple/simple.c | 24 ++--
libpurple/protocols/yahoo/libyahoo.c | 22 +-
libpurple/protocols/yahoo/libyahoojp.c | 22 +-
libpurple/protocols/zephyr/zephyr.c | 30 ++--
libpurple/roomlist.c | 24 ++--
libpurple/server.c | 156 +++++++++++++-------------
libpurple/util.c | 14 +-
libpurple/util.h | 2 +-
libpurple/whiteboard.c | 6 +-
pidgin/gtkaccount.c | 126 ++++++++++----------
pidgin/gtkblist.c | 182 +++++++++++++++---------------
pidgin/gtkconv.c | 146 ++++++++++++------------
pidgin/gtkdialogs.c | 6 +-
pidgin/gtkdocklet.c | 4 +-
pidgin/gtkimhtmltoolbar.c | 6 +-
pidgin/gtkroomlist.c | 14 +-
pidgin/gtkstatusbox.c | 18 +-
pidgin/gtkthemes.c | 6 +-
pidgin/gtkutils.c | 80 ++++++------
pidgin/gtkutils.h | 4 +-
pidgin/gtkwebviewtoolbar.c | 6 +-
pidgin/gtkwhiteboard.c | 2 +-
pidgin/plugins/xmppconsole.c | 8 +-
pidgin/smileyparser.c | 6 +-
66 files changed, 959 insertions(+), 959 deletions(-)
diffs (truncated from 5715 to 300 lines):
diff --git a/finch/gntaccount.c b/finch/gntaccount.c
--- a/finch/gntaccount.c
+++ b/finch/gntaccount.c
@@ -110,13 +110,13 @@ static void
save_account_cb(AccountEditDialog *dialog)
{
PurpleAccount *account;
- PurplePluginProtocolInfo *prpl_info;
+ PurpleProtocol *protocol;
const char *value;
GString *username;
/* XXX: Do some error checking first. */
- prpl_info = gnt_combo_box_get_selected_data(GNT_COMBO_BOX(dialog->protocol));
+ protocol = gnt_combo_box_get_selected_data(GNT_COMBO_BOX(dialog->protocol));
/* Username && user-splits */
value = gnt_entry_get_text(GNT_ENTRY(dialog->username));
@@ -131,10 +131,10 @@ save_account_cb(AccountEditDialog *dialo
username = g_string_new(value);
- if (prpl_info != NULL)
+ if (protocol != NULL)
{
GList *iter, *entries;
- for (iter = prpl_info->user_splits, entries = dialog->split_entries;
+ for (iter = protocol->user_splits, entries = dialog->split_entries;
iter && entries; iter = iter->next, entries = entries->next)
{
PurpleAccountUserSplit *split = iter->data;
@@ -151,7 +151,7 @@ save_account_cb(AccountEditDialog *dialo
if (dialog->account == NULL)
{
- account = purple_account_new(username->str, prpl_info->id);
+ account = purple_account_new(username->str, protocol->id);
purple_accounts_add(account);
}
else
@@ -160,12 +160,12 @@ save_account_cb(AccountEditDialog *dialo
/* Protocol */
if (purple_account_is_disconnected(account)) {
- purple_account_set_protocol_id(account, prpl_info->id);
+ purple_account_set_protocol_id(account, protocol->id);
purple_account_set_username(account, username->str);
} else {
const char *old = purple_account_get_protocol_id(account);
char *oldprpl;
- if (strcmp(old, prpl_info->id)) {
+ if (strcmp(old, protocol->id)) {
purple_notify_error(NULL, _("Error"), _("Account was not modified"),
_("The account's protocol cannot be changed while it is connected to the server."));
return;
@@ -202,11 +202,11 @@ save_account_cb(AccountEditDialog *dialo
gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->newmail)));
/* Protocol options */
- if (prpl_info)
+ if (protocol)
{
GList *iter, *entries;
- for (iter = prpl_info->protocol_options, entries = dialog->prpl_entries;
+ for (iter = protocol->protocol_options, entries = dialog->prpl_entries;
iter && entries; iter = iter->next, entries = entries->next)
{
PurpleAccountOption *option = iter->data;
@@ -251,7 +251,7 @@ save_account_cb(AccountEditDialog *dialo
gnt_box_give_focus_to_child(GNT_BOX(accounts.window), accounts.tree);
}
- if (prpl_info && prpl_info->register_user &&
+ if (protocol && protocol->register_user &&
gnt_check_box_get_checked(GNT_CHECK_BOX(dialog->regserver))) {
purple_account_register(account);
} else if (dialog->account == NULL) {
@@ -283,7 +283,7 @@ static void
update_user_splits(AccountEditDialog *dialog)
{
GntWidget *hbox;
- PurplePluginProtocolInfo *prpl_info;
+ PurpleProtocol *protocol;
GList *iter, *entries;
char *username = NULL;
@@ -301,13 +301,13 @@ update_user_splits(AccountEditDialog *di
dialog->split_entries = NULL;
- prpl_info = gnt_combo_box_get_selected_data(GNT_COMBO_BOX(dialog->protocol));
- if (!prpl_info)
+ protocol = gnt_combo_box_get_selected_data(GNT_COMBO_BOX(dialog->protocol));
+ if (!protocol)
return;
username = dialog->account ? g_strdup(purple_account_get_username(dialog->account)) : NULL;
- for (iter = prpl_info->user_splits; iter; iter = iter->next)
+ for (iter = protocol->user_splits; iter; iter = iter->next)
{
PurpleAccountUserSplit *split = iter->data;
GntWidget *entry;
@@ -326,7 +326,7 @@ update_user_splits(AccountEditDialog *di
g_free(buf);
}
- for (iter = g_list_last(prpl_info->user_splits), entries = g_list_last(dialog->split_entries);
+ for (iter = g_list_last(protocol->user_splits), entries = g_list_last(dialog->split_entries);
iter && entries; iter = iter->prev, entries = entries->prev)
{
GntWidget *entry = entries->data;
@@ -364,7 +364,7 @@ update_user_splits(AccountEditDialog *di
static void
add_protocol_options(AccountEditDialog *dialog)
{
- PurplePluginProtocolInfo *prpl_info;
+ PurpleProtocol *protocol;
GList *iter;
GntWidget *vbox, *box;
PurpleAccount *account;
@@ -387,13 +387,13 @@ add_protocol_options(AccountEditDialog *
vbox = dialog->prpls;
- prpl_info = gnt_combo_box_get_selected_data(GNT_COMBO_BOX(dialog->protocol));
- if (!prpl_info)
+ protocol = gnt_combo_box_get_selected_data(GNT_COMBO_BOX(dialog->protocol));
+ if (!protocol)
return;
account = dialog->account;
- for (iter = prpl_info->protocol_options; iter; iter = iter->next)
+ for (iter = protocol->protocol_options; iter; iter = iter->next)
{
PurpleAccountOption *option = iter->data;
PurplePrefType type = purple_account_option_get_type(option);
@@ -484,16 +484,16 @@ add_protocol_options(AccountEditDialog *
/* Show the registration checkbox only in a new account dialog,
* and when the selected prpl has the support for it. */
gnt_widget_set_visible(dialog->regserver, account == NULL &&
- prpl_info->register_user != NULL);
+ protocol->register_user != NULL);
}
static void
update_user_options(AccountEditDialog *dialog)
{
- PurplePluginProtocolInfo *prpl_info;
+ PurpleProtocol *protocol;
- prpl_info = gnt_combo_box_get_selected_data(GNT_COMBO_BOX(dialog->protocol));
- if (!prpl_info)
+ protocol = gnt_combo_box_get_selected_data(GNT_COMBO_BOX(dialog->protocol));
+ if (!protocol)
return;
if (dialog->newmail == NULL)
@@ -501,7 +501,7 @@ update_user_options(AccountEditDialog *d
if (dialog->account)
gnt_check_box_set_checked(GNT_CHECK_BOX(dialog->newmail),
purple_account_get_check_mail(dialog->account));
- if (!prpl_info || !(prpl_info->options & OPT_PROTO_MAIL_CHECK))
+ if (!protocol || !(protocol->options & OPT_PROTO_MAIL_CHECK))
gnt_widget_set_visible(dialog->newmail, FALSE);
else
gnt_widget_set_visible(dialog->newmail, TRUE);
@@ -514,7 +514,7 @@ update_user_options(AccountEditDialog *d
}
static void
-prpl_changed_cb(GntWidget *combo, PurplePluginProtocolInfo *old, PurplePluginProtocolInfo *new, AccountEditDialog *dialog)
+prpl_changed_cb(GntWidget *combo, PurpleProtocol *old, PurpleProtocol *new, AccountEditDialog *dialog)
{
update_user_splits(dialog);
add_protocol_options(dialog);
@@ -531,7 +531,7 @@ edit_account_continue(PurpleAccount *acc
GntWidget *combo, *button, *entry;
GList *list, *iter;
AccountEditDialog *dialog;
- PurplePluginProtocolInfo *prpl_info;
+ PurpleProtocol *protocol;
if (account)
{
@@ -572,13 +572,13 @@ edit_account_continue(PurpleAccount *acc
for (iter = list; iter; iter = iter->next)
{
gnt_combo_box_add_data(GNT_COMBO_BOX(combo), iter->data,
- ((PurplePluginProtocolInfo*)iter->data)->name);
+ ((PurpleProtocol*)iter->data)->name);
}
- prpl_info = purple_find_protocol_info(purple_account_get_protocol_id(account));
+ protocol = purple_find_protocol_info(purple_account_get_protocol_id(account));
- if (account && prpl_info)
- gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), prpl_info);
+ if (account && protocol)
+ gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), protocol);
else
gnt_combo_box_set_selected(GNT_COMBO_BOX(combo), list->data);
diff --git a/finch/gntblist.c b/finch/gntblist.c
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -727,7 +727,7 @@ add_chat_cb(void *data, PurpleRequestFie
GHashTable *hash = NULL;
PurpleConnection *gc;
gboolean autojoin;
- PurplePluginProtocolInfo *prpl_info;
+ PurpleProtocol *protocol;
account = purple_request_fields_get_account(allfields, "account");
name = purple_request_fields_get_string(allfields, "name");
@@ -742,9 +742,9 @@ add_chat_cb(void *data, PurpleRequestFie
group = _("Chats");
gc = purple_account_get_connection(account);
- prpl_info = purple_connection_get_protocol_info(gc);
- if (prpl_info->chat_info_defaults != NULL)
- hash = prpl_info->chat_info_defaults(gc, name);
+ protocol = purple_connection_get_protocol_info(gc);
+ if (protocol->chat_info_defaults != NULL)
+ hash = protocol->chat_info_defaults(gc, name);
chat = purple_chat_new(account, name, hash);
@@ -1062,12 +1062,12 @@ static void
append_proto_menu(GntMenu *menu, PurpleConnection *gc, PurpleBlistNode *node)
{
GList *list;
- PurplePluginProtocolInfo *prpl_info = purple_connection_get_protocol_info(gc);
-
- if(!prpl_info || !prpl_info->blist_node_menu)
+ PurpleProtocol *protocol = purple_connection_get_protocol_info(gc);
+
+ if(!protocol || !protocol->blist_node_menu)
return;
- for(list = prpl_info->blist_node_menu(node); list;
+ for(list = protocol->blist_node_menu(node); list;
list = g_list_delete_link(list, list))
{
PurpleMenuAction *act = (PurpleMenuAction *) list->data;
@@ -1274,11 +1274,11 @@ create_buddy_menu(GntMenu *menu, PurpleB
PurpleAccount *account;
gboolean permitted;
GntMenuItem *item;
- PurplePluginProtocolInfo *prpl_info;
+ PurpleProtocol *protocol;
PurpleConnection *gc = purple_account_get_connection(purple_buddy_get_account(buddy));
- prpl_info = purple_connection_get_protocol_info(gc);
- if (prpl_info && prpl_info->get_info)
+ protocol = purple_connection_get_protocol_info(gc);
+ if (protocol && protocol->get_info)
{
add_custom_action(menu, _("Get Info"),
PURPLE_CALLBACK(finch_blist_get_buddy_info_cb), buddy);
@@ -1287,10 +1287,10 @@ create_buddy_menu(GntMenu *menu, PurpleB
add_custom_action(menu, _("Add Buddy Pounce"),
PURPLE_CALLBACK(finch_blist_pounce_node_cb), buddy);
- if (prpl_info && prpl_info->send_file)
+ if (protocol && protocol->send_file)
{
- if (!prpl_info->can_receive_file ||
- prpl_info->can_receive_file(gc, purple_buddy_get_name(buddy)))
+ if (!protocol->can_receive_file ||
+ protocol->can_receive_file(gc, purple_buddy_get_name(buddy)))
add_custom_action(menu, _("Send File"),
PURPLE_CALLBACK(finch_blist_menu_send_file_cb), buddy);
}
@@ -1412,12 +1412,12 @@ static void showlog_cb(PurpleBlistNode *
account = purple_buddy_get_account(b);
} else if (PURPLE_IS_CHAT(node)) {
PurpleChat *c = (PurpleChat*) node;
- PurplePluginProtocolInfo *prpl_info = NULL;
+ PurpleProtocol *protocol = NULL;
type = PURPLE_LOG_CHAT;
account = purple_chat_get_account(c);
- prpl_info = purple_find_protocol_info(purple_account_get_protocol_id(account));
- if (prpl_info && prpl_info->get_chat_name) {
- name = prpl_info->get_chat_name(purple_chat_get_components(c));
+ protocol = purple_find_protocol_info(purple_account_get_protocol_id(account));
+ if (protocol && protocol->get_chat_name) {
+ name = protocol->get_chat_name(purple_chat_get_components(c));
}
} else if (PURPLE_IS_CONTACT(node)) {
finch_log_show_contact((PurpleContact *)node);
@@ -1715,7 +1715,7 @@ draw_context_menu(FinchBlist *ggblist)
static void
tooltip_for_buddy(PurpleBuddy *buddy, GString *str, gboolean full)
{
- PurplePluginProtocolInfo *prpl_info;
+ PurpleProtocol *protocol;
More information about the Commits
mailing list