/soc/2013/ankitkv/gobjectification: 8832d14d7d0c: Rename 'protoc...
Ankit Vani
a at nevitus.org
Fri Jan 31 08:36:25 EST 2014
Changeset: 8832d14d7d0cfb7fb1ddad828708f68004fcea69
Author: Ankit Vani <a at nevitus.org>
Date: 2014-01-31 19:01 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/8832d14d7d0c
Description:
Rename 'protocol_options' field of PurpleProtocol to more appropriate 'account_options'
Avoid confusion with the 'options' field
diffstat:
finch/gntaccount.c | 10 +++++-----
libpurple/plugins/one_time_password.c | 6 +++---
libpurple/protocol.c | 20 ++++++++++----------
libpurple/protocol.h | 20 ++++++++++----------
libpurple/protocols/bonjour/bonjour.c | 14 +++++++-------
libpurple/protocols/gg/gg.c | 8 ++++----
libpurple/protocols/irc/irc.c | 18 +++++++++---------
libpurple/protocols/jabber/facebook.c | 12 ++++++------
libpurple/protocols/jabber/gtalk.c | 14 +++++++-------
libpurple/protocols/jabber/jabber.c | 2 +-
libpurple/protocols/jabber/xmpp.c | 14 +++++++-------
libpurple/protocols/msn/msn.c | 14 +++++++-------
libpurple/protocols/mxit/mxit.c | 6 +++---
libpurple/protocols/myspace/myspace.c | 14 +++++++-------
libpurple/protocols/novell/novell.c | 8 ++++----
libpurple/protocols/null/nullprpl.c | 2 +-
libpurple/protocols/oscar/aim.c | 6 +++---
libpurple/protocols/oscar/icq.c | 6 +++---
libpurple/protocols/oscar/oscar.c | 10 +++++-----
libpurple/protocols/oscar/oscar.h | 2 +-
libpurple/protocols/sametime/sametime.c | 2 +-
libpurple/protocols/silc/silc.c | 24 ++++++++++++------------
libpurple/protocols/simple/simple.c | 14 +++++++-------
libpurple/protocols/yahoo/yahoo.c | 14 +++++++-------
libpurple/protocols/yahoo/yahoojp.c | 10 +++++-----
libpurple/protocols/zephyr/zephyr.c | 18 +++++++++---------
pidgin/gtkaccount.c | 12 ++++++------
27 files changed, 150 insertions(+), 150 deletions(-)
diffs (truncated from 983 to 300 lines):
diff --git a/finch/gntaccount.c b/finch/gntaccount.c
--- a/finch/gntaccount.c
+++ b/finch/gntaccount.c
@@ -218,7 +218,7 @@ save_account_cb(AccountEditDialog *dialo
{
GList *iter, *entries;
- for (iter = purple_protocol_get_protocol_options(protocol), entries = dialog->protocol_entries;
+ for (iter = purple_protocol_get_account_options(protocol), entries = dialog->protocol_entries;
iter && entries; iter = iter->next, entries = entries->next)
{
PurpleAccountOption *option = iter->data;
@@ -374,7 +374,7 @@ update_user_splits(AccountEditDialog *di
}
static void
-add_protocol_options(AccountEditDialog *dialog)
+add_account_options(AccountEditDialog *dialog)
{
PurpleProtocol *protocol;
GList *iter;
@@ -405,7 +405,7 @@ add_protocol_options(AccountEditDialog *
account = dialog->account;
- for (iter = purple_protocol_get_protocol_options(protocol); iter; iter = iter->next)
+ for (iter = purple_protocol_get_account_options(protocol); iter; iter = iter->next)
{
PurpleAccountOption *option = iter->data;
PurplePrefType type = purple_account_option_get_type(option);
@@ -529,7 +529,7 @@ static void
protocol_changed_cb(GntWidget *combo, PurpleProtocol *old, PurpleProtocol *new, AccountEditDialog *dialog)
{
update_user_splits(dialog);
- add_protocol_options(dialog);
+ add_account_options(dialog);
update_user_options(dialog); /* This may not be necessary here */
gnt_box_readjust(GNT_BOX(dialog->window));
gnt_widget_draw(dialog->window);
@@ -645,7 +645,7 @@ edit_account_continue(PurpleAccount *acc
gnt_box_add_widget(GNT_BOX(window), gnt_line_new(FALSE));
/* The advanced box */
- add_protocol_options(dialog);
+ add_account_options(dialog);
gnt_box_add_widget(GNT_BOX(window), dialog->protocols);
/* TODO: Add proxy options */
diff --git a/libpurple/plugins/one_time_password.c b/libpurple/plugins/one_time_password.c
--- a/libpurple/plugins/one_time_password.c
+++ b/libpurple/plugins/one_time_password.c
@@ -93,7 +93,7 @@ plugin_load(PurplePlugin *plugin, GError
if (protocol != NULL && !(purple_protocol_get_options(protocol) & OPT_PROTO_NO_PASSWORD)) {
option = purple_account_option_bool_new(_("One Time Password"),
PREF_NAME, FALSE);
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
}
}
g_list_free(list);
@@ -118,11 +118,11 @@ plugin_unload(PurplePlugin *plugin, GErr
for (l = list; l != NULL; l = l->next) {
protocol = PURPLE_PROTOCOL(l->data);
if (protocol != NULL && !(purple_protocol_get_options(protocol) & OPT_PROTO_NO_PASSWORD)) {
- options = purple_protocol_get_protocol_options(protocol);
+ options = purple_protocol_get_account_options(protocol);
while (options != NULL) {
option = (PurpleAccountOption *) options->data;
if (strcmp(PREF_NAME, purple_account_option_get_setting(option)) == 0) {
- protocol->protocol_options = g_list_delete_link(protocol->protocol_options, options);
+ protocol->account_options = g_list_delete_link(protocol->account_options, options);
purple_account_option_destroy(option);
break;
}
diff --git a/libpurple/protocol.c b/libpurple/protocol.c
--- a/libpurple/protocol.c
+++ b/libpurple/protocol.c
@@ -61,11 +61,11 @@ purple_protocol_get_user_splits(const Pu
}
GList *
-purple_protocol_get_protocol_options(const PurpleProtocol *protocol)
+purple_protocol_get_account_options(const PurpleProtocol *protocol)
{
g_return_val_if_fail(PURPLE_IS_PROTOCOL(protocol), NULL);
- return protocol->protocol_options;
+ return protocol->account_options;
}
PurpleBuddyIconSpec *
@@ -98,16 +98,16 @@ user_splits_free(PurpleProtocol *protoco
}
static void
-protocol_options_free(PurpleProtocol *protocol)
+account_options_free(PurpleProtocol *protocol)
{
g_return_if_fail(PURPLE_IS_PROTOCOL(protocol));
- while (protocol->protocol_options) {
- PurpleAccountOption *option = protocol->protocol_options->data;
+ while (protocol->account_options) {
+ PurpleAccountOption *option = protocol->account_options->data;
purple_account_option_destroy(option);
- protocol->protocol_options =
- g_list_delete_link(protocol->protocol_options,
- protocol->protocol_options);
+ protocol->account_options =
+ g_list_delete_link(protocol->account_options,
+ protocol->account_options);
}
}
@@ -129,7 +129,7 @@ purple_protocol_override(PurpleProtocol
if (flags & PURPLE_PROTOCOL_OVERRIDE_USER_SPLITS)
user_splits_free(protocol);
if (flags & PURPLE_PROTOCOL_OVERRIDE_PROTOCOL_OPTIONS)
- protocol_options_free(protocol);
+ account_options_free(protocol);
if (flags & PURPLE_PROTOCOL_OVERRIDE_ICON_SPEC)
icon_spec_free(protocol);
}
@@ -171,7 +171,7 @@ purple_protocol_finalize(GObject *object
purple_prefs_disconnect_by_handle(protocol);
user_splits_free(protocol);
- protocol_options_free(protocol);
+ account_options_free(protocol);
icon_spec_free(protocol);
PURPLE_DBUS_UNREGISTER_POINTER(protocol);
diff --git a/libpurple/protocol.h b/libpurple/protocol.h
--- a/libpurple/protocol.h
+++ b/libpurple/protocol.h
@@ -70,13 +70,13 @@ typedef enum /*< flags >*/
/**
* PurpleProtocol:
- * @id: Protocol ID
- * @name: Translated name of the protocol
- * @options: Protocol options
- * @user_splits: A GList of PurpleAccountUserSplit
- * @protocol_options: A GList of PurpleAccountOption
- * @icon_spec: The icon spec.
- * @whiteboard_ops: Whiteboard operations
+ * @id: Protocol ID
+ * @name: Translated name of the protocol
+ * @options: Protocol options
+ * @user_splits: A GList of PurpleAccountUserSplit
+ * @account_options: A GList of PurpleAccountOption
+ * @icon_spec: The icon spec.
+ * @whiteboard_ops: Whiteboard operations
*
* Represents an instance of a protocol registered with the protocols
* subsystem. Protocols must initialize the members to appropriate values.
@@ -91,7 +91,7 @@ struct _PurpleProtocol
PurpleProtocolOptions options;
GList *user_splits;
- GList *protocol_options;
+ GList *account_options;
PurpleBuddyIconSpec *icon_spec;
PurpleWhiteboardOps *whiteboard_ops;
@@ -827,14 +827,14 @@ PurpleProtocolOptions purple_protocol_ge
GList *purple_protocol_get_user_splits(const PurpleProtocol *protocol);
/**
- * purple_protocol_get_protocol_options:
+ * purple_protocol_get_account_options:
* @protocol: The protocol.
*
* Returns the account options for a protocol.
*
* Returns: The account options for the protocol.
*/
-GList *purple_protocol_get_protocol_options(const PurpleProtocol *protocol);
+GList *purple_protocol_get_account_options(const PurpleProtocol *protocol);
/**
* purple_protocol_get_icon_spec:
diff --git a/libpurple/protocols/bonjour/bonjour.c b/libpurple/protocols/bonjour/bonjour.c
--- a/libpurple/protocols/bonjour/bonjour.c
+++ b/libpurple/protocols/bonjour/bonjour.c
@@ -482,7 +482,7 @@ static gboolean
_set_default_name_cb(gpointer data) {
gchar *fullname = data;
const char *splitpoint;
- GList *tmp = protocol.protocol_options;
+ GList *tmp = protocol.account_options;
PurpleAccountOption *option;
if (!fullname) {
@@ -643,22 +643,22 @@ bonjour_protocol_init(PurpleProtocol *pr
/* Creating the options for the protocol */
option = purple_account_option_int_new(_("Local Port"), "port", BONJOUR_DEFAULT_PORT);
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
option = purple_account_option_string_new(_("First name"), "first", default_firstname);
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
option = purple_account_option_string_new(_("Last name"), "last", default_lastname);
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
option = purple_account_option_string_new(_("Email"), "email", "");
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
option = purple_account_option_string_new(_("AIM Account"), "AIM", "");
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
option = purple_account_option_string_new(_("XMPP Account"), "jid", "");
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
}
static void
diff --git a/libpurple/protocols/gg/gg.c b/libpurple/protocols/gg/gg.c
--- a/libpurple/protocols/gg/gg.c
+++ b/libpurple/protocols/gg/gg.c
@@ -999,7 +999,7 @@ ggp_protocol_init(PurpleProtocol *protoc
option = purple_account_option_string_new(_("GG server"),
"gg_server", "");
- protocol->protocol_options = g_list_append(protocol->protocol_options,
+ protocol->account_options = g_list_append(protocol->account_options,
option);
ggp_server_option = option;
@@ -1017,7 +1017,7 @@ ggp_protocol_init(PurpleProtocol *protoc
option = purple_account_option_list_new(_("Connection security"),
"encryption", encryption_options);
- protocol->protocol_options = g_list_append(protocol->protocol_options,
+ protocol->account_options = g_list_append(protocol->account_options,
option);
ADD_VALUE(protocol_version, _("Default"), "default");
@@ -1026,12 +1026,12 @@ ggp_protocol_init(PurpleProtocol *protoc
option = purple_account_option_list_new(_("Protocol version"),
"protocol_version", protocol_version);
- protocol->protocol_options = g_list_append(protocol->protocol_options,
+ protocol->account_options = g_list_append(protocol->account_options,
option);
option = purple_account_option_bool_new(_("Show links from strangers"),
"show_links_from_strangers", 1);
- protocol->protocol_options = g_list_append(protocol->protocol_options,
+ protocol->account_options = g_list_append(protocol->account_options,
option);
}
diff --git a/libpurple/protocols/irc/irc.c b/libpurple/protocols/irc/irc.c
--- a/libpurple/protocols/irc/irc.c
+++ b/libpurple/protocols/irc/irc.c
@@ -940,36 +940,36 @@ irc_protocol_init(PurpleProtocol *protoc
protocol->user_splits = g_list_append(protocol->user_splits, split);
option = purple_account_option_int_new(_("Port"), "port", IRC_DEFAULT_PORT);
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
option = purple_account_option_string_new(_("Encodings"), "encoding", IRC_DEFAULT_CHARSET);
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
option = purple_account_option_bool_new(_("Auto-detect incoming UTF-8"), "autodetect_utf8", IRC_DEFAULT_AUTODETECT);
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
option = purple_account_option_string_new(_("Ident name"), "username", "");
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
option = purple_account_option_string_new(_("Real name"), "realname", "");
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
/*
option = purple_account_option_string_new(_("Quit message"), "quitmsg", IRC_DEFAULT_QUIT);
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
*/
option = purple_account_option_bool_new(_("Use SSL"), "ssl", FALSE);
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
#ifdef HAVE_CYRUS_SASL
option = purple_account_option_bool_new(_("Authenticate with SASL"), "sasl", FALSE);
- protocol->protocol_options = g_list_append(protocol->protocol_options, option);
+ protocol->account_options = g_list_append(protocol->account_options, option);
More information about the Commits
mailing list