summaryrefslogtreecommitdiff
path: root/src/contacts-contact-pane.vala
diff options
context:
space:
mode:
authorErick Pérez Castellanos <erick.red@gmail.com>2014-04-25 23:48:41 -0400
committerErick Pérez Castellanos <erick.red@gmail.com>2014-05-29 16:17:22 -0400
commit7c1459d8a72485d4d4ee627dd202ce34111e335d (patch)
tree58df64ff22440c50702742c939dbcc3d465610b0 /src/contacts-contact-pane.vala
parentd6f248a1d8ed62cf970d9a3084e05f1782b9b712 (diff)
downloadgnome-contacts-7c1459d8a72485d4d4ee627dd202ce34111e335d.tar.gz
ContactPane: moved into Window
Added Store as a public property. I will prefer the property being private but GtkBuilder would not be able of setting it that way.
Diffstat (limited to 'src/contacts-contact-pane.vala')
-rw-r--r--src/contacts-contact-pane.vala26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 4d22ddf..eef0572 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -44,7 +44,21 @@ namespace Contacts {
}
public class Contacts.ContactPane : Notebook {
- private Store contacts_store;
+ private Store _store;
+
+ public Store store {
+ get {
+ return _store;
+ }
+ set {
+ _store = value;
+
+ // Refresh the view when the store is quiescent as we may have missed
+ // some potential matches while the store was still preparing.
+ _store.quiescent.connect (update_sheet);
+ }
+ }
+
public Contact? contact;
/* 3 pages, first */
@@ -167,7 +181,7 @@ public class Contacts.ContactPane : Notebook {
});
no.clicked.connect ( () => {
- contacts_store.add_no_suggest_link (contact, c);
+ store.add_no_suggest_link (contact, c);
/* TODO: Add undo */
suggestion_grid.destroy ();
});
@@ -219,11 +233,9 @@ public class Contacts.ContactPane : Notebook {
show_no_selection_frame ();
}
- public ContactPane (Store contacts_store) {
+ construct {
this.show_tabs = false;
- this.contacts_store = contacts_store;
-
this.edit_contact_actions = new SimpleActionGroup ();
this.edit_contact_actions.add_action_entries (action_entries, this);
@@ -258,10 +270,6 @@ public class Contacts.ContactPane : Notebook {
main_sw.show_all ();
insert_page (main_sw, null, 1);
- // Refresh the view when the store is quiescent as we may have missed
- // some potential matches while the store was still preparing.
- contacts_store.quiescent.connect (update_sheet);
-
suggestion_grid = null;
/* edit mode widgetry, third page */