[ekiga] Removed name_from_uri_helper code from the main window



commit becb630d9ab9da23eb2c43f02be28037016a7b3c
Author: Julien Puydt <jpuydt free fr>
Date:   Wed Jun 19 07:38:50 2013 +0200

    Removed name_from_uri_helper code from the main window
    
    It was dead code anyway.

 lib/engine/gui/gtk-frontend/main_window.cpp |  106 ---------------------------
 1 files changed, 0 insertions(+), 106 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/main_window.cpp b/lib/engine/gui/gtk-frontend/main_window.cpp
index b11042f..6f4aa30 100644
--- a/lib/engine/gui/gtk-frontend/main_window.cpp
+++ b/lib/engine/gui/gtk-frontend/main_window.cpp
@@ -157,37 +157,6 @@ enum {
 
 /* Non-GUI functions */
 
-//FIXME Does not seem to be used anymore
-struct name_from_uri_helper
-{
-  name_from_uri_helper (boost::shared_ptr<Ekiga::PresenceCore> presence_core_,
-                       boost::shared_ptr<Ekiga::ContactCore> contact_core_):
-    presence_core (presence_core_), contact_core(contact_core_)
-  {}
-
-  const std::string search_name_for_uri (const std::string uri);
-
-private:
-
-  boost::shared_ptr<Ekiga::PresenceCore> presence_core;
-  boost::shared_ptr<Ekiga::ContactCore> contact_core;
-
-  bool on_visit_sources (Ekiga::SourcePtr source,
-                        const std::string uri);
-  bool on_visit_books (Ekiga::BookPtr book,
-                      const std::string uri);
-  bool on_visit_contacts (Ekiga::ContactPtr contact,
-                         const std::string uri);
-
-  bool on_visit_clusters (Ekiga::ClusterPtr cluster,
-                         const std::string uri);
-  bool on_visit_heaps (Ekiga::HeapPtr heap,
-                      const std::string uri);
-  bool on_visit_presentities (Ekiga::PresentityPtr presentity,
-                             const std::string uri);
-
-  std::set<std::string> possible_names;
-};
 
 /* This function is to be called whenever some core gets updated,
  * so we update the menu of the main possible actions
@@ -404,81 +373,6 @@ void on_some_core_updated (EkigaMainWindow* self)
   }
 }
 
-/* implementation of the name_from_uri_helper */
-const std::string
-name_from_uri_helper::search_name_for_uri (const std::string uri)
-{
-  std::string result;
-
-  possible_names.clear ();
-
-  contact_core->visit_sources (boost::bind (&name_from_uri_helper::on_visit_sources, this, _1, uri));
-  presence_core->visit_clusters (boost::bind (&name_from_uri_helper::on_visit_clusters, this, _1, uri));
-
-  if (possible_names.empty ())
-    result = _("Unknown");
-  else
-    result = *(possible_names.begin ()); // stupid, but should mostly work
-
-  return result;
-}
-
-bool
-name_from_uri_helper::on_visit_sources (Ekiga::SourcePtr source,
-                                       const std::string uri)
-{
-  source->visit_books (boost::bind (&name_from_uri_helper::on_visit_books, this, _1, uri));
-
-  return true;
-}
-
-bool
-name_from_uri_helper::on_visit_books (Ekiga::BookPtr book,
-                                     const std::string uri)
-{
-  book->visit_contacts (boost::bind (&name_from_uri_helper::on_visit_contacts, this, _1, uri));
-
-  return true;
-}
-
-bool
-name_from_uri_helper::on_visit_contacts (Ekiga::ContactPtr contact,
-                                        const std::string uri)
-{
-  if (contact->has_uri (uri))
-    possible_names.insert (contact->get_name ());
-
-  return true;
-}
-
-bool
-name_from_uri_helper::on_visit_clusters (Ekiga::ClusterPtr cluster,
-                                        const std::string uri)
-{
-  cluster->visit_heaps (boost::bind (&name_from_uri_helper::on_visit_heaps, this, _1, uri));
-
-  return true;
-}
-
-bool
-name_from_uri_helper::on_visit_heaps (Ekiga::HeapPtr heap,
-                                     const std::string uri)
-{
-  heap->visit_presentities (boost::bind (&name_from_uri_helper::on_visit_presentities, this, _1, uri));
-
-  return true;
-}
-
-bool
-name_from_uri_helper::on_visit_presentities (Ekiga::PresentityPtr presentity,
-                                            const std::string uri)
-{
-  if (presentity->has_uri (uri))
-    possible_names.insert (presentity->get_name ());
-
-  return true;
-}
-
 /*
  * Callbacks
  */


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