/soc/2013/ankitkv/gobjectification: af52ff6660c0: Replaced purpl...

Ankit Vani a at nevitus.org
Tue Jul 9 04:52:00 EDT 2013


Changeset: af52ff6660c01f422a3c01e9b513617df634b820
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-07-09 14:21 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/af52ff6660c0

Description:

Replaced purple_get_blist() with purple_blist_get_buddy_list()
where purple_blist is the subsystem and buddy_list is the object type being returned.

diffstat:

 finch/gntblist.c                               |  24 +++++++-------
 libpurple/blistnodes.h                         |   2 +-
 libpurple/buddylist.c                          |   2 +-
 libpurple/buddylist.h                          |   2 +-
 libpurple/plugins/perl/common/BuddyList.xs     |   2 +-
 libpurple/protocols/sametime/sametime.c        |   4 +-
 libpurple/status.c                             |   2 +-
 pidgin/gtkblist.c                              |  40 +++++++++++++-------------
 pidgin/gtkdialogs.c                            |   6 +-
 pidgin/gtkprefs.c                              |   2 +-
 pidgin/gtkprivacy.c                            |   2 +-
 pidgin/gtkutils.c                              |   2 +-
 pidgin/plugins/crazychat/cc_pidgin_plugin.c    |   6 +-
 pidgin/plugins/gevolution/gevo-util.c          |   4 +-
 pidgin/plugins/mailchk.c                       |   8 ++--
 pidgin/plugins/themeedit-icon.c                |   2 +-
 pidgin/plugins/themeedit.c                     |   2 +-
 pidgin/plugins/win32/transparency/win2ktrans.c |   6 +-
 pidgin/plugins/win32/winprefs/winprefs.c       |   8 ++--
 19 files changed, 63 insertions(+), 63 deletions(-)

diffs (truncated from 573 to 300 lines):

diff --git a/finch/gntblist.c b/finch/gntblist.c
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -607,7 +607,7 @@ remove_new_empty_group(gpointer data)
 	if (!ggblist)
 		return FALSE;
 
-	list = purple_get_blist();
+	list = purple_blist_get_buddy_list();
 	g_return_val_if_fail(list, FALSE);
 
 	ggblist->new_group_timeout = 0;
@@ -1026,7 +1026,7 @@ buddy_signed_on(PurpleBuddy *buddy, Finc
 static void
 buddy_signed_off(PurpleBuddy *buddy, FinchBlist *ggblist)
 {
-	node_remove(purple_get_blist(), (PurpleBListNode*)buddy);
+	node_remove(purple_blist_get_buddy_list(), (PurpleBListNode*)buddy);
 }
 #endif
 
@@ -1273,9 +1273,9 @@ toggle_show_offline(GntMenuItem *item, g
 	purple_blist_node_set_bool(buddy, "show_offline",
 			!purple_blist_node_get_bool(buddy, "show_offline"));
 	if (!ggblist->manager->can_add_node(buddy))
-		node_remove(purple_get_blist(), buddy);
+		node_remove(purple_blist_get_buddy_list(), buddy);
 	else
-		node_update(purple_get_blist(), buddy);
+		node_update(purple_blist_get_buddy_list(), buddy);
 }
 
 static void
@@ -1981,7 +1981,7 @@ reset_blist_window(GntWidget *window, gp
 {
 	PurpleBListNode *node;
 	purple_signals_disconnect_by_handle(finch_blist_get_handle());
-	FINCH_SET_DATA(purple_get_blist(), NULL);
+	FINCH_SET_DATA(purple_blist_get_buddy_list(), NULL);
 
 	node = purple_blist_get_root();
 	while (node) {
@@ -2024,7 +2024,7 @@ populate_buddylist(void)
 			(GCompareFunc)blist_node_compare_log);
 	}
 
-	list = purple_get_blist();
+	list = purple_blist_get_buddy_list();
 	node = purple_blist_get_root();
 	while (node)
 	{
@@ -2502,7 +2502,7 @@ buddy_recent_signed_on_off(gpointer data
 	fnode->signed_timer = 0;
 
 	if (!ggblist->manager->can_add_node(node)) {
-		node_remove(purple_get_blist(), node);
+		node_remove(purple_blist_get_buddy_list(), node);
 	} else {
 		update_node_display(node, ggblist);
 		if (purple_blist_node_get_parent(node) && PURPLE_IS_CONTACT(purple_blist_node_get_parent(node)))
@@ -2709,7 +2709,7 @@ block_select(GntMenuItem *item, gpointer
 	purple_request_field_choice_add(field, _("Unblock"));
 	purple_request_field_group_add_field(group, field);
 
-	purple_request_fields(purple_get_blist(), _("Block/Unblock"),
+	purple_request_fields(purple_blist_get_buddy_list(), _("Block/Unblock"),
 						NULL,
 						_("Please enter the username or alias of the person "
 						  "you would like to Block/Unblock."),
@@ -2760,7 +2760,7 @@ send_im_select(GntMenuItem *item, gpoint
 	purple_request_field_set_required(field, TRUE);
 	purple_request_field_group_add_field(group, field);
 
-	purple_request_fields(purple_get_blist(), _("New Instant Message"),
+	purple_request_fields(purple_blist_get_buddy_list(), _("New Instant Message"),
 						NULL,
 						_("Please enter the username or alias of the person "
 						  "you would like to IM."),
@@ -2835,7 +2835,7 @@ join_chat_select(GntMenuItem *item, gpoi
 	purple_request_field_set_required(field, TRUE);
 	purple_request_field_group_add_field(group, field);
 
-	purple_request_fields(purple_get_blist(), _("Join a Chat"),
+	purple_request_fields(purple_blist_get_buddy_list(), _("Join a Chat"),
 						NULL,
 						_("Please enter the name of the chat you want to join."),
 						fields,
@@ -2896,7 +2896,7 @@ view_log_cb(GntMenuItem *item, gpointer 
 	purple_request_field_group_add_field(group, field);
 	purple_request_field_account_set_show_all(field, TRUE);
 
-	purple_request_fields(purple_get_blist(), _("View Log"),
+	purple_request_fields(purple_blist_get_buddy_list(), _("View Log"),
 						NULL,
 						_("Please enter the username or alias of the person "
 						  "whose log you would like to view."),
@@ -3056,7 +3056,7 @@ create_menu(void)
 
 void finch_blist_show()
 {
-	blist_show(purple_get_blist());
+	blist_show(purple_blist_get_buddy_list());
 }
 
 static void
diff --git a/libpurple/blistnodes.h b/libpurple/blistnodes.h
--- a/libpurple/blistnodes.h
+++ b/libpurple/blistnodes.h
@@ -128,7 +128,7 @@ GType purple_blist_node_get_type(void);
 
 /**
  * Returns the next node of a given node. This function is to be used to iterate
- * over the tree returned by purple_get_blist.
+ * over the tree returned by purple_blist_get_buddy_list.
  *
  * @param node		A node.
  * @param offline	Whether to include nodes for offline accounts
diff --git a/libpurple/buddylist.c b/libpurple/buddylist.c
--- a/libpurple/buddylist.c
+++ b/libpurple/buddylist.c
@@ -699,7 +699,7 @@ purple_blist_boot(void)
 }
 
 PurpleBuddyList *
-purple_get_blist()
+purple_blist_get_buddy_list()
 {
 	return purplebuddylist;
 }
diff --git a/libpurple/buddylist.h b/libpurple/buddylist.h
--- a/libpurple/buddylist.h
+++ b/libpurple/buddylist.h
@@ -133,7 +133,7 @@ GType purple_buddy_list_get_type(void);
  *
  * @return The main buddy list.
  */
-PurpleBuddyList *purple_get_blist(void);
+PurpleBuddyList *purple_blist_get_buddy_list(void);
 
 /**
  * Returns the root node of the main buddy list.
diff --git a/libpurple/plugins/perl/common/BuddyList.xs b/libpurple/plugins/perl/common/BuddyList.xs
--- a/libpurple/plugins/perl/common/BuddyList.xs
+++ b/libpurple/plugins/perl/common/BuddyList.xs
@@ -14,7 +14,7 @@ MODULE = Purple::BuddyList  PACKAGE = Pu
 PROTOTYPES: ENABLE
 
 Purple::BuddyList
-purple_get_blist()
+purple_blist_get_buddy_list()
 
 MODULE = Purple::BuddyList  PACKAGE = Purple::Find  PREFIX = purple_find_
 PROTOTYPES: ENABLE
diff --git a/libpurple/protocols/sametime/sametime.c b/libpurple/protocols/sametime/sametime.c
--- a/libpurple/protocols/sametime/sametime.c
+++ b/libpurple/protocols/sametime/sametime.c
@@ -912,7 +912,7 @@ static PurpleGroup *group_ensure(PurpleC
   acct = purple_connection_get_account(gc);
   owner = purple_account_get_username(acct);
 
-  blist = purple_get_blist();
+  blist = purple_blist_get_buddy_list();
   g_return_val_if_fail(blist != NULL, NULL);
 
   name = mwSametimeGroup_getName(stgroup);
@@ -1145,7 +1145,7 @@ static void blist_sync(PurpleConnection 
 
   acct_n = purple_account_get_username(acct);
 
-  blist = purple_get_blist();
+  blist = purple_blist_get_buddy_list();
   g_return_if_fail(blist != NULL);
 
   /* build a hash table for quick lookup while pruning the local
diff --git a/libpurple/status.c b/libpurple/status.c
--- a/libpurple/status.c
+++ b/libpurple/status.c
@@ -1243,7 +1243,7 @@ update_buddy_idle(PurpleBuddy *buddy, Pu
 	 */
 
 	if (ops != NULL && ops->update != NULL)
-		ops->update(purple_get_blist(), (PurpleBListNode *)buddy);
+		ops->update(purple_blist_get_buddy_list(), (PurpleBListNode *)buddy);
 }
 
 void
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -203,7 +203,7 @@ static gboolean gtk_blist_visibility_cb(
 		old_state != GDK_VISIBILITY_FULLY_OBSCURED) {
 
 		/* no longer fully obscured */
-		pidgin_blist_refresh_timer(purple_get_blist());
+		pidgin_blist_refresh_timer(purple_blist_get_buddy_list());
 	}
 
 	/* continue to handle event normally */
@@ -217,7 +217,7 @@ static gboolean gtk_blist_window_state_c
 			purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/blist/list_visible", FALSE);
 		else {
 			purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/blist/list_visible", TRUE);
-			pidgin_blist_refresh_timer(purple_get_blist());
+			pidgin_blist_refresh_timer(purple_blist_get_buddy_list());
 		}
 	}
 
@@ -231,7 +231,7 @@ static gboolean gtk_blist_window_state_c
 	/* Refresh gtkblist if un-iconifying */
 	if (event->changed_mask & GDK_WINDOW_STATE_ICONIFIED){
 		if (!(event->new_window_state & GDK_WINDOW_STATE_ICONIFIED))
-			pidgin_blist_refresh_timer(purple_get_blist());
+			pidgin_blist_refresh_timer(purple_blist_get_buddy_list());
 	}
 
 	return FALSE;
@@ -801,7 +801,7 @@ static void gtk_blist_menu_showoffline_c
 	{
 		purple_blist_node_set_bool(node, "show_offline",
 		                           !purple_blist_node_get_bool(node, "show_offline"));
-		pidgin_blist_update(purple_get_blist(), node);
+		pidgin_blist_update(purple_blist_get_buddy_list(), node);
 	}
 	else if (PURPLE_IS_CONTACT(node))
 	{
@@ -814,7 +814,7 @@ static void gtk_blist_menu_showoffline_c
 		     bnode = purple_blist_node_get_sibling_next(bnode))
 		{
 			purple_blist_node_set_bool(bnode, "show_offline", setting);
-			pidgin_blist_update(purple_get_blist(), bnode);
+			pidgin_blist_update(purple_blist_get_buddy_list(), bnode);
 		}
 	} else if (PURPLE_IS_GROUP(node)) {
 		PurpleBListNode *cnode, *bnode;
@@ -831,7 +831,7 @@ static void gtk_blist_menu_showoffline_c
 			     bnode = purple_blist_node_get_sibling_next(bnode))
 			{
 				purple_blist_node_set_bool(bnode, "show_offline", setting);
-				pidgin_blist_update(purple_get_blist(), bnode);
+				pidgin_blist_update(purple_blist_get_buddy_list(), bnode);
 			}
 		}
 	}
@@ -959,7 +959,7 @@ pidgin_blist_update_privacy_cb(PurpleBud
 	struct _pidgin_blist_node *ui_data = purple_blist_node_get_ui_data(PURPLE_BLIST_NODE(buddy));
 	if (ui_data == NULL || ui_data->row == NULL)
 		return;
-	pidgin_blist_update_buddy(purple_get_blist(), PURPLE_BLIST_NODE(buddy), TRUE);
+	pidgin_blist_update_buddy(purple_blist_get_buddy_list(), PURPLE_BLIST_NODE(buddy), TRUE);
 }
 
 static gboolean
@@ -1010,7 +1010,7 @@ make_blist_request_dialog(PidginBlistReq
 	img = gtk_image_new_from_stock(PIDGIN_STOCK_DIALOG_QUESTION,
 		gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_HUGE));
 
-	gtkblist = PIDGIN_BLIST(purple_get_blist());
+	gtkblist = PIDGIN_BLIST(purple_blist_get_buddy_list());
 	blist_window = gtkblist ? GTK_WINDOW(gtkblist->window) : NULL;
 
 	data->window = gtk_dialog_new();
@@ -1424,7 +1424,7 @@ toggle_privacy(GtkWidget *widget, Purple
 	else
 		purple_account_privacy_allow(account, name);
 
-	pidgin_blist_update(purple_get_blist(), node);
+	pidgin_blist_update(purple_blist_get_buddy_list(), node);
 }
 
 void pidgin_append_blist_node_privacy_menu(GtkWidget *menu, PurpleBListNode *node)
@@ -4845,7 +4845,7 @@ written_msg_update_ui_cb(PurpleAccount *
 		ui->conv.flags |= PIDGIN_BLIST_CHAT_HAS_PENDING_MESSAGE_WITH_NICK;
 
 	ui->conv.last_message = time(NULL);    /* XXX: for lack of better data */
-	pidgin_blist_update(purple_get_blist(), node);
+	pidgin_blist_update(purple_blist_get_buddy_list(), node);
 }
 
 static void
@@ -4856,7 +4856,7 @@ displayed_msg_update_ui_cb(PidginConvers
 		return;
 	ui->conv.flags &= ~(PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE |
 	                    PIDGIN_BLIST_CHAT_HAS_PENDING_MESSAGE_WITH_NICK);
-	pidgin_blist_update(purple_get_blist(), node);
+	pidgin_blist_update(purple_blist_get_buddy_list(), node);
 }
 
 static void
@@ -4973,7 +4973,7 @@ static void _prefs_change_redo_list(cons
 		gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &node, -1);
 	}
 
-	redo_buddy_list(purple_get_blist(), FALSE, FALSE);
+	redo_buddy_list(purple_blist_get_buddy_list(), FALSE, FALSE);
 	gtk_tree_view_columns_autosize(GTK_TREE_VIEW(gtkblist->treeview));
 
 	if (node)
@@ -6368,8 +6368,8 @@ pidgin_blist_update_refresh_timeout()
 	PurpleBuddyList *blist;
 	PidginBuddyList *gtkblist;



More information about the Commits mailing list