Ejemplo n.º 1
0
static void
cinnamon_contact_system_constructed (GObject *obj)
{
  CinnamonContactSystem *self = CINNAMON_CONTACT_SYSTEM (obj);

  G_OBJECT_CLASS (cinnamon_contact_system_parent_class)->constructed (obj);

  /* We intentionally do not care about the "individuals-changed" signal, as
   * we don't intend to update searches after they've been performed.
   * Therefore, we will simply retrieve the "individuals" property which
   * represents a snapshot of the individuals in the aggregator.
   */
  self->priv->aggregator = folks_individual_aggregator_new ();
  folks_individual_aggregator_prepare (self->priv->aggregator, prepare_individual_aggregator_cb, NULL);
}
static void
empathy_individual_manager_init (EmpathyIndividualManager *self)
{
  EmpathyIndividualManagerPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
      EMPATHY_TYPE_INDIVIDUAL_MANAGER, EmpathyIndividualManagerPriv);

  self->priv = priv;
  priv->individuals = g_hash_table_new_full (g_str_hash, g_str_equal,
      g_free, g_object_unref);

  priv->aggregator = folks_individual_aggregator_new ();
  g_signal_connect (priv->aggregator, "individuals-changed-detailed",
      G_CALLBACK (aggregator_individuals_changed_cb), self);
  g_signal_connect (priv->aggregator, "notify::is-quiescent",
      G_CALLBACK (aggregator_is_quiescent_notify_cb), self);
  folks_individual_aggregator_prepare (priv->aggregator, NULL, NULL);
}