Ejemplo n.º 1
0
static void
on_heap_added (RosterViewGtk* self,
	       Ekiga::ClusterPtr cluster,
	       Ekiga::HeapPtr heap)
{
  on_heap_updated (self, cluster, heap);
  heap->visit_presentities (boost::bind (&visit_presentities, self, cluster, heap, _1));
}
Ejemplo n.º 2
0
static bool
visit_heaps (RosterViewGtk* self,
	     Ekiga::ClusterPtr cluster,
	     Ekiga::HeapPtr heap)
{
  on_heap_updated (self, cluster, heap);
  heap->visit_presentities (boost::bind (&visit_presentities, self, cluster, heap, _1));

  return true;
}
Ejemplo n.º 3
0
static void
heap_view_set_heap (HeapView* self,
		    Ekiga::HeapPtr heap)
{
  if (self->priv->heap) {

    for (std::vector<boost::signals::connection>::iterator iter
	   = self->priv->connections.begin ();
	 iter != self->priv->connections.end ();
	 iter++)
      iter->disconnect ();

    self->priv->connections.clear ();
  }

  if (heap) {

    boost::signals::connection conn;

    conn = heap->removed.connect (boost::bind (&on_heap_removed, self));
    self->priv->connections.push_back (conn);
    conn = heap->presentity_added.connect (boost::bind (&on_presentity_added, self, _1));
    self->priv->connections.push_back (conn);
    conn = heap->presentity_updated.connect (boost::bind (&on_presentity_updated, self, _1));
    self->priv->connections.push_back (conn);
    conn = heap->presentity_removed.connect (boost::bind (&on_presentity_removed, self, _1));
    self->priv->connections.push_back (conn);
    conn = heap->questions.connect (boost::bind (&on_questions, self, _1));
  }

  gtk_tree_store_clear (self->priv->store);
  self->priv->heap = heap;

  if (self->priv->heap)
    heap->visit_presentities (boost::bind (&visit_presentities, self, _1));
}