[gnome-contacts] AccountsList: hooked to ContactsStore signal for update



commit ab0bba0f2a6d7eeb1c125e6abb7c69ec5fca88df
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Sun Aug 4 12:06:32 2013 -0400

    AccountsList: hooked to ContactsStore signal for update
    
    Updated contacts-setup-window and change address book dialog to
    use the change notification and update the accounts list there

 src/contacts-app.vala          |    5 +++++
 src/contacts-setup-window.vala |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index e3d86e4..df43a2f 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -139,6 +139,10 @@ public class Contacts.App : Gtk.Application {
     var acc = new AccountsList ();
     acc.update_contents (true);
 
+    ulong stores_changed_id = contacts_store.eds_persona_store_changed.connect  ( () => {
+       acc.update_contents (true);
+      });
+
     (dialog.get_content_area () as Box).add (acc);
 
     dialog.show_all ();
@@ -150,6 +154,7 @@ public class Contacts.App : Gtk.Application {
            contacts_store.refresh ();
          }
        }
+       contacts_store.disconnect (stores_changed_id);
        dialog.destroy ();
       });
   }
diff --git a/src/contacts-setup-window.vala b/src/contacts-setup-window.vala
index de00399..d77ce53 100644
--- a/src/contacts-setup-window.vala
+++ b/src/contacts-setup-window.vala
@@ -76,7 +76,7 @@ public class Contacts.SetupWindow : Gtk.Window {
 
     grid.add (accounts_list);
 
-    source_list_changed_id = eds_source_registry.source_changed.connect ( () => {
+    source_list_changed_id = App.app.contacts_store.eds_persona_store_changed.connect  ( () => {
        accounts_list.update_contents (false);
       });
 
@@ -95,7 +95,7 @@ public class Contacts.SetupWindow : Gtk.Window {
 
   public override void destroy () {
     if (source_list_changed_id != 0) {
-      eds_source_registry.disconnect (source_list_changed_id);
+      App.app.contacts_store.disconnect (source_list_changed_id);
       source_list_changed_id = 0;
     }
     base.destroy ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]