[gnome-contacts] Always select the new contact when editing it
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Always select the new contact when editing it
- Date: Mon, 29 Aug 2011 14:19:36 +0000 (UTC)
commit de22e763b91e327e955e75ce103a72561562bc8a
Author: Alexander Larsson <alexl redhat com>
Date: Mon Aug 29 15:16:37 2011 +0200
Always select the new contact when editing it
src/contacts-app.vala | 4 +++-
src/contacts-contact-pane.vala | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index 9ee93e8..487aebb 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -109,7 +109,9 @@ public class Contacts.App : Window {
contacts_store = new Store ();
list_pane = new ListPane (contacts_store);
list_pane.selection_changed.connect (selection_changed);
- list_pane.create_new.connect ( () => { contacts_pane.new_contact (); });
+ list_pane.create_new.connect ( () => {
+ contacts_pane.new_contact (list_pane);
+ });
grid.attach (list_pane, 0, 0, 1, 2);
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index d0366b0..0a66a4d 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -1359,7 +1359,7 @@ public class Contacts.ContactPane : EventBox {
}
}
- public void new_contact () {
+ public void new_contact (ListPane list_pane) {
var details = new HashTable<string, Value?> (str_hash, str_equal);
contacts_store.aggregator.primary_store.add_persona_from_details.begin (details, (obj, res) => {
var store = obj as PersonaStore;
@@ -1390,6 +1390,7 @@ public class Contacts.ContactPane : EventBox {
show_contact (contact);
persona.set_data ("contacts-unedited", true);
display_edit (contact, persona, true);
+ list_pane.select_contact (contact, true);
ulong id = 0;
id = this.save_data.connect ( () => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]