/soc/2013/ankitkv/gobjectification: 764a33b41ac7: Renamed blist ...

Ankit Vani a at nevitus.org
Sat Jul 27 05:24:27 EDT 2013


Changeset: 764a33b41ac7aed3b4f804ac869a450255665c97
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-07-27 14:54 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/764a33b41ac7

Description:

Renamed blist node's dont_save to transient.
* Renamed purple_blist_node_set_dont_save() to purple_blist_node_set_transient()
* Renamed purple_blist_node_get_dont_save() to purple_blist_node_is_transient()

diffstat:

 libpurple/blistnode.c                      |  14 +++++++-------
 libpurple/blistnode.h                      |   6 +++---
 libpurple/buddylist.c                      |   6 +++---
 libpurple/plugins/autoaccept.c             |   2 +-
 libpurple/plugins/buddynote.c              |   2 +-
 libpurple/plugins/perl/common/BuddyList.xs |   6 +++---
 libpurple/protocols/bonjour/bonjour.c      |   6 +++---
 libpurple/protocols/bonjour/buddy.c        |   4 ++--
 libpurple/protocols/sametime/sametime.c    |   2 +-
 pidgin/gtkblist.c                          |   4 ++--
 pidgin/gtkconv.c                           |   4 ++--
 11 files changed, 28 insertions(+), 28 deletions(-)

diffs (248 lines):

diff --git a/libpurple/blistnode.c b/libpurple/blistnode.c
--- a/libpurple/blistnode.c
+++ b/libpurple/blistnode.c
@@ -38,7 +38,7 @@ typedef struct _PurpleCountingNodePrivat
 /** Private data of a buddy list node */
 struct _PurpleBlistNodePrivate {
 	GHashTable *settings;  /**< per-node settings                            */
-	gboolean dont_save;    /**< node should not be saved with the buddy list */
+	gboolean transient;    /**< node should not be saved with the buddy list */
 };
 
 /* Blist node property enums */
@@ -155,23 +155,23 @@ void purple_blist_node_remove_setting(Pu
 }
 
 void
-purple_blist_node_set_dont_save(PurpleBlistNode *node, gboolean dont_save)
+purple_blist_node_set_transient(PurpleBlistNode *node, gboolean transient)
 {
 	PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node);
 
 	g_return_if_fail(priv != NULL);
 
-	priv->dont_save = dont_save;
+	priv->transient = transient;
 }
 
 gboolean
-purple_blist_node_get_dont_save(PurpleBlistNode *node)
+purple_blist_node_is_transient(PurpleBlistNode *node)
 {
 	PurpleBlistNodePrivate *priv = PURPLE_BLIST_NODE_GET_PRIVATE(node);
 
 	g_return_val_if_fail(priv != NULL, 0);
 
-	return priv->dont_save;
+	return priv->transient;
 }
 
 GHashTable *
@@ -348,7 +348,7 @@ purple_blist_node_set_property(GObject *
 
 	switch (param_id) {
 		case BLNODE_PROP_DONT_SAVE:
-			purple_blist_node_set_dont_save(node, g_value_get_boolean(value));
+			purple_blist_node_set_transient(node, g_value_get_boolean(value));
 			break;
 		default:
 			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
@@ -365,7 +365,7 @@ purple_blist_node_get_property(GObject *
 
 	switch (param_id) {
 		case BLNODE_PROP_DONT_SAVE:
-			g_value_set_boolean(value, purple_blist_node_get_dont_save(node));
+			g_value_set_boolean(value, purple_blist_node_is_transient(node));
 			break;
 		default:
 			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
diff --git a/libpurple/blistnode.h b/libpurple/blistnode.h
--- a/libpurple/blistnode.h
+++ b/libpurple/blistnode.h
@@ -297,10 +297,10 @@ void purple_blist_node_remove_setting(Pu
  * Sets whether the node should be saved with the buddy list or not
  *
  * @param node  The node
- * @param dont_save TRUE if the node should NOT be saved, FALSE if node should
+ * @param transient TRUE if the node should NOT be saved, FALSE if node should
  *                  be saved
  */
-void purple_blist_node_set_dont_save(PurpleBlistNode *node, gboolean dont_save);
+void purple_blist_node_set_transient(PurpleBlistNode *node, gboolean transient);
 
 /**
  * Gets whether the node should be saved with the buddy list or not
@@ -309,7 +309,7 @@ void purple_blist_node_set_dont_save(Pur
  *
  * @return TRUE if the node should NOT be saved, FALSE if node should be saved
  */
-gboolean purple_blist_node_get_dont_save(PurpleBlistNode *node);
+gboolean purple_blist_node_is_transient(PurpleBlistNode *node);
 
 /*@}*/
 
diff --git a/libpurple/buddylist.c b/libpurple/buddylist.c
--- a/libpurple/buddylist.c
+++ b/libpurple/buddylist.c
@@ -233,7 +233,7 @@ contact_to_xmlnode(PurpleContact *contac
 	/* Write buddies */
 	for (bnode = PURPLE_BLIST_NODE(contact)->child; bnode != NULL; bnode = bnode->next)
 	{
-		if (purple_blist_node_get_dont_save(bnode))
+		if (purple_blist_node_is_transient(bnode))
 			continue;
 		if (PURPLE_IS_BUDDY(bnode))
 		{
@@ -297,7 +297,7 @@ group_to_xmlnode(PurpleGroup *group)
 	/* Write contacts and chats */
 	for (cnode = PURPLE_BLIST_NODE(group)->child; cnode != NULL; cnode = cnode->next)
 	{
-		if (purple_blist_node_get_dont_save(cnode))
+		if (purple_blist_node_is_transient(cnode))
 			continue;
 		if (PURPLE_IS_CONTACT(cnode))
 		{
@@ -356,7 +356,7 @@ blist_to_xmlnode(void)
 	child = xmlnode_new_child(node, "blist");
 	for (gnode = purplebuddylist->root; gnode != NULL; gnode = gnode->next)
 	{
-		if (purple_blist_node_get_dont_save(gnode))
+		if (purple_blist_node_is_transient(gnode))
 			continue;
 		if (PURPLE_IS_GROUP(gnode))
 		{
diff --git a/libpurple/plugins/autoaccept.c b/libpurple/plugins/autoaccept.c
--- a/libpurple/plugins/autoaccept.c
+++ b/libpurple/plugins/autoaccept.c
@@ -219,7 +219,7 @@ context_menu(PurpleBlistNode *node, GLis
 	PurpleMenuAction *action;
 
 	if (!PURPLE_IS_BUDDY(node) && !PURPLE_IS_CONTACT(node) &&
-		!purple_blist_node_get_dont_save(node))
+		!purple_blist_node_is_transient(node))
 		return;
 
 	action = purple_menu_action_new(_("Autoaccept File Transfers..."),
diff --git a/libpurple/plugins/buddynote.c b/libpurple/plugins/buddynote.c
--- a/libpurple/plugins/buddynote.c
+++ b/libpurple/plugins/buddynote.c
@@ -58,7 +58,7 @@ buddynote_extended_menu_cb(PurpleBlistNo
 {
 	PurpleMenuAction *bna = NULL;
 
-	if (purple_blist_node_get_dont_save(node))
+	if (purple_blist_node_is_transient(node))
 		return;
 
 	*m = g_list_append(*m, bna);
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
@@ -224,12 +224,12 @@ purple_blist_node_get_string(node, key)
 	const char * key
 
 void
-purple_blist_node_set_dont_save(node, dont_save)
+purple_blist_node_set_transient(node, transient)
 	Purple::BuddyList::Node node
-	gboolean dont_save
+	gboolean transient
 
 gboolean
-purple_blist_node_get_dont_save(node);
+purple_blist_node_is_transient(node);
 	Purple::BuddyList::Node node
 
 void
diff --git a/libpurple/protocols/bonjour/bonjour.c b/libpurple/protocols/bonjour/bonjour.c
--- a/libpurple/protocols/bonjour/bonjour.c
+++ b/libpurple/protocols/bonjour/bonjour.c
@@ -428,10 +428,10 @@ bonjour_do_group_change(PurpleBuddy *bud
 
 	/* If we're moving them out of the bonjour group, make them persistent */
 	if (purple_strequal(new_group, BONJOUR_GROUP_NAME))
-		purple_blist_node_set_dont_save(PURPLE_BLIST_NODE(buddy), TRUE);
+		purple_blist_node_set_transient(PURPLE_BLIST_NODE(buddy), TRUE);
 	else
-		purple_blist_node_set_dont_save(PURPLE_BLIST_NODE(buddy),
-				!purple_blist_node_get_dont_save(PURPLE_BLIST_NODE(buddy)));
+		purple_blist_node_set_transient(PURPLE_BLIST_NODE(buddy),
+				!purple_blist_node_is_transient(PURPLE_BLIST_NODE(buddy)));
 
 }
 
diff --git a/libpurple/protocols/bonjour/buddy.c b/libpurple/protocols/bonjour/buddy.c
--- a/libpurple/protocols/bonjour/buddy.c
+++ b/libpurple/protocols/bonjour/buddy.c
@@ -153,7 +153,7 @@ bonjour_buddy_add_to_purple(BonjourBuddy
 
 	if (buddy == NULL) {
 		buddy = purple_buddy_new(account, bonjour_buddy->name, NULL);
-		purple_blist_node_set_dont_save(PURPLE_BLIST_NODE(buddy), TRUE);
+		purple_blist_node_set_transient(PURPLE_BLIST_NODE(buddy), TRUE);
 		purple_blist_add_buddy(buddy, NULL, group, NULL);
 	}
 
@@ -207,7 +207,7 @@ bonjour_buddy_add_to_purple(BonjourBuddy
  * If the buddy is being saved, mark as offline, otherwise delete
  */
 void bonjour_buddy_signed_off(PurpleBuddy *pb) {
-	if (purple_blist_node_get_dont_save(PURPLE_BLIST_NODE(pb))) {
+	if (purple_blist_node_is_transient(PURPLE_BLIST_NODE(pb))) {
 		purple_account_remove_buddy(purple_buddy_get_account(pb), pb, NULL);
 		purple_blist_remove_buddy(pb);
 	} else {
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
@@ -718,7 +718,7 @@ static void blist_export(PurpleConnectio
 			  bn;
 			  bn = purple_blist_node_get_sibling_next(bn)) {
 	if(! PURPLE_IS_BUDDY(bn)) continue;
-	if(purple_blist_node_get_dont_save(bn)) continue;
+	if(purple_blist_node_is_transient(bn)) continue;
 
 	bdy = (PurpleBuddy *) bn;
 
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -1556,7 +1556,7 @@ pidgin_blist_make_buddy_menu(GtkWidget *
 				G_CALLBACK(gtk_blist_menu_showlog_cb), buddy, 0, 0, NULL);
 	}
 
-	if (!purple_blist_node_get_dont_save(node)) {
+	if (!purple_blist_node_is_transient(node)) {
 		gboolean show_offline = purple_blist_node_get_bool(node, "show_offline");
 		pidgin_new_item_from_stock(menu, show_offline ? _("Hide When Offline") : _("Show When Offline"),
 				NULL, G_CALLBACK(gtk_blist_menu_showoffline_cb), node, 0, 0, NULL);
@@ -1736,7 +1736,7 @@ create_group_menu (PurpleBlistNode *node
 				 G_CALLBACK(pidgin_blist_remove_cb), node, 0, 0, NULL);
 	pidgin_new_item_from_stock(menu, _("_Rename"), NULL,
 				 G_CALLBACK(gtk_blist_menu_alias_cb), node, 0, 0, NULL);
-	if (!purple_blist_node_get_dont_save(node)) {
+	if (!purple_blist_node_is_transient(node)) {
 		gboolean show_offline = purple_blist_node_get_bool(node, "show_offline");
 		pidgin_new_item_from_stock(menu, show_offline ? _("Hide When Offline") : _("Show When Offline"),
 				NULL, G_CALLBACK(gtk_blist_menu_showoffline_cb), node, 0, 0, NULL);
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -3285,7 +3285,7 @@ populate_menu_with_options(GtkWidget *me
 						g_strdup(purple_conversation_get_name(conv)));
 			}
 			chat = purple_chat_new(account, NULL, components);
-			purple_blist_node_set_dont_save((PurpleBlistNode *)chat, TRUE);
+			purple_blist_node_set_transient((PurpleBlistNode *)chat, TRUE);
 			g_object_set_data_full(G_OBJECT(gtkconv->webview), "transient_chat",
 					chat, (GDestroyNotify)purple_blist_remove_chat);
 		}
@@ -3299,7 +3299,7 @@ populate_menu_with_options(GtkWidget *me
 
 			if (!buddy) {
 				buddy = purple_buddy_new(account, purple_conversation_get_name(conv), NULL);
-				purple_blist_node_set_dont_save((PurpleBlistNode *)buddy, TRUE);
+				purple_blist_node_set_transient((PurpleBlistNode *)buddy, TRUE);
 				g_object_set_data_full(G_OBJECT(gtkconv->webview), "transient_buddy",
 						buddy, (GDestroyNotify)g_object_unref);
 			}



More information about the Commits mailing list