[gnome-contacts/new-design] Allow for non-grabbing setup_entry_for_edit
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/new-design] Allow for non-grabbing setup_entry_for_edit
- Date: Thu, 15 Dec 2011 09:39:11 +0000 (UTC)
commit e582d923fc68c3a4d6985e8dc86d7544cbf51809
Author: Alexander Larsson <alexl redhat com>
Date: Wed Dec 14 00:41:00 2011 +0100
Allow for non-grabbing setup_entry_for_edit
This is needed for e.g. addresses
src/contacts-contact-pane.vala | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 869544d..0b3c61f 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -732,12 +732,14 @@ public abstract class Contacts.DataFieldRow : FieldRow {
field_set.save ();
}
- public void setup_entry_for_edit (Entry entry) {
- ulong id = 0;
- id = entry.size_allocate.connect ( () => {
- entry.grab_focus ();
- entry.disconnect (id);
- });
+ public void setup_entry_for_edit (Entry entry, bool grab_focus = true) {
+ if (grab_focus) {
+ ulong id = 0;
+ id = entry.size_allocate.connect ( () => {
+ entry.grab_focus ();
+ entry.disconnect (id);
+ });
+ }
entry.activate.connect ( () => {
field_set.sheet.pane.exit_edit_mode (true);
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]