ekiga r7144 - in trunk: . lib/engine/presence/avahi lib/engine/presence/local-roster lib/engine/presence/skel



Author: jpuydt
Date: Thu Oct  2 18:31:31 2008
New Revision: 7144
URL: http://svn.gnome.org/viewvc/ekiga?rev=7144&view=rev

Log:
Implemented a few populate_menu methods -- fixing #554693.

Modified:
   trunk/ChangeLog
   trunk/lib/engine/presence/avahi/avahi-cluster.cpp
   trunk/lib/engine/presence/local-roster/local-cluster.cpp
   trunk/lib/engine/presence/skel/presence-core.cpp

Modified: trunk/lib/engine/presence/avahi/avahi-cluster.cpp
==============================================================================
--- trunk/lib/engine/presence/avahi/avahi-cluster.cpp	(original)
+++ trunk/lib/engine/presence/avahi/avahi-cluster.cpp	Thu Oct  2 18:31:31 2008
@@ -64,6 +64,6 @@
 bool
 Avahi::Cluster::populate_menu (Ekiga::MenuBuilder &/*builder*/)
 {
-  /* FIXME */
+  /* nothing */
   return false;
 }

Modified: trunk/lib/engine/presence/local-roster/local-cluster.cpp
==============================================================================
--- trunk/lib/engine/presence/local-roster/local-cluster.cpp	(original)
+++ trunk/lib/engine/presence/local-roster/local-cluster.cpp	Thu Oct  2 18:31:31 2008
@@ -33,6 +33,8 @@
  *
  */
 
+#include "config.h"
+
 #include <iostream>
 
 #include "local-cluster.h"
@@ -73,10 +75,11 @@
 }
 
 bool
-Local::Cluster::populate_menu (Ekiga::MenuBuilder &)
+Local::Cluster::populate_menu (Ekiga::MenuBuilder& builder)
 {
-  // FIXME to implement
-  return false;
+  builder.add_action ("new", _("New contact"),
+		      sigc::bind (sigc::mem_fun (heap, &Local::Heap::new_presentity), "", ""));
+  return true;
 }
 
 void

Modified: trunk/lib/engine/presence/skel/presence-core.cpp
==============================================================================
--- trunk/lib/engine/presence/skel/presence-core.cpp	(original)
+++ trunk/lib/engine/presence/skel/presence-core.cpp	Thu Oct  2 18:31:31 2008
@@ -80,10 +80,17 @@
 }
 
 bool
-Ekiga::PresenceCore::populate_menu (MenuBuilder &/*builder*/)
+Ekiga::PresenceCore::populate_menu (MenuBuilder &builder)
 {
-  // FIXME: to implement
-  return false;
+  bool populated = false;
+
+  for (std::set<Cluster*>::iterator iter = clusters.begin ();
+       iter != clusters.end ();
+       ++iter)
+    if ((*iter)->populate_menu (builder))
+      populated = true;
+
+  return populated;
 }
 
 void Ekiga::PresenceCore::on_heap_added (Heap &heap,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]