ekiga r6474 - trunk/src/endpoints



Author: jpuydt
Date: Sun Jul 20 14:01:10 2008
New Revision: 6474
URL: http://svn.gnome.org/viewvc/ekiga?rev=6474&view=rev

Log:
Added our real name when sending a message (no more "FIXME(Self)")

Modified:
   trunk/src/endpoints/sip-chat-simple.cpp
   trunk/src/endpoints/sip-chat-simple.h

Modified: trunk/src/endpoints/sip-chat-simple.cpp
==============================================================================
--- trunk/src/endpoints/sip-chat-simple.cpp	(original)
+++ trunk/src/endpoints/sip-chat-simple.cpp	Sun Jul 20 14:01:10 2008
@@ -37,11 +37,13 @@
 
 #include "sip-chat-simple.h"
 
-SIP::SimpleChat::SimpleChat (Ekiga::ServiceCore& core,
+#include "personal-details.h"
+
+SIP::SimpleChat::SimpleChat (Ekiga::ServiceCore& core_,
 			     std::string name,
 			     std::string uri,
 			     sigc::slot<bool, std::string> sender_)
-  : sender(sender_)
+  : core(core_), sender(sender_)
 {
   presentity = new Presentity (core, name, uri);
 }
@@ -83,13 +85,16 @@
 SIP::SimpleChat::send_message (const std::string msg)
 {
   bool result;
+  Ekiga::PersonalDetails* personal = NULL;
 
+  personal
+    = dynamic_cast<Ekiga::PersonalDetails*>(core.get ("personal-details"));
   result = sender (msg);
   for (std::list<Ekiga::ChatObserver*>::iterator iter
 	 = observers.begin ();
        iter != observers.end ();
        ++iter)
-    (*iter)->message ("FIXME(Self)", msg);
+    (*iter)->message (personal->get_display_name (), msg);
   return result;
 }
 

Modified: trunk/src/endpoints/sip-chat-simple.h
==============================================================================
--- trunk/src/endpoints/sip-chat-simple.h	(original)
+++ trunk/src/endpoints/sip-chat-simple.h	Sun Jul 20 14:01:10 2008
@@ -73,6 +73,7 @@
 
   private:
 
+    Ekiga::ServiceCore& core;
     sigc::slot<bool, std::string> sender;
     std::list<Ekiga::ChatObserver*> observers;
     Presentity *presentity;



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