[gnome-contacts] Spawn email client when clicking on emails



commit 6fddf3e6f06c4416195ac4f65933167f0c0ba8f5
Author: Alexander Larsson <alexl redhat com>
Date:   Wed May 18 21:59:25 2011 +0200

    Spawn email client when clicking on emails

 src/contacts-app.vala |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index 6523e63..bb5cf24 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -261,9 +261,27 @@ public class Contacts.App : Window {
 	if (p.parameters.contains ("type"))
 	  type = p.parameters["type"].iterator().get();
 	add_string_label (type, p.value, "mail-unread-symbolic", out row);
+	row.clickable.clicked.connect ( () => {
+	    try {
+	      Gtk.show_uri (null, "mailto:"; + Uri.escape_string (p.value, "@" , false), 0);
+	    } catch {
+	    }
+	  });
       }
       add_string_label ("Home", "test example com", "mail-unread-symbolic", out row);
+      row.clickable.clicked.connect ( () => {
+	  try {
+	    Gtk.show_uri (null, "mailto:"; + Uri.escape_string ("test example com", "@" , false), 0);
+	  } catch {
+	  }
+	});
       add_string_label ("Work", "lazy example com", "mail-unread-symbolic", out row);
+      row.clickable.clicked.connect ( () => {
+	  try {
+	    Gtk.show_uri (null, "mailto:"; + Uri.escape_string ("lazy example com", "@" , false), 0);
+	  } catch {
+	  }
+	});
     }
 
     var ims = contact.individual.im_addresses;



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