[ekiga/ds-gtk-application] LDAP: Ported plugin to the Actor framework.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga/ds-gtk-application] LDAP: Ported plugin to the Actor framework.
- Date: Sun, 30 Nov 2014 10:28:48 +0000 (UTC)
commit bbb5e8d4c90d024f2dff54d213f742ce4cfbff78
Author: Damien Sandras <dsandras seconix com>
Date: Sat Nov 29 12:16:53 2014 +0100
LDAP: Ported plugin to the Actor framework.
plugins/ldap/ldap-book.cpp | 8 ++++++++
plugins/ldap/ldap-source.cpp | 9 ++++++++-
plugins/ldap/ldap-source.h | 2 +-
3 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/plugins/ldap/ldap-book.cpp b/plugins/ldap/ldap-book.cpp
index c4aa704..2867a02 100644
--- a/plugins/ldap/ldap-book.cpp
+++ b/plugins/ldap/ldap-book.cpp
@@ -339,6 +339,14 @@ OPENLDAP::Book::Book (Ekiga::ServiceCore &_core,
I_am_an_ekiga_net_book = true;
else
I_am_an_ekiga_net_book = false;
+
+ /* Actor stuff */
+ add_action (Ekiga::ActionPtr (new Ekiga::Action ("edit-book", _("_Edit"),
+ boost::bind (&OPENLDAP::Book::edit, this))));
+ add_action (Ekiga::ActionPtr (new Ekiga::Action ("remove-book", _("_Remove"),
+ boost::bind (&OPENLDAP::Book::remove, this))));
+ add_action (Ekiga::ActionPtr (new Ekiga::Action ("refresh-book", _("_Refresh"),
+ boost::bind (&OPENLDAP::Book::refresh, this))));
}
OPENLDAP::Book::Book (Ekiga::ServiceCore &_core,
diff --git a/plugins/ldap/ldap-source.cpp b/plugins/ldap/ldap-source.cpp
index bf93ef7..c14f010 100644
--- a/plugins/ldap/ldap-source.cpp
+++ b/plugins/ldap/ldap-source.cpp
@@ -76,7 +76,7 @@ OPENLDAP::Source::Source (Ekiga::ServiceCore &_core):
&& xmlStrEqual (BAD_CAST "server", child->name))
add (child);
- }
+ }
else {
doc = boost::shared_ptr<xmlDoc> (xmlNewDoc (BAD_CAST "1.0"), xmlFreeDoc);
@@ -88,6 +88,13 @@ OPENLDAP::Source::Source (Ekiga::ServiceCore &_core):
if (should_add_ekiga_net_book)
new_ekiga_net_book ();
+
+ add_action (Ekiga::ActionPtr (new Ekiga::Action ("add-ldap-book", _("Add an LDAP Address Book"),
+ boost::bind (&OPENLDAP::Source::new_book, this))));
+ if (!has_ekiga_net_book ()) {
+ add_action (Ekiga::ActionPtr (new Ekiga::Action ("add-ekiga-book", _("Add the Ekiga.net Directory"),
+ boost::bind (&OPENLDAP::Source::new_ekiga_net_book,
this))));
+ }
}
OPENLDAP::Source::~Source ()
diff --git a/plugins/ldap/ldap-source.h b/plugins/ldap/ldap-source.h
index e59d883..a8e376b 100644
--- a/plugins/ldap/ldap-source.h
+++ b/plugins/ldap/ldap-source.h
@@ -89,7 +89,7 @@ namespace OPENLDAP
void save ();
void new_book ();
-
+
void new_ekiga_net_book ();
bool on_new_book_form_submitted (bool submitted,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]