/soc/2013/ankitkv/gobjectification: 428e92c79631: Renamed purple...
Ankit Vani
a at nevitus.org
Wed Jun 19 10:58:21 EDT 2013
Changeset: 428e92c796310508631d258f52f4ff2d526debd6
Author: Ankit Vani <a at nevitus.org>
Date: 2013-06-19 20:26 +0530
Branch: soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/428e92c79631
Description:
Renamed purple_account_[get,set]_alias to purple_account[get,set]_private_alias.
This provides clear distinction between functions of private_alias and public_alias.
diffstat:
finch/gntaccount.c | 4 ++--
finch/gntconv.c | 2 +-
finch/gntpounce.c | 2 +-
libpurple/account.c | 12 ++++++------
libpurple/account.h | 8 ++++----
libpurple/accounts.c | 2 +-
libpurple/conversation.c | 8 ++++----
libpurple/plugins/log_reader.c | 10 +++++-----
libpurple/plugins/perl/common/Account.xs | 4 ++--
libpurple/plugins/signals-test.c | 2 +-
libpurple/plugins/tcl/tcl_cmds.c | 2 +-
libpurple/protocols/jabber/jabber.c | 2 +-
libpurple/protocols/msn/msn.c | 2 +-
libpurple/protocols/mxit/multimx.c | 2 +-
libpurple/protocols/novell/novell.c | 6 +++---
libpurple/protocols/yahoo/libymsg.c | 2 +-
pidgin/gtkaccount.c | 8 ++++----
pidgin/gtkconv.c | 2 +-
pidgin/gtkutils.c | 4 ++--
19 files changed, 42 insertions(+), 42 deletions(-)
diffs (truncated from 396 to 300 lines):
diff --git a/finch/gntaccount.c b/finch/gntaccount.c
--- a/finch/gntaccount.c
+++ b/finch/gntaccount.c
@@ -188,7 +188,7 @@ save_account_cb(AccountEditDialog *dialo
/* Alias */
value = gnt_entry_get_text(GNT_ENTRY(dialog->alias));
- purple_account_set_alias(account, value);
+ purple_account_set_private_alias(account, value);
/* Remember password and password */
purple_account_set_remember_password(account,
@@ -628,7 +628,7 @@ edit_account_continue(PurpleAccount *acc
gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(_("Alias:")));
gnt_box_add_widget(GNT_BOX(hbox), entry);
if (account)
- gnt_entry_set_text(GNT_ENTRY(entry), purple_account_get_alias(account));
+ gnt_entry_set_text(GNT_ENTRY(entry), purple_account_get_private_alias(account));
/* User options */
update_user_options(dialog);
diff --git a/finch/gntconv.c b/finch/gntconv.c
--- a/finch/gntconv.c
+++ b/finch/gntconv.c
@@ -1063,7 +1063,7 @@ finch_write_im(PurpleConversation *conv,
{
who = purple_connection_get_display_name(purple_account_get_connection(account));
if (!who)
- who = purple_account_get_alias(account);
+ who = purple_account_get_private_alias(account);
if (!who)
who = purple_account_get_username(account);
}
diff --git a/finch/gntpounce.c b/finch/gntpounce.c
--- a/finch/gntpounce.c
+++ b/finch/gntpounce.c
@@ -849,7 +849,7 @@ pounce_cb(PurplePounce *pounce, PurplePo
* NULL to the account alias if we have it or the account
* name if that's all we have
*/
- if ((name_shown = purple_account_get_alias(account)) == NULL)
+ if ((name_shown = purple_account_get_private_alias(account)) == NULL)
name_shown = purple_account_get_username(account);
if (reason == NULL)
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -751,7 +751,7 @@ purple_account_set_password(PurpleAccoun
}
void
-purple_account_set_alias(PurpleAccount *account, const char *alias)
+purple_account_set_private_alias(PurpleAccount *account, const char *alias)
{
PurpleAccountPrivate *priv;
@@ -1375,7 +1375,7 @@ purple_account_get_password(PurpleAccoun
}
const char *
-purple_account_get_alias(const PurpleAccount *account)
+purple_account_get_private_alias(const PurpleAccount *account)
{
PurpleAccountPrivate *priv;
@@ -1448,7 +1448,7 @@ purple_account_get_name_for_display(cons
PurpleConnection *gc = NULL;
const gchar *name = NULL, *username = NULL, *displayname = NULL;
- name = purple_account_get_alias(account);
+ name = purple_account_get_private_alias(account);
if (name) {
return name;
@@ -2739,7 +2739,7 @@ purple_account_to_xmlnode(PurpleAccount
}
}
- if ((tmp = purple_account_get_alias(account)) != NULL)
+ if ((tmp = purple_account_get_private_alias(account)) != NULL)
{
child = xmlnode_new_child(node, "alias");
xmlnode_insert_data(child, tmp, -1);
@@ -2808,7 +2808,7 @@ purple_account_set_property(GObject *obj
purple_account_set_username(account, g_value_get_string(value));
break;
case PROP_PRIVATE_ALIAS:
- purple_account_set_alias(account, g_value_get_string(value));
+ purple_account_set_private_alias(account, g_value_get_string(value));
break;
case PROP_ENABLED:
purple_account_set_enabled(account, purple_core_get_ui(),
@@ -2853,7 +2853,7 @@ purple_account_get_property(GObject *obj
g_value_set_string(value, purple_account_get_username(account));
break;
case PROP_PRIVATE_ALIAS:
- g_value_set_string(value, purple_account_get_alias(account));
+ g_value_set_string(value, purple_account_get_private_alias(account));
break;
case PROP_ENABLED:
g_value_set_boolean(value, purple_account_get_enabled(account,
diff --git a/libpurple/account.h b/libpurple/account.h
--- a/libpurple/account.h
+++ b/libpurple/account.h
@@ -319,12 +319,12 @@ void purple_account_set_password(PurpleA
PurpleKeyringSaveCallback cb, gpointer data);
/**
- * Sets the account's alias.
+ * Sets the account's private alias.
*
* @param account The account.
* @param alias The alias.
*/
-void purple_account_set_alias(PurpleAccount *account, const char *alias);
+void purple_account_set_private_alias(PurpleAccount *account, const char *alias);
/**
* Sets the account's user information
@@ -639,13 +639,13 @@ void purple_account_get_password(PurpleA
PurpleKeyringReadCallback cb, gpointer data);
/**
- * Returns the account's alias.
+ * Returns the account's private alias.
*
* @param account The account.
*
* @return The alias.
*/
-const char *purple_account_get_alias(const PurpleAccount *account);
+const char *purple_account_get_private_alias(const PurpleAccount *account);
/**
* Returns the account's user information.
diff --git a/libpurple/accounts.c b/libpurple/accounts.c
--- a/libpurple/accounts.c
+++ b/libpurple/accounts.c
@@ -497,7 +497,7 @@ parse_account(xmlnode *node)
if ((child != NULL) && ((data = xmlnode_get_data(child)) != NULL))
{
if (*data != '\0')
- purple_account_set_alias(ret, data);
+ purple_account_set_private_alias(ret, data);
g_free(data);
}
diff --git a/libpurple/conversation.c b/libpurple/conversation.c
--- a/libpurple/conversation.c
+++ b/libpurple/conversation.c
@@ -1114,8 +1114,8 @@ purple_conversation_write(PurpleConversa
b = purple_find_buddy(account,
purple_account_get_username(account));
- if (purple_account_get_alias(account) != NULL)
- alias = purple_account_get_alias(account);
+ if (purple_account_get_private_alias(account) != NULL)
+ alias = purple_account_get_private_alias(account);
else if (b != NULL && !purple_strequal(purple_buddy_get_name(b), purple_buddy_get_contact_alias(b)))
alias = purple_buddy_get_contact_alias(b);
else if (purple_connection_get_display_name(gc) != NULL)
@@ -1791,7 +1791,7 @@ purple_conv_chat_add_users(PurpleConvCha
if(!(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) {
if (purple_strequal(chat->nick, purple_normalize(conv->account, user))) {
- const char *alias2 = purple_account_get_alias(conv->account);
+ const char *alias2 = purple_account_get_private_alias(conv->account);
if (alias2 != NULL)
alias = alias2;
else
@@ -1888,7 +1888,7 @@ purple_conv_chat_rename_user(PurpleConvC
is_me = TRUE;
if(!(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) {
- alias = purple_account_get_alias(conv->account);
+ alias = purple_account_get_private_alias(conv->account);
if (alias != NULL)
new_alias = alias;
else
diff --git a/libpurple/plugins/log_reader.c b/libpurple/plugins/log_reader.c
--- a/libpurple/plugins/log_reader.c
+++ b/libpurple/plugins/log_reader.c
@@ -986,7 +986,7 @@ static char * msn_logger_read (PurpleLog
if (buddy)
their_name = purple_buddy_get_alias(buddy);
- alias = purple_account_get_alias(log->account);
+ alias = purple_account_get_private_alias(log->account);
if (alias) {
alias_length = strlen(alias);
} else {
@@ -1111,8 +1111,8 @@ static char * msn_logger_read (PurpleLog
text = g_string_append(text, "<b>");
if (name_guessed == NAME_GUESS_ME) {
- if (purple_account_get_alias(log->account))
- text = g_string_append(text, purple_account_get_alias(log->account));
+ if (purple_account_get_private_alias(log->account))
+ text = g_string_append(text, purple_account_get_private_alias(log->account));
else
text = g_string_append(text, purple_account_get_username(log->account));
}
@@ -1663,7 +1663,7 @@ static char * trillian_logger_read (Purp
const char *acct_name;
line2++;
line = line2;
- acct_name = purple_account_get_alias(log->account);
+ acct_name = purple_account_get_private_alias(log->account);
if (!acct_name)
acct_name = purple_account_get_username(log->account);
@@ -2032,7 +2032,7 @@ static char *qip_logger_read(PurpleLog *
}
} else {
const char *acct_name;
- acct_name = purple_account_get_alias(log->account);
+ acct_name = purple_account_get_private_alias(log->account);
if (!acct_name)
acct_name = purple_account_get_username(log->account);
diff --git a/libpurple/plugins/perl/common/Account.xs b/libpurple/plugins/perl/common/Account.xs
--- a/libpurple/plugins/perl/common/Account.xs
+++ b/libpurple/plugins/perl/common/Account.xs
@@ -50,7 +50,7 @@ CODE:
purple_perl_account_set_password(account, password, func, data);
void
-purple_account_set_alias(account, alias)
+purple_account_set_private_alias(account, alias)
Purple::Account account
const char * alias
@@ -140,7 +140,7 @@ CODE:
purple_perl_account_get_password(account, func, data);
const char *
-purple_account_get_alias(account)
+purple_account_get_private_alias(account)
Purple::Account account
const char *
diff --git a/libpurple/plugins/signals-test.c b/libpurple/plugins/signals-test.c
--- a/libpurple/plugins/signals-test.c
+++ b/libpurple/plugins/signals-test.c
@@ -73,7 +73,7 @@ account_alias_changed(PurpleAccount *acc
{
purple_debug_misc("signals test", "account-alias-changed (%s, %s, %s)\n",
purple_account_get_username(account),
- old, purple_account_get_alias(account));
+ old, purple_account_get_private_alias(account));
}
static int
diff --git a/libpurple/plugins/tcl/tcl_cmds.c b/libpurple/plugins/tcl/tcl_cmds.c
--- a/libpurple/plugins/tcl/tcl_cmds.c
+++ b/libpurple/plugins/tcl/tcl_cmds.c
@@ -139,7 +139,7 @@ int tcl_cmd_account(ClientData unused, T
}
if ((account = tcl_validate_account(objv[2], interp)) == NULL)
return TCL_ERROR;
- alias = purple_account_get_alias(account);
+ alias = purple_account_get_private_alias(account);
Tcl_SetObjResult(interp, Tcl_NewStringObj(alias ? (char *)alias : "", -1));
break;
case CMD_ACCOUNT_CONNECT:
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -1421,7 +1421,7 @@ void jabber_register_parse(JabberStream
if((node = xmlnode_get_child(query, "name"))) {
if(js->registration)
field = purple_request_field_string_new("name", _("Name"),
- purple_account_get_alias(purple_connection_get_account(js->gc)), FALSE);
+ purple_account_get_private_alias(purple_connection_get_account(js->gc)), FALSE);
else {
char *data = xmlnode_get_data(node);
field = purple_request_field_string_new("name", _("Name"), data, FALSE);
diff --git a/libpurple/protocols/msn/msn.c b/libpurple/protocols/msn/msn.c
--- a/libpurple/protocols/msn/msn.c
+++ b/libpurple/protocols/msn/msn.c
@@ -853,7 +853,7 @@ initiate_chat_cb(PurpleBlistNode *node,
swboard->flag = MSN_SB_FLAG_IM;
/* Local alias > Display name > Username */
- if ((alias = purple_account_get_alias(account)) == NULL)
+ if ((alias = purple_account_get_private_alias(account)) == NULL)
if ((alias = purple_connection_get_display_name(gc)) == NULL)
alias = purple_account_get_username(account);
diff --git a/libpurple/protocols/mxit/multimx.c b/libpurple/protocols/mxit/multimx.c
--- a/libpurple/protocols/mxit/multimx.c
+++ b/libpurple/protocols/mxit/multimx.c
@@ -638,7 +638,7 @@ int mxit_chat_send(PurpleConnection *gc,
if (multimx->nickname)
nickname = multimx->nickname;
else
- nickname = purple_account_get_alias(purple_connection_get_account(gc)); /* local alias */
+ nickname = purple_account_get_private_alias(purple_connection_get_account(gc)); /* local alias */
More information about the Commits
mailing list