[gnome-contacts] Change Address Book dialog: add Cancel button



commit 55cd0e90029430b1dd3d12ba8bf309a5fb7a08b2
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Thu Aug 15 21:51:18 2013 -0400

    Change Address Book dialog: add Cancel button

 src/contacts-app.vala |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index 39ee1f8..a2836ee 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -114,6 +114,15 @@ public class Contacts.App : Gtk.Application {
 
     var header = new HeaderBar ();
     header.set_title (_("Primary Contacts Account"));
+    var cancel_button = new Button.with_label (_("Cancel"));
+    cancel_button.get_child ().margin = 3;
+    cancel_button.get_child ().margin_left = 6;
+    cancel_button.get_child ().margin_right = 6;
+    cancel_button.clicked.connect (() => {
+       dialog.response (ResponseType.CANCEL);
+      });
+    header.pack_start (cancel_button);
+
     var done_button = new Button.with_label (_("Done"));
     done_button.get_style_context ().add_class ("suggested-action");
     done_button.get_child ().margin = 3;


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