[folks] Remove ENABLE_ZEITGEIST macro from Makefile and sources.



commit df1ea03ae772a9b408ab154f1883744ecb1416a6
Author: Jeremy Whiting <jpwhiting kde org>
Date:   Wed Jun 13 12:15:12 2012 -0600

    Remove ENABLE_ZEITGEIST macro from Makefile and sources.

 backends/telepathy/lib/Makefile.am            |    8 +++-----
 backends/telepathy/lib/tpf-persona-store.vala |   18 +++++-------------
 backends/telepathy/lib/tpf-persona.vala       |    8 ++------
 3 files changed, 10 insertions(+), 24 deletions(-)
---
diff --git a/backends/telepathy/lib/Makefile.am b/backends/telepathy/lib/Makefile.am
index 6a4ae3d..fe0d596 100644
--- a/backends/telepathy/lib/Makefile.am
+++ b/backends/telepathy/lib/Makefile.am
@@ -122,6 +122,7 @@ libfolks_telepathy_la_VALAFLAGS = \
 	--pkg gio-2.0 \
 	--pkg gee-1.0 \
 	--pkg telepathy-glib \
+	--pkg zeitgeist-1.0 \
 	--includedir folks \
 	--vapi folks-telepathy.vapi \
 	-H folks/folks-telepathy.h \
@@ -134,6 +135,7 @@ libfolks_telepathy_la_CFLAGS = \
 	$(GLIB_CFLAGS) \
 	$(GEE_CFLAGS) \
 	$(TP_GLIB_CFLAGS) \
+	$(ZEITGEIST_CFLAGS) \
 	$(NULL)
 
 libfolks_telepathy_la_LIBADD = \
@@ -142,15 +144,11 @@ libfolks_telepathy_la_LIBADD = \
 	$(GLIB_LIBS) \
 	$(GEE_LIBS) \
 	$(TP_GLIB_LIBS) \
+	$(ZEITGEIST_LIBS) \
 	$(top_builddir)/folks/libfolks.la \
 	$(top_builddir)/folks/libfolks-internal.la \
 	$(NULL)
 
-libfolks_telepathy_la_VALAFLAGS += --pkg zeitgeist-1.0
-libfolks_telepathy_la_VALAFLAGS += --define=HAVE_ZEITGEIST
-libfolks_telepathy_la_CFLAGS += $(ZEITGEIST_CFLAGS)
-libfolks_telepathy_la_LIBADD += $(ZEITGEIST_LIBS)
-
 # The quoting here is unnecessary but harmless, and has the useful side-effect
 # that vim quickfix mode (:make) doesn't interpret the libtool --mode=link
 # command as an error message in a bizarrely named file
diff --git a/backends/telepathy/lib/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala
index ceb9921..37dc447 100644
--- a/backends/telepathy/lib/tpf-persona-store.vala
+++ b/backends/telepathy/lib/tpf-persona-store.vala
@@ -24,9 +24,7 @@ using GLib;
 using Gee;
 using TelepathyGLib;
 using Folks;
-#if HAVE_ZEITGEIST
 using Zeitgeist;
-#endif
 extern const string G_LOG_DOMAIN;
 extern const string BACKEND_NAME;
 
@@ -87,10 +85,8 @@ public class Tpf.PersonaStore : Folks.PersonaStore
 
   private Account _account;
 
-#if HAVE_ZEITGEIST
   private Zeitgeist.Log? _log= null;
   private Zeitgeist.Monitor? _monitor = null;
-#endif
 
   /**
    * The Telepathy account this store is based upon.
@@ -1029,9 +1025,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
           new GLib.GenericArray<TelepathyGLib.Contact> ());
 
       this._got_initial_members = true;
-#if HAVE_ZEITGEIST
       this._populate_counters ();
-#endif
       this._notify_if_is_quiescent ();
     }
 
@@ -1540,11 +1534,10 @@ public class Tpf.PersonaStore : Folks.PersonaStore
       return store;
     }
 
-#if HAVE_ZEITGEIST
-  private string? _get_iid_from_event_metadata (string? uri) 
+  private string? _get_iid_from_event_metadata (string? uri)
     {
       /* Format a proper id represting a persona in the store.
-       * Zeitgeist uses x-telepathy-identifier as a prefix for telepathy, which 
+       * Zeitgeist uses x-telepathy-identifier as a prefix for telepathy, which
        * is stored as the uri of a subject of an event. */
       if (uri == null)
         {
@@ -1553,7 +1546,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
       var new_uri = uri.replace ("x-telepathy-identifier:", "");
       return this.account.protocol + ":" + new_uri;
     }
-  
+
   private void _increase_persona_counter (string? id, string? interaction_type, Event event)
     {
       /* Check if the persona id and interaction is valid. If so increase the
@@ -1610,7 +1603,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
 
       /* Get all events for this account from Zeitgeist and increase the
        * the counters of the personas */
-      try 
+      try
         {
           PtrArray events = this._get_zeitgeist_event_templates ();
           var results = yield this._log.find_events (new TimeRange.anytime (),
@@ -1641,7 +1634,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
           debug ("Failed to fetch events from Zeitgeist");
         }
 
-      /* Prepare a monitor and install for this account to populate persona 
+      /* Prepare a monitor and install for this account to populate persona
        * counters upon interaction changes.*/
       if (this._monitor == null)
         {
@@ -1654,5 +1647,4 @@ public class Tpf.PersonaStore : Folks.PersonaStore
 
       this._notify_if_is_quiescent ();
     }
-#endif
 }
diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
index e0da9d3..1629277 100644
--- a/backends/telepathy/lib/tpf-persona.vala
+++ b/backends/telepathy/lib/tpf-persona.vala
@@ -22,9 +22,7 @@ using Gee;
 using GLib;
 using TelepathyGLib;
 using Folks;
-#if HAVE_ZEITGEIST
 using Zeitgeist;
-#endif
 
 /**
  * A persona subclass which represents a single instant messaging contact from
@@ -1199,7 +1197,6 @@ public class Tpf.Persona : Folks.Persona,
       return store._ensure_persona_for_contact (contact);
     }
 
-#if HAVE_ZEITGEIST
   internal void _increase_counter (string id, string interaction_type, Event event)
     {
       var timestamp = (uint) (event.get_timestamp () / 1000);
@@ -1230,7 +1227,7 @@ public class Tpf.Persona : Folks.Persona,
           this.notify_property ("call-interaction-count");
           if (this._last_call_interaction_datetime == null ||
               this._last_call_interaction_datetime.compare (converted_datetime) == -1)
-            { 
+            {
               this._last_call_interaction_datetime = converted_datetime;
               this.notify_property ("last-call-interaction-datetime");
             }
@@ -1239,12 +1236,11 @@ public class Tpf.Persona : Folks.Persona,
         }
     }
 
-  internal void _reset_interaction () 
+  internal void _reset_interaction ()
     {
       this._call_interaction_count = 0;
       this._im_interaction_count = 0;
       this._last_call_interaction_datetime = null;
       this._last_im_interaction_datetime = null;
     }
-#endif
 }



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