[gnome-contacts] Added unlink operation.
- From: Erick PÃrez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Added unlink operation.
- Date: Thu, 7 Feb 2013 13:09:26 +0000 (UTC)
commit 45d1f19d9afa892cdb29a37cfc9ac2780cef66ad
Author: Erick PÃrez Castellanos <erick red gmail com>
Date: Wed Jan 23 15:34:42 2013 -0500
Added unlink operation.
No undo yet.
src/contacts-linked-accounts-dialog.vala | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/contacts-linked-accounts-dialog.vala b/src/contacts-linked-accounts-dialog.vala
index 65431d2..5ae6d57 100644
--- a/src/contacts-linked-accounts-dialog.vala
+++ b/src/contacts-linked-accounts-dialog.vala
@@ -102,12 +102,28 @@ public class Contacts.LinkedAccountsDialog : Dialog {
button.get_child ().margin = 6;
row_grid.attach (button, 2, 0, 1, 2);
+ /* signal */
+ button.clicked.connect (() => {
+ unlink_persona.begin (contact, p, (obj, result) => {
+ unlink_persona.end (result);
+ var sep = row_grid.get_data<Widget> ("separator");
+ if (sep != null)
+ sep.destroy ();
+
+ row_grid.destroy ();
+ /* TODO: Support undo */
+ /* TODO: Ensure we don't get suggestion for this linkage again */
+ });
+ });
+
row_grid.show_all ();
linked_accounts_view.add (row_grid);
if (counter != personas.size - 1) {
- linked_accounts_view.add (new Separator (Orientation.HORIZONTAL));
+ var sep = new Separator (Orientation.HORIZONTAL);
+ linked_accounts_view.add (sep);
counter++;
+ row_grid.set_data ("separator", sep);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]