ekiga r7246 - trunk/lib/engine/components/resource-list
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7246 - trunk/lib/engine/components/resource-list
- Date: Thu, 16 Oct 2008 19:56:20 +0000 (UTC)
Author: jpuydt
Date: Thu Oct 16 19:56:20 2008
New Revision: 7246
URL: http://svn.gnome.org/viewvc/ekiga?rev=7246&view=rev
Log:
Re-added the publish method to RL::List
Modified:
trunk/lib/engine/components/resource-list/rl-list.cpp
trunk/lib/engine/components/resource-list/rl-list.h
Modified: trunk/lib/engine/components/resource-list/rl-list.cpp
==============================================================================
--- trunk/lib/engine/components/resource-list/rl-list.cpp (original)
+++ trunk/lib/engine/components/resource-list/rl-list.cpp Thu Oct 16 19:56:20 2008
@@ -91,6 +91,8 @@
/* make the world know what we have */
bool visit_presentities (sigc::slot<bool, Ekiga::Presentity&> visitor);
+ void publish () const;
+
sigc::signal<void, gmref_ptr<Entry> > entry_added;
sigc::signal<void, gmref_ptr<Entry> > entry_updated;
sigc::signal<void, gmref_ptr<Entry> > entry_removed;
@@ -117,7 +119,6 @@
impl->entry_added.connect (entry_added.make_slot ());
impl->entry_updated.connect (entry_updated.make_slot ());
impl->entry_removed.connect (entry_removed.make_slot ());
- impl->parse ();
}
RL::List::~List ()
@@ -157,6 +158,12 @@
return impl->visit_presentities (visitor);
}
+void
+RL::List::publish () const
+{
+ impl->publish ();
+}
+
/* implementation of the ListImpl class */
RL::ListImpl::ListImpl (Ekiga::ServiceCore& core_,
@@ -313,9 +320,12 @@
gmref_ptr<List> list = new List (core, path,
list_pos, display_name, child);
list->entry_added.connect (entry_added.make_slot ());
+ list->entry_updated.connect (entry_updated.make_slot ());
+ list->entry_removed.connect (entry_removed.make_slot ());
lists.push_back (list);
ordering.push_back (LIST);
list_pos++;
+ list->publish ();
continue;
}
@@ -331,6 +341,7 @@
entries.push_back (std::pair<gmref_ptr<Entry>, std::list<sigc::connection> > (entry, conns));
ordering.push_back (ENTRY);
entry_pos++;
+ entry_added.emit (entry);
continue;
}
}
@@ -391,3 +402,19 @@
return go_on;
}
+
+void
+RL::ListImpl::publish () const
+{
+ for (std::list<gmref_ptr<List> >::const_iterator iter = lists.begin ();
+ iter != lists.end ();
+ ++iter)
+ (*iter)->publish ();
+
+ for (std::list<std::pair<gmref_ptr<Entry>, std::list<sigc::connection> > >::const_iterator iter = entries.begin ();
+ iter != entries.end ();
+ ++iter) {
+
+ entry_added.emit (iter->first);
+ }
+}
Modified: trunk/lib/engine/components/resource-list/rl-list.h
==============================================================================
--- trunk/lib/engine/components/resource-list/rl-list.h (original)
+++ trunk/lib/engine/components/resource-list/rl-list.h Thu Oct 16 19:56:20 2008
@@ -72,6 +72,8 @@
/* make the world know what we have */
bool visit_presentities (sigc::slot<bool, Ekiga::Presentity&> visitor);
+ void publish () const;
+
sigc::signal<void, gmref_ptr<Entry> > entry_added;
sigc::signal<void, gmref_ptr<Entry> > entry_updated;
sigc::signal<void, gmref_ptr<Entry> > entry_removed;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]