im.pidgin.pidgin: 7db299a688d667ea880a9c53135d09f84a27b43c

sadrul at pidgin.im sadrul at pidgin.im
Sat Jan 26 23:50:44 EST 2008


-----------------------------------------------------------------
Revision: 7db299a688d667ea880a9c53135d09f84a27b43c
Ancestor: 85f4bdbdd0d94a45b6fe65f5a5743ab8dffad8d8
Author: sadrul at pidgin.im
Date: 2008-01-27T04:12:46
Branch: im.pidgin.pidgin

Modified files:
        finch/gntblist.c finch/gntrequest.c

ChangeLog: 

Update finch to not touch the internals of PurpleGroup.

-------------- next part --------------
============================================================
--- finch/gntblist.c	b3a191d74d3ac494bc4328a298da5f9d8803b571
+++ finch/gntblist.c	2f8d823aa635f8b087af35de47c4270f9b1d6434
@@ -263,7 +263,7 @@ static gboolean default_create_tooltip(g
 						purple_blist_get_group_online_count(group),
 						purple_blist_get_group_size(group, FALSE));
 
-		title = g_strdup(group->name);
+		title = g_strdup(purple_group_get_name(group));
 	} else if (PURPLE_BLIST_NODE_IS_CHAT(node)) {
 		PurpleChat *chat = (PurpleChat *)node;
 		PurpleAccount *account = purple_chat_get_account(chat);
@@ -684,7 +684,7 @@ finch_request_add_chat(PurpleAccount *ac
 	field = purple_request_field_string_new("alias", _("Alias"), alias, FALSE);
 	purple_request_field_group_add_field(group, field);
 
-	field = purple_request_field_string_new("group", _("Group"), grp ? grp->name : NULL, FALSE);
+	field = purple_request_field_string_new("group", _("Group"), grp ? purple_group_get_name(grp) : NULL, FALSE);
 	purple_request_field_group_add_field(group, field);
 
 	field = purple_request_field_bool_new("autojoin", _("Auto-join"), FALSE);
@@ -824,7 +824,7 @@ get_display_name(PurpleBlistNode *node)
 		strncpy(status, "~", sizeof(status) - 1);
 	}
 	else if (PURPLE_BLIST_NODE_IS_GROUP(node))
-		return ((PurpleGroup*)node)->name;
+		return purple_group_get_name((PurpleGroup*)node);
 
 	snprintf(text, sizeof(text) - 1, "%s %s", status, name);
 
@@ -1102,7 +1102,7 @@ finch_add_buddy(PurpleBlistNode *selecte
 static void
 finch_add_buddy(PurpleBlistNode *selected, PurpleGroup *grp)
 {
-	purple_blist_request_add_buddy(NULL, NULL, grp ? grp->name : NULL, NULL);
+	purple_blist_request_add_buddy(NULL, NULL, grp ? purple_group_get_name(grp) : NULL, NULL);
 }
 
 static void
@@ -1266,7 +1266,7 @@ finch_blist_rename_node_cb(PurpleBlistNo
 	else if (PURPLE_BLIST_NODE_IS_CHAT(node))
 		name = purple_chat_get_name((PurpleChat*)node);
 	else if (PURPLE_BLIST_NODE_IS_GROUP(node))
-		name = ((PurpleGroup*)node)->name;
+		name = purple_group_get_name((PurpleGroup*)node);
 	else
 		g_return_if_reached();
 
@@ -1358,7 +1358,7 @@ finch_blist_remove_node_cb(PurpleBlistNo
 	} else if (PURPLE_BLIST_NODE_IS_CHAT(node)) {
 		name = purple_chat_get_name((PurpleChat*)node);
 	} else if (PURPLE_BLIST_NODE_IS_GROUP(node)) {
-		name = ((PurpleGroup*)node)->name;
+		name = purple_group_get_name((PurpleGroup*)node);
 		sec = _("Removing this group will also remove all the buddies in the group");
 	}
 	else
@@ -1517,7 +1517,7 @@ draw_context_menu(FinchBlist *ggblist)
 	} else if (PURPLE_BLIST_NODE_IS_GROUP(node)) {
 		PurpleGroup *group = (PurpleGroup *)node;
 		create_group_menu(GNT_MENU(context), group);
-		title = g_strdup(group->name);
+		title = g_strdup(purple_group_get_name(group));
 	}
 
 	append_extended_menu(GNT_MENU(context), node);
============================================================
--- finch/gntrequest.c	b2aeec31cbf7c512a8410c5f899e6f9a6b51edcd
+++ finch/gntrequest.c	3785304517b813f3587c989c2b411ba6d9c3d8aa
@@ -427,7 +427,7 @@ create_string_field(PurpleRequestField *
 		for (node = purple_blist_get_root(); node;
 				node = purple_blist_node_get_sibling_next(node)) {
 			if (PURPLE_BLIST_NODE_IS_GROUP(node))
-				gnt_entry_add_suggest(GNT_ENTRY(entry), ((PurpleGroup *)node)->name);
+				gnt_entry_add_suggest(GNT_ENTRY(entry), purple_group_get_name((PurpleGroup *)node));
 		}
 	}
 	return entry;


More information about the Commits mailing list