pidgin.next.minor: f46e478b: added purple_contact_get_group

grim at pidgin.im grim at pidgin.im
Thu Dec 10 21:40:42 EST 2009


-----------------------------------------------------------------
Revision: f46e478b6c05e410b7109249b847b7aea443654e
Ancestor: f7137c5c12c16d0b446b2c0d05c1965af2a07f37
Author: grim at pidgin.im
Date: 2009-12-11T01:32:16
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/f46e478b6c05e410b7109249b847b7aea443654e

Modified files:
        libpurple/blist.c libpurple/blist.h

ChangeLog: 

added purple_contact_get_group


-------------- next part --------------
============================================================
--- libpurple/blist.c	af4739e3276f44b86a33f507af0ba790a3a9637d
+++ libpurple/blist.c	2ca4596c2ca7f986298bd6037d31425976a2a5b2
@@ -1739,6 +1739,14 @@ purple_contact_destroy(PurpleContact *co
 	g_free(contact);
 }
 
+PurpleGroup *
+purple_contact_get_group(const PurpleContact *contact)
+{
+	g_return_val_if_fail(contact, NULL);
+
+	return (PurpleGroup *)(((PurpleBlistNode *)contact)->parent);
+}
+
 void purple_contact_set_alias(PurpleContact *contact, const char *alias)
 {
 	purple_blist_alias_contact(contact,alias);
============================================================
--- libpurple/blist.h	b405a5f51051fcfd06ebc9c6c628eac14a615748
+++ libpurple/blist.h	8a1cb3e38b767107811af6ea4cf78abb0a1b64f0
@@ -735,6 +735,16 @@ void purple_contact_destroy(PurpleContac
 void purple_contact_destroy(PurpleContact *contact);
 
 /**
+ * Gets the PurpleGroup from a PurpleContact
+ *
+ * @param contact  The contact
+ * @return         The group
+ *
+ * @since 2.7.0
+ */
+PurpleGroup *purple_contact_get_group(const PurpleContact *contact);
+
+/**
  * Adds a new contact to the buddy list.
  *
  * The new contact will be inserted after insert or prepended to the list if


More information about the Commits mailing list