[gnome-contacts] ContactSheet: remove unused Store.
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] ContactSheet: remove unused Store.
- Date: Sat, 23 Dec 2017 23:57:14 +0000 (UTC)
commit 035b76b2a9594fa6759d9e06625e78a4bdbb1f10
Author: Niels De Graef <nielsdegraef gmail com>
Date: Sun Dec 24 00:55:24 2017 +0100
ContactSheet: remove unused Store.
src/contacts-contact-pane.vala | 2 +-
src/contacts-contact-sheet.vala | 10 +++-------
2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 94bb4c7..ecd13e1 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -187,7 +187,7 @@ public class Contacts.ContactPane : Stack {
}
private void create_contact_sheet () {
- this.sheet = new ContactSheet (this.store);
+ this.sheet = new ContactSheet ();
this.sheet.hexpand = true;
this.sheet.vexpand = true;
this.sheet.margin = 36;
diff --git a/src/contacts-contact-sheet.vala b/src/contacts-contact-sheet.vala
index 113e294..e0243f2 100644
--- a/src/contacts-contact-sheet.vala
+++ b/src/contacts-contact-sheet.vala
@@ -22,8 +22,6 @@ using Gee;
public class Contacts.ContactSheet : Grid {
- private Store contacts_store;
-
Button add_row_with_button (ref int row, string label_value, string value) {
var type_label = new Label (label_value);
type_label.xalign = 1.0f;
@@ -90,9 +88,7 @@ public class Contacts.ContactSheet : Grid {
row++;
}
- public ContactSheet (Store contacts_store) {
- this.contacts_store = contacts_store;
-
+ public ContactSheet () {
set_row_spacing (12);
set_column_spacing (16);
set_orientation (Orientation.VERTICAL);
@@ -156,10 +152,10 @@ public class Contacts.ContactSheet : Grid {
if (phone_details != null) {
var phones = Contact.sort_fields<PhoneFieldDetails>(phone_details.phone_numbers);
foreach (var phone in phones) {
- if (this.contacts_store.can_call) {
+ if (c.store != null && c.store.can_call) {
var button = add_row_with_button (ref i, TypeSet.phone.format_type (phone), phone.value);
button.clicked.connect (() => {
- Utils.start_call (phone.value, this.contacts_store.calling_accounts);
+ Utils.start_call (phone.value, c.store.calling_accounts);
});
} else {
add_row_with_label (ref i, TypeSet.phone.format_type (phone), phone.value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]