gobjectification: f7b35858: And nullprpl compiles.
qulogic at pidgin.im
qulogic at pidgin.im
Wed Jun 9 01:33:15 EDT 2010
-----------------------------------------------------------------
Revision: f7b358587841a604fc466577f7c84742d4dc8c6f
Ancestor: ce595caf8d9736f7f57dbe38da709aae9c4ca775
Author: qulogic at pidgin.im
Date: 2010-06-09T02:18:14
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/f7b358587841a604fc466577f7c84742d4dc8c6f
Modified files:
libpurple/protocols/null/nullprpl.c
ChangeLog:
And nullprpl compiles.
-------------- next part --------------
============================================================
--- libpurple/protocols/null/nullprpl.c a6b4c584e4b904fbd645cb5db9781d92eb1f55ee
+++ libpurple/protocols/null/nullprpl.c 4f67207be4a88e0241ea219d7972ed006aa1cd1e
@@ -225,10 +225,11 @@ static char *nullprpl_status_text(Purple
}
static char *nullprpl_status_text(PurpleBuddy *buddy) {
+ PurpleAccount *account = purple_buddy_get_account(buddy);
purple_debug_info("nullprpl", "getting %s's status text for %s\n",
- buddy->name, purple_account_get_username(buddy->account));
+ purple_buddy_get_name(buddy), purple_account_get_username(account));
- if (purple_find_buddy(buddy->account, buddy->name)) {
+ if (purple_find_buddy(account, purple_buddy_get_name(buddy))) {
PurplePresence *presence = purple_buddy_get_presence(buddy);
PurpleStatus *status = purple_presence_get_active_status(presence);
const char *name = purple_status_get_name(status);
@@ -240,11 +241,11 @@ static char *nullprpl_status_text(Purple
else
text = g_strdup(name);
- purple_debug_info("nullprpl", "%s's status text is %s\n", buddy->name, text);
+ purple_debug_info("nullprpl", "%s's status text is %s\n", purple_buddy_get_name(buddy), text);
return text;
} else {
- purple_debug_info("nullprpl", "...but %s is not logged in\n", buddy->name);
+ purple_debug_info("nullprpl", "...but %s is not logged in\n", purple_buddy_get_name(buddy));
return g_strdup("Not logged in");
}
}
@@ -252,7 +253,7 @@ static void nullprpl_tooltip_text(Purple
static void nullprpl_tooltip_text(PurpleBuddy *buddy,
PurpleNotifyUserInfo *info,
gboolean full) {
- PurpleConnection *gc = get_nullprpl_gc(buddy->name);
+ PurpleConnection *gc = get_nullprpl_gc(purple_buddy_get_name(buddy));
if (gc) {
/* they're logged in */
@@ -275,7 +276,7 @@ static void nullprpl_tooltip_text(Purple
}
purple_debug_info("nullprpl", "showing %s tooltip for %s\n",
- (full) ? "full" : "short", buddy->name);
+ (full) ? "full" : "short", purple_buddy_get_name(buddy));
}
static GList *nullprpl_status_types(PurpleAccount *acct)
@@ -310,7 +311,7 @@ static void blist_example_menu_item(Purp
static void blist_example_menu_item(PurpleBlistNode *node, gpointer userdata) {
purple_debug_info("nullprpl", "example menu item clicked on user %s\n",
- ((PurpleBuddy *)node)->name);
+ purple_buddy_get_name(PURPLE_BUDDY(node)));
purple_notify_info(NULL, /* plugin handle or PurpleConnection */
_("Primary title"),
@@ -321,7 +322,7 @@ static GList *nullprpl_blist_node_menu(P
static GList *nullprpl_blist_node_menu(PurpleBlistNode *node) {
purple_debug_info("nullprpl", "providing buddy list context menu item\n");
- if (PURPLE_BLIST_NODE_IS_BUDDY(node)) {
+ if (PURPLE_IS_BUDDY(node)) {
PurpleMenuAction *action = purple_menu_action_new(
_("Nullprpl example menu item"),
PURPLE_CALLBACK(blist_example_menu_item),
@@ -473,7 +474,7 @@ static void notify_typing(PurpleConnecti
static void notify_typing(PurpleConnection *from, PurpleConnection *to,
gpointer typing) {
const char *from_username = purple_account_get_username(purple_connection_get_account(from));
- char *action = typing_state_to_string((PurpleTypingState)typing);
+ const char *action = typing_state_to_string((PurpleTypingState)typing);
purple_debug_info("nullprpl", "notifying %s that %s %s\n",
purple_account_get_username(purple_connection_get_account(to)), from_username, action);
@@ -546,9 +547,9 @@ static void nullprpl_add_buddy(PurpleCon
PurpleGroup *group)
{
const char *username = purple_account_get_username(purple_connection_get_account(gc));
- PurpleConnection *buddy_gc = get_nullprpl_gc(buddy->name);
+ PurpleConnection *buddy_gc = get_nullprpl_gc(purple_buddy_get_name(buddy));
- purple_debug_info("nullprpl", "adding %s to %s's buddy list\n", buddy->name,
+ purple_debug_info("nullprpl", "adding %s to %s's buddy list\n", purple_buddy_get_name(buddy),
username);
if (buddy_gc) {
@@ -558,10 +559,10 @@ static void nullprpl_add_buddy(PurpleCon
if (purple_find_buddy(buddy_acct, username)) {
purple_debug_info("nullprpl", "%s is already on %s's buddy list\n",
- username, buddy->name);
+ username, purple_buddy_get_name(buddy));
} else {
purple_debug_info("nullprpl", "asking %s if they want to add %s\n",
- buddy->name, username);
+ purple_buddy_get_name(buddy), username);
purple_account_request_add(buddy_acct,
username,
NULL, /* local account id (rarely used) */
@@ -589,7 +590,7 @@ static void nullprpl_remove_buddy(Purple
PurpleGroup *group)
{
purple_debug_info("nullprpl", "removing %s from %s's buddy list\n",
- buddy->name, purple_account_get_username(purple_connection_get_account(gc)));
+ purple_buddy_get_name(buddy), purple_account_get_username(purple_connection_get_account(gc)));
}
static void nullprpl_remove_buddies(PurpleConnection *gc, GList *buddies,
@@ -893,7 +894,8 @@ static void nullprpl_rename_group(Purple
static void nullprpl_rename_group(PurpleConnection *gc, const char *old_name,
PurpleGroup *group, GList *moved_buddies) {
purple_debug_info("nullprpl", "%s has renamed group %s to %s\n",
- purple_account_get_username(purple_connection_get_account(gc)), old_name, group->name);
+ purple_account_get_username(purple_connection_get_account(gc)),
+ old_name, purple_group_get_name(group));
}
static void nullprpl_convo_closed(PurpleConnection *gc, const char *who) {
@@ -918,7 +920,8 @@ static void nullprpl_remove_group(Purple
static void nullprpl_remove_group(PurpleConnection *gc, PurpleGroup *group) {
purple_debug_info("nullprpl", "%s has removed group %s\n",
- purple_account_get_username(purple_connection_get_account(gc)), group->name);
+ purple_account_get_username(purple_connection_get_account(gc)),
+ purple_group_get_name(group));
}
@@ -1035,7 +1038,7 @@ static gboolean nullprpl_offline_message
static gboolean nullprpl_offline_message(const PurpleBuddy *buddy) {
purple_debug_info("nullprpl",
"reporting that offline messages are supported for %s\n",
- buddy->name);
+ purple_buddy_get_name(buddy));
return TRUE;
}
More information about the Commits
mailing list