[gnome-contacts] Fixed: New details field not receiving focus.
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Fixed: New details field not receiving focus.
- Date: Wed, 20 Feb 2013 18:38:05 +0000 (UTC)
commit 16d4183b391e537d366e8a7fbbef04e5ed16bb68
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Tue Feb 19 22:12:02 2013 -0500
Fixed: New details field not receiving focus.
src/contacts-contact-editor.vala | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-contact-editor.vala b/src/contacts-contact-editor.vala
index 459c8a7..767c843 100644
--- a/src/contacts-contact-editor.vala
+++ b/src/contacts-contact-editor.vala
@@ -52,6 +52,10 @@ public class Contacts.AddressEditor : Grid {
});
}
}
+
+ public override void grab_focus () {
+ entries[0].grab_focus ();
+ }
}
public class Contacts.ContactEditor : Grid {
@@ -253,6 +257,11 @@ public class Contacts.ContactEditor : Grid {
delete_button.clicked.connect (() => {
remove_row (row);
});
+
+ value_entry.map.connect (() => {
+ if (value == "")
+ value_entry.grab_focus ();
+ });
}
void attach_row_with_entry_labeled (string title, AbstractFieldDetails? details, string value, int row) {
@@ -279,6 +288,11 @@ public class Contacts.ContactEditor : Grid {
delete_button.clicked.connect (() => {
remove_row (row);
});
+
+ value_entry.map.connect (() => {
+ if (value == "")
+ value_entry.grab_focus ();
+ });
}
void attach_row_with_text_labeled (string title, AbstractFieldDetails? details, string value, int row) {
@@ -313,6 +327,11 @@ public class Contacts.ContactEditor : Grid {
delete_button.clicked.connect (() => {
remove_row (row);
});
+
+ value_text.map.connect (() => {
+ if (value == "")
+ value_text.grab_focus ();
+ });
}
void attach_row_for_birthday (string title, AbstractFieldDetails? details, DateTime birthday, int row) {
@@ -397,6 +416,10 @@ public class Contacts.ContactEditor : Grid {
delete_button.clicked.connect (() => {
remove_row (row);
});
+
+ value_address.map.connect (() => {
+ value_address.grab_focus ();
+ });
}
void add_edit_row (Persona p, string prop_name, ref int row, bool add_empty = false, string? type = null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]