[gnome-contacts/new-design] Allow canceling editing by escape
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/new-design] Allow canceling editing by escape
- Date: Thu, 15 Dec 2011 09:38:56 +0000 (UTC)
commit d3e3f2aa02205adae25065081e7c6def204747bf
Author: Alexander Larsson <alexl redhat com>
Date: Tue Dec 13 23:14:16 2011 +0100
Allow canceling editing by escape
src/contacts-contact-pane.vala | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index bd49502..f34981b 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -723,6 +723,12 @@ public abstract class Contacts.DataFieldRow : FieldRow {
entry.activate.connect ( () => {
field_set.sheet.pane.exit_edit_mode (true);
});
+ entry.key_press_event.connect ( (key_event) => {
+ if (key_event.keyval == Gdk.keyval_from_name ("Escape")) {
+ field_set.sheet.pane.exit_edit_mode (false);
+ }
+ return false;
+ });
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]