Renamed PURPLE_IS_BUDDY_ONLINE back to PURPLE_BUDDY_IS_ONLINE soc.2013.gobjectification

Sat, 13 Jul 2013 21:17:31 +0530

author
Ankit Vani <a@nevitus.org>
date
Sat, 13 Jul 2013 21:17:31 +0530
branch
soc.2013.gobjectification
changeset 34760
062535fbe1e9
parent 34759
545149898f9a
child 34761
eb42f0726a08

Renamed PURPLE_IS_BUDDY_ONLINE back to PURPLE_BUDDY_IS_ONLINE

finch/gntblist.c file | annotate | diff | comparison | revisions
finch/gntpounce.c file | annotate | diff | comparison | revisions
finch/plugins/grouping.c file | annotate | diff | comparison | revisions
libpurple/blistnodetypes.h file | annotate | diff | comparison | revisions
libpurple/buddylist.c file | annotate | diff | comparison | revisions
libpurple/dbus-define-api.h file | annotate | diff | comparison | revisions
libpurple/protocols/gg/gg.c file | annotate | diff | comparison | revisions
libpurple/protocols/jabber/jabber.c file | annotate | diff | comparison | revisions
libpurple/protocols/msn/user.c file | annotate | diff | comparison | revisions
libpurple/protocols/myspace/myspace.c file | annotate | diff | comparison | revisions
libpurple/protocols/novell/novell.c file | annotate | diff | comparison | revisions
libpurple/protocols/oscar/oscar.c file | annotate | diff | comparison | revisions
pidgin/gtkblist.c file | annotate | diff | comparison | revisions
pidgin/gtkconv.c file | annotate | diff | comparison | revisions
pidgin/gtkpounce.c file | annotate | diff | comparison | revisions
pidgin/plugins/ticker/ticker.c file | annotate | diff | comparison | revisions
--- a/finch/gntblist.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/finch/gntblist.c	Sat Jul 13 21:17:31 2013 +0530
@@ -172,7 +172,7 @@
 		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 @@
 
 	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 @@
 				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 @@
 		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 @@
 	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;
 	}
--- a/finch/gntpounce.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/finch/gntpounce.c	Sat Jul 13 21:17:31 2013 +0530
@@ -565,7 +565,7 @@
 			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 {
--- a/finch/plugins/grouping.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/finch/plugins/grouping.c	Sat Jul 13 21:17:31 2013 +0530
@@ -98,7 +98,7 @@
 		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 @@
 
 	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 @@
 {
 	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;
 		}
 	}
--- a/libpurple/blistnodetypes.h	Sat Jul 13 14:03:02 2013 +0530
+++ b/libpurple/blistnodetypes.h	Sat Jul 13 21:17:31 2013 +0530
@@ -80,7 +80,7 @@
 #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))))
--- a/libpurple/buddylist.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/libpurple/buddylist.c	Sat Jul 13 21:17:31 2013 +0530
@@ -941,7 +941,7 @@
 		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 @@
 	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 @@
 		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);
--- a/libpurple/dbus-define-api.h	Sat Jul 13 14:03:02 2013 +0530
+++ b/libpurple/dbus-define-api.h	Sat Jul 13 21:17:31 2013 +0530
@@ -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);
--- a/libpurple/protocols/gg/gg.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/libpurple/protocols/gg/gg.c	Sat Jul 13 21:17:31 2013 +0530
@@ -814,7 +814,7 @@
 	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 @@
 		}
 		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);
 	}
 }
--- a/libpurple/protocols/jabber/jabber.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/libpurple/protocols/jabber/jabber.c	Sat Jul 13 21:17:31 2013 +0530
@@ -2130,7 +2130,7 @@
 	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 @@
 	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 @@
 
 		}
 
-		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);
 		}
 	}
--- a/libpurple/protocols/msn/user.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/libpurple/protocols/msn/user.c	Sat Jul 13 21:17:31 2013 +0530
@@ -394,7 +394,7 @@
 	PurpleBuddy *buddy;
 
 	buddy = purple_blist_find_buddy(account, name);
-	return PURPLE_IS_BUDDY_ONLINE(buddy);
+	return PURPLE_BUDDY_IS_ONLINE(buddy);
 }
 
 gboolean
--- a/libpurple/protocols/myspace/myspace.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/libpurple/protocols/myspace/myspace.c	Sat Jul 13 21:17:31 2013 +0530
@@ -426,7 +426,7 @@
 
 	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);
--- a/libpurple/protocols/novell/novell.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/libpurple/protocols/novell/novell.c	Sat Jul 13 21:17:31 2013 +0530
@@ -2844,7 +2844,7 @@
 	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);
--- a/libpurple/protocols/oscar/oscar.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/libpurple/protocols/oscar/oscar.c	Sat Jul 13 21:17:31 2013 +0530
@@ -3290,7 +3290,7 @@
 
 		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 @@
 	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 @@
 
 	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);
--- a/pidgin/gtkblist.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/pidgin/gtkblist.c	Sat Jul 13 21:17:31 2013 +0530
@@ -1854,7 +1854,7 @@
 					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 @@
 
 		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 @@
 
 		/* 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 @@
 		}
 
 		/* Last Seen */
-		if (full && c && !PURPLE_IS_BUDDY_ONLINE(b))
+		if (full && c && !PURPLE_BUDDY_IS_ONLINE(b))
 		{
 			struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(PURPLE_BLIST_NODE(c));
 			PurpleBListNode *bnode;
@@ -4013,7 +4013,7 @@
 		/* Offline? */
 		/* FIXME: Why is this status special-cased by the core? --rlaager
 		 * FIXME: Alternatively, why not have the core do all of them? --rlaager */
-		if (!PURPLE_IS_BUDDY_ONLINE(b)) {
+		if (!PURPLE_BUDDY_IS_ONLINE(b)) {
 			purple_notify_user_info_add_pair_plaintext(user_info, _("Status"), _("Offline"));
 		}
 
@@ -4267,7 +4267,7 @@
 		p = purple_buddy_get_presence(buddy);
 		trans = purple_presence_is_idle(p);
 
-		if (PURPLE_IS_BUDDY_ONLINE(buddy) && gtkbuddynode && gtkbuddynode->recent_signonoff)
+		if (PURPLE_BUDDY_IS_ONLINE(buddy) && gtkbuddynode && gtkbuddynode->recent_signonoff)
 			icon = PIDGIN_STOCK_STATUS_LOGIN;
 		else if (gtkbuddynode && gtkbuddynode->recent_signonoff)
 			icon = PIDGIN_STOCK_STATUS_LOGOUT;
@@ -6712,7 +6712,7 @@
 	if (!avatar) {
 		g_object_ref(G_OBJECT(gtkblist->empty_avatar));
 		avatar = gtkblist->empty_avatar;
-	} else if ((!PURPLE_IS_BUDDY_ONLINE(buddy) || purple_presence_is_idle(presence))) {
+	} else if ((!PURPLE_BUDDY_IS_ONLINE(buddy) || purple_presence_is_idle(presence))) {
 		do_alphashift(avatar, 77);
 	}
 
--- a/pidgin/gtkconv.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/pidgin/gtkconv.c	Sat Jul 13 21:17:31 2013 +0530
@@ -790,7 +790,7 @@
 	PurpleAccount *account = NULL;
 
 	if (entry->is_buddy) {
-		if (PURPLE_IS_BUDDY_ONLINE(entry->entry.buddy))
+		if (PURPLE_BUDDY_IS_ONLINE(entry->entry.buddy))
 			account = purple_buddy_get_account(entry->entry.buddy);
 		else
 			return FALSE;
@@ -7316,7 +7316,7 @@
 			window_icon =
 				gdk_pixbuf_animation_get_static_image(gtkconv->u.im->anim);
 
-			if (buddy &&  !PURPLE_IS_BUDDY_ONLINE(buddy))
+			if (buddy &&  !PURPLE_BUDDY_IS_ONLINE(buddy))
 				gdk_pixbuf_saturate_and_pixelate(window_icon, window_icon, 0.0, FALSE);
 
 			g_object_ref(window_icon);
@@ -7790,7 +7790,7 @@
 	if(pidgin_conv_window_is_active_conversation(conv))
 	{
 		buf = gdk_pixbuf_animation_get_static_image(gtkconv->u.im->anim);
-		if (buddy && !PURPLE_IS_BUDDY_ONLINE(buddy))
+		if (buddy && !PURPLE_BUDDY_IS_ONLINE(buddy))
 			gdk_pixbuf_saturate_and_pixelate(buf, buf, 0.0, FALSE);
 		gtk_window_set_icon(GTK_WINDOW(win->window), buf);
 	}
--- a/pidgin/gtkpounce.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/pidgin/gtkpounce.c	Sat Jul 13 21:17:31 2013 +0530
@@ -984,7 +984,7 @@
 		}
 		else
 		{
-			if (!PURPLE_IS_BUDDY_ONLINE(buddy))
+			if (!PURPLE_BUDDY_IS_ONLINE(buddy))
 			{
 				gtk_toggle_button_set_active(
 					GTK_TOGGLE_BUTTON(dialog->signon), TRUE);
--- a/pidgin/plugins/ticker/ticker.c	Sat Jul 13 14:03:02 2013 +0530
+++ b/pidgin/plugins/ticker/ticker.c	Sat Jul 13 21:17:31 2013 +0530
@@ -249,7 +249,7 @@
 				if(!PURPLE_IS_BUDDY(bnode))
 					continue;
 				b = PURPLE_BUDDY(bnode);
-				if(PURPLE_IS_BUDDY_ONLINE(b))
+				if(PURPLE_BUDDY_IS_ONLINE(b))
 					buddy_ticker_add_buddy(b);
 			}
 		}

mercurial