[ekiga/ds-gtk-application] Call Core: Made code easier to read.



commit a41f1d3832bd47c68a3755ed422dfa7953f56d31
Author: Damien Sandras <dsandras beip be>
Date:   Sat Mar 29 16:19:01 2014 +0100

    Call Core: Made code easier to read.

 lib/engine/protocol/call-core.cpp |   33 +++++++++++++--------------------
 1 files changed, 13 insertions(+), 20 deletions(-)
---
diff --git a/lib/engine/protocol/call-core.cpp b/lib/engine/protocol/call-core.cpp
index 2095a05..6f68b00 100644
--- a/lib/engine/protocol/call-core.cpp
+++ b/lib/engine/protocol/call-core.cpp
@@ -152,25 +152,18 @@ bool CallCore::is_supported_uri (const std::string & uri)
 void CallCore::register_actions (boost::shared_ptr<ContactCore> _contact_core)
 {
   contact_core = _contact_core;
-  contact_core->add_action (ActionPtr (
-                              new ContactAction ("call", _("Call"),
-                                                 boost::bind (&CallCore::dial,
-                                                              this, _2),
-                                                 boost::bind (&CallCore::is_supported_uri,
-                                                              this, _2))));
-
-  contact_core->add_action (ActionPtr (
-                              new ContactAction ("transfer", _("Transfer"),
-                                                 boost::bind (&CallCore::transfer,
-                                                              this, _2, false),
-                                                 boost::bind (&CallCore::is_supported_uri,
-                                                              this, _2))));
-  contact_core->add_action (ActionPtr (
-                              new ContactAction ("message", _("Message"),
-                                                 boost::bind (&CallCore::message,
-                                                              this, _1, _2),
-                                                 boost::bind (&CallCore::is_supported_uri,
-                                                              this, _2))));
+  ActionPtr call (new ContactAction ("call", _("Call"),
+                                     boost::bind (&CallCore::dial, this, _2),
+                                     boost::bind (&CallCore::is_supported_uri, this, _2)));
+  ActionPtr xfer (new ContactAction ("transfer", _("Transfer"),
+                                     boost::bind (&CallCore::transfer, this, _2, false),
+                                     boost::bind (&CallCore::is_supported_uri, this, _2)));
+  ActionPtr msg (new ContactAction ("message", _("Message"),
+                                    boost::bind (&CallCore::message, this, _1, _2),
+                                    boost::bind (&CallCore::is_supported_uri, this, _2)));
+  contact_core->add_action (call);
+  contact_core->add_action (xfer);
+  contact_core->add_action (msg);
 }
 
 
@@ -232,7 +225,7 @@ void CallCore::on_missed_call (boost::shared_ptr<Call> call, boost::shared_ptr<C
 
 void CallCore::on_cleared_call (std::string reason, boost::shared_ptr<Call> call, 
boost::shared_ptr<CallManager> manager)
 {
-  cleared_call (manager, call, reason); 
+  cleared_call (manager, call, reason);
 }
 
 


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