[gnome-contacts] App: made Store instance belong to Contacts.App
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] App: made Store instance belong to Contacts.App
- Date: Thu, 29 May 2014 20:26:55 +0000 (UTC)
commit 7c3bbc36e7bccf00bdab82e2bf0b6fe48854b55a
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Thu May 15 22:50:14 2014 -0400
App: made Store instance belong to Contacts.App
Added Window::store property, set upon constructor call
src/contacts-app.vala | 8 +++-----
src/contacts-window.ui | 1 -
src/contacts-window.vala | 3 ---
3 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index 1486ee9..8e4bbf3 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -24,7 +24,7 @@ public class Contacts.App : Gtk.Application {
public GLib.Settings settings;
/* moving creation to Window */
- public weak Store contacts_store;
+ public Store contacts_store;
public Contacts.Window window;
@@ -178,16 +178,14 @@ public class Contacts.App : Gtk.Application {
}
private void create_window () {
- window = new Contacts.Window (this);
-
- /* FIXME: place where it should be placed */
- //contacts_store = window.contacts_store;
+ window = new Contacts.Window (this, contacts_store);
window.add_button.clicked.connect (app.new_contact);
}
public override void startup () {
ensure_eds_accounts ();
+ contacts_store = new Store ();
base.startup ();
}
diff --git a/src/contacts-window.ui b/src/contacts-window.ui
index 7a7da4a..e381b81 100644
--- a/src/contacts-window.ui
+++ b/src/contacts-window.ui
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.15.2 on Thu Aug 15 15:33:02 2013 -->
<interface>
- <object class="ContactsStore" id="contacts_store" />
<!-- interface-requires gtk+ 3.10 -->
<template class="ContactsWindow" parent="GtkApplicationWindow">
<property name="can_focus">False</property>
diff --git a/src/contacts-window.vala b/src/contacts-window.vala
index a927eb4..0903ea8 100644
--- a/src/contacts-window.vala
+++ b/src/contacts-window.vala
@@ -58,9 +58,6 @@ public class Contacts.Window : Gtk.ApplicationWindow {
[GtkChild]
private AccountsList setup_accounts_list;
-
- [GtkChild]
- public Store contacts_store;
private ListPane list_pane;
/* FIXME: remove from public what it is not needed */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]