[folks] Move debug initialisation to BackendStore



commit 7debb14bfbb22b5865c1d60804c81777151e3640
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Mon Sep 13 16:24:03 2010 +0100

    Move debug initialisation to BackendStore
    
    Now that the BackendStore is a singleton, its initialiser will more reliably
    be called than the initialiser for IndividualAggregator (since clients can
    theoretically not use the IndividualAggregator, but have to use the
    BackendStore). Closes: bgo#629096

 folks/backend-store.vala         |    3 +++
 folks/individual-aggregator.vala |    2 --
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/folks/backend-store.vala b/folks/backend-store.vala
index 6ceb578..2264e6c 100644
--- a/folks/backend-store.vala
+++ b/folks/backend-store.vala
@@ -98,6 +98,9 @@ public class Folks.BackendStore : Object {
 
   private BackendStore ()
     {
+      /* Treat this as a library init function */
+      Debug.set_flags (Environment.get_variable ("FOLKS_DEBUG"));
+
       this.backend_hash = new HashMap<string,Backend> (str_hash, str_equal);
       this._prepared_backends = new HashMap<string,Backend> (str_hash,
           str_equal);
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index e53bdcc..d9b30bb 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -115,8 +115,6 @@ public class Folks.IndividualAggregator : Object
 
       this.backends = new HashSet<Backend> ();
 
-      Debug.set_flags (Environment.get_variable ("FOLKS_DEBUG"));
-
       string disable_linking =
           Environment.get_variable ("FOLKS_DISABLE_LINKING");
       if (disable_linking != null)



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