FIXES:
- Added set_alias to Buddy class.
- Updated get_buddies_online() from Account class to return a list of
Buddy classes instead of a tuple (name, alias).
Signed-off-by: Bruno Abinader <bruno.abinader@indt.org.br>
Acked-by: Ragner Magalhaes <ragner.magalhaes@indt.org.br>
git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1443
596f6dd7-e928-0410-a184-
9e12fd12cf7e
blist.purple_buddy_get_presence(c_buddy)):
name = <char *> blist.purple_buddy_get_name(c_buddy)
+ new_buddy = Buddy(name, self)
+
c_alias = <char *> blist.purple_buddy_get_alias_only(c_buddy)
- if c_alias == NULL:
- alias = None
- else:
- alias = c_alias
+ if c_alias:
+ new_buddy.set_alias(c_alias)
- buddies_list.append((name, alias))
+ buddies_list.append(new_buddy)
iter = iter.next
return buddies_list
else:
else:
return None
idle = property(__get_idle)
+
+ def set_alias(self, alias):
+ if self.__exists:
+ blist.purple_blist_alias_buddy(self._get_structure(), alias)
+ return True
+ else:
+ return False