individuals.prepend (individual);
});
+ /* For each of the individuals constructed from the newly added personas,
+ * if they don't exist in the aggregator's list of member individuals,
+ * add them to it. */
GLib.List<Individual> new_individuals = null;
foreach (var i in individuals)
{
}
}
+ /* Signal the addition of new individuals to the aggregator */
if (new_individuals != null)
{
new_individuals.reverse ();
{
get { return this._groups; }
+ /* Propagate the list of new groups to every Persona in the individual
+ * which implements the Groups interface */
set
{
this._personas.foreach ((p) =>
set
{
+ /* Disconnect from all our previous personas */
this._personas.foreach ((p) =>
{
var persona = (Persona) p;
if (this.id == null && this._personas.data != null)
this.id = this._personas.data.iid;
+ /* Connect to all the new personas */
this._personas.foreach ((p) =>
{
var persona = (Persona) p;
groups.group_changed.connect (this.persona_group_changed_cb);
});
+ /* Update our aggregated fields and notify the changes */
this.update_fields ();
}
}
private void update_fields ()
{
- /* gather the first occurence of each field */
+ /* gather the first occurrence of each field */
string alias = null;
var caps = CapabilitiesFlags.NONE;
this._personas.foreach ((persona) =>
{
var new_groups = new HashTable<string, bool> (str_hash, str_equal);
- /* this._groups is null when during initial construction */
+ /* this._groups is null during initial construction */
if (this._groups == null)
this._groups = new HashTable<string, bool> (str_hash, str_equal);
{
var presence_message = "";
var presence_type = Folks.PresenceType.UNSET;
+
+ /* Choose the most available presence from our personas */
this._personas.foreach ((p) =>
{
var persona = (Persona) p;