[ekiga] Made it possible to remove a loudmouth account



commit 813855b8d2101109f2f922079e0cce17cae9216a
Author: Julien Puydt <jpuydt gnome org>
Date:   Thu Jun 11 17:00:12 2009 +0200

    Made it possible to remove a loudmouth account

 .../components/loudmouth/loudmouth-account.cpp     |   14 ++++++++++++++
 .../components/loudmouth/loudmouth-account.h       |    2 ++
 2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/components/loudmouth/loudmouth-account.cpp b/lib/engine/components/loudmouth/loudmouth-account.cpp
index dbf9661..3b49ce2 100644
--- a/lib/engine/components/loudmouth/loudmouth-account.cpp
+++ b/lib/engine/components/loudmouth/loudmouth-account.cpp
@@ -316,6 +316,18 @@ LM::Account::on_edit_form_submitted (bool submitted,
     enable ();
 }
 
+void
+LM::Account::remove ()
+{
+  disable ();
+
+  xmlUnlinkNode (node);
+  xmlFreeNode (node);
+
+  trigger_saving.emit ();
+  removed.emit ();
+}
+
 bool
 LM::Account::populate_menu (Ekiga::MenuBuilder& builder)
 {
@@ -333,6 +345,8 @@ LM::Account::populate_menu (Ekiga::MenuBuilder& builder)
 
   builder.add_action ("edit", _("Edit"),
 		      sigc::mem_fun (this, &LM::Account::edit));
+  builder.add_action ("remove", _("_Remove"),
+		      sigc::mem_fun (this, &LM::Account::remove));
 
   return true;
 }
diff --git a/lib/engine/components/loudmouth/loudmouth-account.h b/lib/engine/components/loudmouth/loudmouth-account.h
index fb57258..2ccf122 100644
--- a/lib/engine/components/loudmouth/loudmouth-account.h
+++ b/lib/engine/components/loudmouth/loudmouth-account.h
@@ -84,6 +84,8 @@ namespace LM
     void on_edit_form_submitted (bool submitted,
 				 Ekiga::Form &result);
 
+    void remove ();
+
     gmref_ptr<Ekiga::PersonalDetails> details;
     gmref_ptr<Dialect> dialect;
     gmref_ptr<Cluster> cluster;



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