[gnome-contacts] Add "Add to My Contacts" button.
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Add "Add to My Contacts" button.
- Date: Thu, 16 Feb 2012 13:19:56 +0000 (UTC)
commit 2ae7f2f566bf7c68115d671da9a8ed09a4e00fc8
Author: Alexander Larsson <alexl redhat com>
Date: Thu Feb 16 14:18:41 2012 +0100
Add "Add to My Contacts" button.
src/contacts-contact-pane.vala | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index d670fee..71ae710 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -1301,7 +1301,17 @@ public class Contacts.PersonaSheet : Grid {
grid.add (image);
}
- if (pane.contact.individual.personas.size > 1) {
+ if (sheet_nr == 0) {
+ var b = new Button.with_label(_("Add to My Contacts"));
+ grid.add (b);
+
+ b.clicked.connect ( () => {
+ link_contacts.begin (pane.contact, null, (obj, result) => {
+ link_contacts.end (result);
+ /* TODO: Support undo */
+ });
+ });
+ } else if (pane.contact.individual.personas.size > 1) {
var b = new Button.with_label(_("Unlink"));
grid.add (b);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]