[ekiga] Action: ActionProvider should act on an Actor.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Action: ActionProvider should act on an Actor.
- Date: Mon, 5 Jan 2015 18:53:21 +0000 (UTC)
commit 1b88350b26c6c45196d45e55aa41b7f6869dc804
Author: Damien Sandras <dsandras seconix com>
Date: Mon Jan 5 19:51:14 2015 +0100
Action: ActionProvider should act on an Actor.
lib/engine/action/action-provider.cpp | 6 ++----
lib/engine/action/action-provider.h | 8 ++++----
.../components/call-history/history-contact.cpp | 4 ++--
lib/engine/components/opal/opal-call-manager.cpp | 12 ++----------
lib/engine/components/opal/opal-call-manager.h | 2 +-
plugins/evolution/evolution-contact.cpp | 2 +-
6 files changed, 12 insertions(+), 22 deletions(-)
---
diff --git a/lib/engine/action/action-provider.cpp b/lib/engine/action/action-provider.cpp
index c79a878..9a2ecaa 100644
--- a/lib/engine/action/action-provider.cpp
+++ b/lib/engine/action/action-provider.cpp
@@ -40,13 +40,11 @@
using namespace Ekiga;
void
-URIActionProviderStore::pull_actions (ActionStore & store,
+URIActionProviderStore::pull_actions (Actor & actor,
const std::string & name,
const std::string & uri)
{
- ActionStore provider_store;
for (URIActionProviderStore::iterator it = begin (); it != end (); it++) {
- (*it)->pull_actions (provider_store, name, uri);
- store.merge (provider_store);
+ (*it)->pull_actions (actor, name, uri);
}
}
diff --git a/lib/engine/action/action-provider.h b/lib/engine/action/action-provider.h
index 9aba843..648f903 100644
--- a/lib/engine/action/action-provider.h
+++ b/lib/engine/action/action-provider.h
@@ -42,7 +42,7 @@
#include "scoped-connections.h"
-#include "action.h"
+#include "actor.h"
namespace Ekiga {
@@ -57,14 +57,14 @@ namespace Ekiga {
class ActionProvider
{
public:
- virtual void pull_actions (ActionStore & /*store*/) {};
+ virtual void pull_actions (Actor & /*actor*/) {};
};
typedef boost::shared_ptr< ActionProvider > ActionProviderPtr;
class URIActionProvider : public ActionProvider
{
public:
- virtual void pull_actions (ActionStore & /*store*/,
+ virtual void pull_actions (Actor & /*actor*/,
const std::string & /*display_name*/,
const std::string & /*uri*/) = 0;
};
@@ -73,7 +73,7 @@ namespace Ekiga {
class URIActionProviderStore : public std::list< URIActionProviderPtr >
{
public:
- virtual void pull_actions (ActionStore & /*store*/,
+ virtual void pull_actions (Actor & /*actor*/,
const std::string & /*display_name*/,
const std::string & /*uri*/);
};
diff --git a/lib/engine/components/call-history/history-contact.cpp
b/lib/engine/components/call-history/history-contact.cpp
index c5a37f5..69dd8a4 100644
--- a/lib/engine/components/call-history/history-contact.cpp
+++ b/lib/engine/components/call-history/history-contact.cpp
@@ -110,7 +110,7 @@ History::Contact::Contact (boost::shared_ptr<Ekiga::ContactCore> _contact_core,
/* Pull actions */
boost::shared_ptr<Ekiga::ContactCore> ccore = contact_core.lock ();
if (ccore)
- ccore->pull_actions (actions, name, uri);
+ ccore->pull_actions (*this, name, uri);
}
@@ -150,7 +150,7 @@ History::Contact::Contact (boost::shared_ptr<Ekiga::ContactCore> _contact_core,
/* Pull actions */
boost::shared_ptr<Ekiga::ContactCore> ccore = contact_core.lock ();
if (ccore)
- ccore->pull_actions (actions, name, uri);
+ ccore->pull_actions (*this, name, uri);
}
History::Contact::~Contact ()
diff --git a/lib/engine/components/opal/opal-call-manager.cpp
b/lib/engine/components/opal/opal-call-manager.cpp
index 2d26dba..6f6ade1 100644
--- a/lib/engine/components/opal/opal-call-manager.cpp
+++ b/lib/engine/components/opal/opal-call-manager.cpp
@@ -229,21 +229,13 @@ CallManager::~CallManager ()
}
-void CallManager::pull_actions (Ekiga::ActionStore & store,
+void CallManager::pull_actions (Ekiga::Actor & actor,
const std::string & name,
const std::string & uri)
{
if (is_supported_uri (uri)) {
- Ekiga::ActionPtr c (new Ekiga::Action ("call", _("Call"), boost::bind (&CallManager::dial, this, uri)));
- Ekiga::ActionPtr t (new Ekiga::Action ("transfer", _("Transfer"), boost::bind (&CallManager::transfer,
this, uri, false)));
- t->disable ();
-
- store.push_back (c);
- store.push_back (t);
-
-// store.push_back (Ekiga::ActionPtr (new Ekiga::Action ("message", _("Message"),
- // boost::bind (&CallManager::message, this, name,
uri))));
+ actor.add_action (Ekiga::ActionPtr (new Ekiga::Action ("call", _("Call"), boost::bind
(&CallManager::dial, this, uri))));
}
}
diff --git a/lib/engine/components/opal/opal-call-manager.h b/lib/engine/components/opal/opal-call-manager.h
index 7cd3aad..05238c8 100644
--- a/lib/engine/components/opal/opal-call-manager.h
+++ b/lib/engine/components/opal/opal-call-manager.h
@@ -86,7 +86,7 @@ public:
~CallManager ();
/* URIActionProvider stuff */
- void pull_actions (Ekiga::ActionStore & store,
+ void pull_actions (Ekiga::Actor & actor,
const std::string & name,
const std::string & uri);
diff --git a/plugins/evolution/evolution-contact.cpp b/plugins/evolution/evolution-contact.cpp
index 69a0f7f..b368df3 100644
--- a/plugins/evolution/evolution-contact.cpp
+++ b/plugins/evolution/evolution-contact.cpp
@@ -78,7 +78,7 @@ Evolution::Contact::Contact (Ekiga::ServiceCore &_services,
std::string attr_value = get_attribute_value (attr_type);
if (!attr_value.empty ()) {
- core->pull_actions (actions, get_name (), attr_value);
+ core->pull_actions (*this, get_name (), attr_value);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]