/soc/2013/ankitkv/gobjectification: 062535fbe1e9: Renamed PURPLE...

Ankit Vani a at nevitus.org
Sat Jul 13 11:47:43 EDT 2013


Changeset: 062535fbe1e96c09ef5d66fc4f48c3d782155237
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-07-13 21:17 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/062535fbe1e9

Description:

Renamed PURPLE_IS_BUDDY_ONLINE back to PURPLE_BUDDY_IS_ONLINE

diffstat:

 finch/gntblist.c                      |  10 +++++-----
 finch/gntpounce.c                     |   2 +-
 finch/plugins/grouping.c              |   6 +++---
 libpurple/blistnodetypes.h            |   2 +-
 libpurple/buddylist.c                 |   6 +++---
 libpurple/dbus-define-api.h           |   2 +-
 libpurple/protocols/gg/gg.c           |   4 ++--
 libpurple/protocols/jabber/jabber.c   |   8 ++++----
 libpurple/protocols/msn/user.c        |   2 +-
 libpurple/protocols/myspace/myspace.c |   2 +-
 libpurple/protocols/novell/novell.c   |   2 +-
 libpurple/protocols/oscar/oscar.c     |   6 +++---
 pidgin/gtkblist.c                     |  14 +++++++-------
 pidgin/gtkconv.c                      |   6 +++---
 pidgin/gtkpounce.c                    |   2 +-
 pidgin/plugins/ticker/ticker.c        |   2 +-
 16 files changed, 38 insertions(+), 38 deletions(-)

diffs (truncated from 384 to 300 lines):

diff --git a/finch/gntblist.c b/finch/gntblist.c
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -172,7 +172,7 @@ static gboolean default_can_add_node(Pur
 		FinchBListNode *fnode = purple_blist_node_get_ui_data(node);
 		if (!purple_buddy_get_contact(buddy))
 			return FALSE; /* When a new buddy is added and show-offline is set */
-		if (PURPLE_IS_BUDDY_ONLINE(buddy))
+		if (PURPLE_BUDDY_IS_ONLINE(buddy))
 			return TRUE;  /* The buddy is online */
 		if (!purple_account_is_connected(purple_buddy_get_account(buddy)))
 			return FALSE; /* The account is disconnected. Do not show */
@@ -240,7 +240,7 @@ static gboolean default_create_tooltip(g
 
 	if (PURPLE_IS_CONTACT(node)) {
 		PurpleBuddy *pr = purple_contact_get_priority_buddy((PurpleContact*)node);
-		gboolean offline = !PURPLE_IS_BUDDY_ONLINE(pr);
+		gboolean offline = !PURPLE_BUDDY_IS_ONLINE(pr);
 		gboolean showoffline = purple_prefs_get_bool(PREF_ROOT "/showoffline");
 		const char *name = purple_buddy_get_name(pr);
 
@@ -257,7 +257,7 @@ static gboolean default_create_tooltip(g
 				continue;
 			if (!purple_account_is_connected(purple_buddy_get_account(buddy)))
 				continue;
-			if (!showoffline && !PURPLE_IS_BUDDY_ONLINE(buddy))
+			if (!showoffline && !PURPLE_BUDDY_IS_ONLINE(buddy))
 				continue;
 			str = g_string_append(str, "\n----------\n");
 			tooltip_for_buddy(buddy, str, FALSE);
@@ -266,7 +266,7 @@ static gboolean default_create_tooltip(g
 		PurpleBuddy *buddy = (PurpleBuddy *)node;
 		tooltip_for_buddy(buddy, str, TRUE);
 		title = g_strdup(purple_buddy_get_name(buddy));
-		if (!PURPLE_IS_BUDDY_ONLINE((PurpleBuddy*)node))
+		if (!PURPLE_BUDDY_IS_ONLINE((PurpleBuddy*)node))
 			lastseen = purple_blist_node_get_int(node, "last_seen");
 	} else if (PURPLE_IS_GROUP(node)) {
 		PurpleGroup *group = (PurpleGroup *)node;
@@ -430,7 +430,7 @@ is_contact_online(PurpleContact *contact
 	for (node = purple_blist_node_get_first_child(((PurpleBListNode*)contact)); node;
 			node = purple_blist_node_get_sibling_next(node)) {
 		FinchBListNode *fnode = purple_blist_node_get_ui_data(node);
-		if (PURPLE_IS_BUDDY_ONLINE((PurpleBuddy*)node) ||
+		if (PURPLE_BUDDY_IS_ONLINE((PurpleBuddy*)node) ||
 				(fnode && fnode->signed_timer))
 			return TRUE;
 	}
diff --git a/finch/gntpounce.c b/finch/gntpounce.c
--- a/finch/gntpounce.c
+++ b/finch/gntpounce.c
@@ -565,7 +565,7 @@ finch_pounce_editor_show(PurpleAccount *
 			gnt_check_box_set_checked(
 				GNT_CHECK_BOX(dialog->signon), TRUE);
 		} else {
-			if (!PURPLE_IS_BUDDY_ONLINE(buddy)) {
+			if (!PURPLE_BUDDY_IS_ONLINE(buddy)) {
 				gnt_check_box_set_checked(
 					GNT_CHECK_BOX(dialog->signon), TRUE);
 			} else {
diff --git a/finch/plugins/grouping.c b/finch/plugins/grouping.c
--- a/finch/plugins/grouping.c
+++ b/finch/plugins/grouping.c
@@ -98,7 +98,7 @@ static gboolean on_offline_can_add_node(
 		return FALSE;
 	} else if (PURPLE_IS_BUDDY(node)) {
 		PurpleBuddy *buddy = PURPLE_BUDDY(node);
-		if (PURPLE_IS_BUDDY_ONLINE(buddy))
+		if (PURPLE_BUDDY_IS_ONLINE(buddy))
 			return TRUE;
 		if (purple_prefs_get_bool("/finch/blist/showoffline") &&
 				purple_account_is_connected(purple_buddy_get_account(buddy)))
@@ -118,7 +118,7 @@ static gpointer on_offline_find_parent(P
 
 	if (PURPLE_IS_CONTACT(node)) {
 		node = PURPLE_BLIST_NODE(purple_contact_get_priority_buddy(PURPLE_CONTACT(node)));
-		ret = PURPLE_IS_BUDDY_ONLINE(PURPLE_BUDDY(node)) ? online : offline;
+		ret = PURPLE_BUDDY_IS_ONLINE(PURPLE_BUDDY(node)) ? online : offline;
 	} else if (PURPLE_IS_BUDDY(node)) {
 		ret = purple_blist_node_get_parent(node);
 		finch_blist_manager_add_node(ret);
@@ -176,7 +176,7 @@ static gpointer meebo_find_parent(Purple
 {
 	if (PURPLE_IS_CONTACT(node)) {
 		PurpleBuddy *buddy = purple_contact_get_priority_buddy(PURPLE_CONTACT(node));
-		if (buddy && !PURPLE_IS_BUDDY_ONLINE(buddy)) {
+		if (buddy && !PURPLE_BUDDY_IS_ONLINE(buddy)) {
 			return &meebo;
 		}
 	}
diff --git a/libpurple/blistnodetypes.h b/libpurple/blistnodetypes.h
--- a/libpurple/blistnodetypes.h
+++ b/libpurple/blistnodetypes.h
@@ -80,7 +80,7 @@ typedef struct _PurpleChatClass PurpleCh
 #include "media.h"
 #include "status.h"
 
-#define PURPLE_IS_BUDDY_ONLINE(b) \
+#define PURPLE_BUDDY_IS_ONLINE(b) \
 	(PURPLE_IS_BUDDY(b) \
 	&& purple_account_is_connected(purple_buddy_get_account(PURPLE_BUDDY(b))) \
 	&& purple_presence_is_online(purple_buddy_get_presence(PURPLE_BUDDY(b))))
diff --git a/libpurple/buddylist.c b/libpurple/buddylist.c
--- a/libpurple/buddylist.c
+++ b/libpurple/buddylist.c
@@ -941,7 +941,7 @@ void purple_blist_add_buddy(PurpleBuddy 
 		contact_counter = PURPLE_COUNTING_NODE(bnode->parent);
 		group_counter = PURPLE_COUNTING_NODE(bnode->parent->parent);
 
-		if (PURPLE_IS_BUDDY_ONLINE(buddy)) {
+		if (PURPLE_BUDDY_IS_ONLINE(buddy)) {
 			purple_counting_node_change_online_count(contact_counter, -1);
 			if (purple_counting_node_get_online_count(contact_counter) == 0)
 				purple_counting_node_change_online_count(group_counter, -1);
@@ -1008,7 +1008,7 @@ void purple_blist_add_buddy(PurpleBuddy 
 	contact_counter = PURPLE_COUNTING_NODE(bnode->parent);
 	group_counter = PURPLE_COUNTING_NODE(bnode->parent->parent);
 
-	if (PURPLE_IS_BUDDY_ONLINE(buddy)) {
+	if (PURPLE_BUDDY_IS_ONLINE(buddy)) {
 		purple_counting_node_change_online_count(contact_counter, +1);
 		if (purple_counting_node_get_online_count(contact_counter) == 1)
 			purple_counting_node_change_online_count(group_counter, +1);
@@ -1357,7 +1357,7 @@ void purple_blist_remove_buddy(PurpleBud
 		contact_counter = PURPLE_COUNTING_NODE(contact);
 		group_counter = PURPLE_COUNTING_NODE(group);
 
-		if (PURPLE_IS_BUDDY_ONLINE(buddy)) {
+		if (PURPLE_BUDDY_IS_ONLINE(buddy)) {
 			purple_counting_node_change_online_count(contact_counter, -1);
 			if (purple_counting_node_get_online_count(contact_counter) == 0)
 				purple_counting_node_set_online_count(group_counter, -1);
diff --git a/libpurple/dbus-define-api.h b/libpurple/dbus-define-api.h
--- a/libpurple/dbus-define-api.h
+++ b/libpurple/dbus-define-api.h
@@ -6,7 +6,7 @@
    program, which makes these macros callable by DBUS.  */
 
 /* buddylist.h */
-gboolean PURPLE_IS_BUDDY_ONLINE(PurpleBuddy *buddy);
+gboolean PURPLE_BUDDY_IS_ONLINE(PurpleBuddy *buddy);
 
 /* connection.h */
 gboolean PURPLE_CONNECTION_IS_CONNECTED(PurpleConnection *connection);
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
@@ -814,7 +814,7 @@ static void ggp_tooltip_text(PurpleBuddy
 	purple_notify_user_info_add_pair_plaintext(user_info, _("Alias"), alias);
 
 	if (msg != NULL) {
-		if (PURPLE_IS_BUDDY_ONLINE(b)) {
+		if (PURPLE_BUDDY_IS_ONLINE(b)) {
 			tmp = g_strdup_printf("%s: %s", name, msg);
 			purple_notify_user_info_add_pair_plaintext(user_info, _("Status"), tmp);
 			g_free(tmp);
@@ -823,7 +823,7 @@ static void ggp_tooltip_text(PurpleBuddy
 		}
 		g_free(msg);
 	/* We don't want to duplicate 'Status: Offline'. */
-	} else if (PURPLE_IS_BUDDY_ONLINE(b)) {
+	} else if (PURPLE_BUDDY_IS_ONLINE(b)) {
 		purple_notify_user_info_add_pair_plaintext(user_info, _("Status"), name);
 	}
 }
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
@@ -2130,7 +2130,7 @@ const char* jabber_list_emblem(PurpleBud
 	if(js)
 		jb = jabber_buddy_find(js, purple_buddy_get_name(b), FALSE);
 
-	if(!PURPLE_IS_BUDDY_ONLINE(b)) {
+	if(!PURPLE_BUDDY_IS_ONLINE(b)) {
 		if(jb && (jb->subscription & JABBER_SUB_PENDING ||
 					!(jb->subscription & JABBER_SUB_TO)))
 			return "not-authorized";
@@ -2170,9 +2170,9 @@ char *jabber_status_text(PurpleBuddy *b)
 	if (gc && purple_connection_get_protocol_data(gc))
 		jb = jabber_buddy_find(purple_connection_get_protocol_data(gc), purple_buddy_get_name(b), FALSE);
 
-	if(jb && !PURPLE_IS_BUDDY_ONLINE(b) && (jb->subscription & JABBER_SUB_PENDING || !(jb->subscription & JABBER_SUB_TO))) {
+	if(jb && !PURPLE_BUDDY_IS_ONLINE(b) && (jb->subscription & JABBER_SUB_PENDING || !(jb->subscription & JABBER_SUB_TO))) {
 		ret = g_strdup(_("Not Authorized"));
-	} else if(jb && !PURPLE_IS_BUDDY_ONLINE(b) && jb->error_msg) {
+	} else if(jb && !PURPLE_BUDDY_IS_ONLINE(b) && jb->error_msg) {
 		ret = g_strdup(jb->error_msg);
 	} else {
 		PurplePresence *presence = purple_buddy_get_presence(b);
@@ -2344,7 +2344,7 @@ void jabber_tooltip_text(PurpleBuddy *b,
 
 		}
 
-		if(!PURPLE_IS_BUDDY_ONLINE(b) && jb->error_msg) {
+		if(!PURPLE_BUDDY_IS_ONLINE(b) && jb->error_msg) {
 			purple_notify_user_info_add_pair_html(user_info, _("Error"), jb->error_msg);
 		}
 	}
diff --git a/libpurple/protocols/msn/user.c b/libpurple/protocols/msn/user.c
--- a/libpurple/protocols/msn/user.c
+++ b/libpurple/protocols/msn/user.c
@@ -394,7 +394,7 @@ msn_user_is_online(PurpleAccount *accoun
 	PurpleBuddy *buddy;
 
 	buddy = purple_blist_find_buddy(account, name);
-	return PURPLE_IS_BUDDY_ONLINE(buddy);
+	return PURPLE_BUDDY_IS_ONLINE(buddy);
 }
 
 gboolean
diff --git a/libpurple/protocols/myspace/myspace.c b/libpurple/protocols/myspace/myspace.c
--- a/libpurple/protocols/myspace/myspace.c
+++ b/libpurple/protocols/myspace/myspace.c
@@ -426,7 +426,7 @@ msim_tooltip_text(PurpleBuddy *buddy, Pu
 
 	user = msim_get_user_from_buddy(buddy, TRUE);
 
-	if (PURPLE_IS_BUDDY_ONLINE(buddy)) {
+	if (PURPLE_BUDDY_IS_ONLINE(buddy)) {
 		PurpleAccount *account = purple_buddy_get_account(buddy);
 		PurpleConnection *gc = purple_account_get_connection(account);
 		MsimSession *session = purple_connection_get_protocol_data(gc);
diff --git a/libpurple/protocols/novell/novell.c b/libpurple/protocols/novell/novell.c
--- a/libpurple/protocols/novell/novell.c
+++ b/libpurple/protocols/novell/novell.c
@@ -2844,7 +2844,7 @@ novell_tooltip_text(PurpleBuddy * buddy,
 	if (gc == NULL || (user = purple_connection_get_protocol_data(gc)) == NULL)
 		return;
 
-	if (PURPLE_IS_BUDDY_ONLINE(buddy)) {
+	if (PURPLE_BUDDY_IS_ONLINE(buddy)) {
 		user_record = nm_find_user_record(user, purple_buddy_get_name(buddy));
 		if (user_record) {
 			status = nm_user_record_get_status(user_record);
diff --git a/libpurple/protocols/oscar/oscar.c b/libpurple/protocols/oscar/oscar.c
--- a/libpurple/protocols/oscar/oscar.c
+++ b/libpurple/protocols/oscar/oscar.c
@@ -3290,7 +3290,7 @@ oscar_send_im(PurpleConnection *gc, cons
 
 		args.flags = 0;
 
-		if (!is_sms && (!buddy || !PURPLE_IS_BUDDY_ONLINE(buddy)))
+		if (!is_sms && (!buddy || !PURPLE_BUDDY_IS_ONLINE(buddy)))
 			args.flags |= AIM_IMFLAGS_OFFLINE;
 
 		if (od->icq) {
@@ -4605,7 +4605,7 @@ void oscar_tooltip_text(PurpleBuddy *b, 
 	OscarData *od;
 	aim_userinfo_t *userinfo;
 
-	if (!PURPLE_IS_BUDDY_ONLINE(b))
+	if (!PURPLE_BUDDY_IS_ONLINE(b))
 		return;
 
 	account = purple_buddy_get_account(b);
@@ -5073,7 +5073,7 @@ oscar_buddy_menu(PurpleBuddy *buddy) {
 
 	if (userinfo &&
 		oscar_util_name_compare(purple_account_get_username(account), bname) &&
-		PURPLE_IS_BUDDY_ONLINE(buddy))
+		PURPLE_BUDDY_IS_ONLINE(buddy))
 	{
 		PeerConnection *conn;
 		conn = peer_connection_find_by_type(od, bname, OSCAR_CAPABILITY_DIRECTIM);
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -1854,7 +1854,7 @@ create_buddy_menu(PurpleBListNode *node,
 					continue;
 				if(!purple_account_get_connection(purple_buddy_get_account(buddy)))
 					continue;
-				if(!show_offline && !PURPLE_IS_BUDDY_ONLINE(buddy))
+				if(!show_offline && !PURPLE_BUDDY_IS_ONLINE(buddy))
 					continue;
 
 				menuitem = gtk_image_menu_item_new_with_label(purple_buddy_get_name(buddy));
@@ -2749,7 +2749,7 @@ static GdkPixbuf *pidgin_blist_get_buddy
 
 		if (buddy) {
 			PurplePresence *presence = purple_buddy_get_presence(buddy);
-			if (!PURPLE_IS_BUDDY_ONLINE(buddy))
+			if (!PURPLE_BUDDY_IS_ONLINE(buddy))
 				offline = TRUE;
 			if (purple_presence_is_idle(presence))
 				idle = TRUE;
@@ -3947,7 +3947,7 @@ static char *pidgin_get_tooltip_text(Pur
 
 		/* Logged In */
 		signon = purple_presence_get_login_time(presence);
-		if (full && PURPLE_IS_BUDDY_ONLINE(b) && signon > 0)
+		if (full && PURPLE_BUDDY_IS_ONLINE(b) && signon > 0)
 		{
 			if (signon > time(NULL)) {
 				/*
@@ -3975,7 +3975,7 @@ static char *pidgin_get_tooltip_text(Pur
 		}
 
 		/* Last Seen */
-		if (full && c && !PURPLE_IS_BUDDY_ONLINE(b))
+		if (full && c && !PURPLE_BUDDY_IS_ONLINE(b))



More information about the Commits mailing list