ekiga r6526 - trunk/lib/engine/addressbook/evolution
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6526 - trunk/lib/engine/addressbook/evolution
- Date: Mon, 28 Jul 2008 05:26:44 +0000 (UTC)
Author: jpuydt
Date: Mon Jul 28 05:26:44 2008
New Revision: 6526
URL: http://svn.gnome.org/viewvc/ekiga?rev=6526&view=rev
Log:
Fixing bug #544957 : made Evolution::Contact confirm removals
Modified:
trunk/lib/engine/addressbook/evolution/evolution-contact.cpp
trunk/lib/engine/addressbook/evolution/evolution-contact.h
Modified: trunk/lib/engine/addressbook/evolution/evolution-contact.cpp
==============================================================================
--- trunk/lib/engine/addressbook/evolution/evolution-contact.cpp (original)
+++ trunk/lib/engine/addressbook/evolution/evolution-contact.cpp Mon Jul 28 05:26:44 2008
@@ -232,7 +232,7 @@
builder.add_separator ();
builder.add_action ("remove", _("_Remove"),
- sigc::mem_fun (this, &Evolution::Contact::remove));
+ sigc::mem_fun (this, &Evolution::Contact::remove_action));
builder.add_action ("edit", _("_Edit"),
sigc::mem_fun (this, &Evolution::Contact::edit_action));
populated = true;
@@ -382,3 +382,31 @@
std::cerr << "Invalid result form" << std::endl; // FIXME: do better
}
}
+
+void
+Evolution::Contact::remove_action ()
+{
+ Ekiga::FormRequestSimple request;
+
+ request.title (_("Remove contact"));
+
+ request.instructions (_("Please confirm you want that contact removed"));
+
+ request.submitted.connect (sigc::mem_fun (this,
+ &Evolution::Contact::on_remove_form_submitted));
+
+ if (!questions.handle_request (&request)) {
+
+ // FIXME: better error reporting
+#ifdef __GNUC__
+ std::cout << "Unhandled form request in "
+ << __PRETTY_FUNCTION__ << std::endl;
+#endif
+ }
+}
+
+void
+Evolution::Contact::on_remove_form_submitted (Ekiga::Form& /*result*/)
+{
+ remove ();
+}
Modified: trunk/lib/engine/addressbook/evolution/evolution-contact.h
==============================================================================
--- trunk/lib/engine/addressbook/evolution/evolution-contact.h (original)
+++ trunk/lib/engine/addressbook/evolution/evolution-contact.h Mon Jul 28 05:26:44 2008
@@ -105,6 +105,10 @@
void edit_action ();
void on_edit_form_submitted (Ekiga::Form &result);
+
+ void remove_action ();
+
+ void on_remove_form_submitted (Ekiga::Form &result);
};
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]