[Zeitgeist] [Merge] lp:~zeitgeist/unity-lens-video/fix-1196878-port-to-libzeitgeist2 into lp:unity-lens-video

2013-07-02 Thread मनीष सिन्हा
Manish Sinha (मनीष सिन्हा) has proposed merging 
lp:~zeitgeist/unity-lens-video/fix-1196878-port-to-libzeitgeist2 into 
lp:unity-lens-video.

Requested reviews:
  Unity Videos lens (unity-lens-videos)
Related bugs:
  Bug #1196878 in Unity Videos Lens: "Port Unity Lens Video to libzeitgeist2"
  https://bugs.launchpad.net/unity-lens-video/+bug/1196878

For more details, see:
https://code.launchpad.net/~zeitgeist/unity-lens-video/fix-1196878-port-to-libzeitgeist2/+merge/172511

Fixes LP #1196878 where the lens is ported to libzeitgeist2

(PS: Already signed contributor's agreement)
-- 
https://code.launchpad.net/~zeitgeist/unity-lens-video/fix-1196878-port-to-libzeitgeist2/+merge/172511
Your team Zeitgeist Framework Team is subscribed to branch 
lp:~zeitgeist/unity-lens-video/fix-1196878-port-to-libzeitgeist2.
=== modified file 'configure.ac'
--- configure.ac	2013-05-16 11:33:59 +
+++ configure.ac	2013-07-02 09:35:32 +
@@ -75,7 +75,7 @@
   gee-1.0
   libsoup-gnome-2.4
   json-glib-1.0
-  zeitgeist-1.0 >= 0.3.8
+  zeitgeist-2.0 >= 0.9.12
   unity >= 7.0.0
   unity-extras >= 6.91.11
   )

=== modified file 'debian/control'
--- debian/control	2013-06-20 16:13:54 +
+++ debian/control	2013-07-02 09:35:32 +
@@ -12,7 +12,7 @@
libjson-glib-dev,
libsoup-gnome2.4-dev,
libunity-dev (>= 7.0.0),
-   libzeitgeist-dev (>= 0.3.8),
+   libzeitgeist-2.0-dev (>= 0.9.12),
valac-0.18,
xvfb,
 Standards-Version: 3.9.4

=== modified file 'src/Makefile.am'
--- src/Makefile.am	2013-06-20 16:13:59 +
+++ src/Makefile.am	2013-07-02 09:35:32 +
@@ -43,7 +43,7 @@
   --pkg gio-unix-2.0 \
   --pkg glib-2.0 \
   --pkg gee-1.0 \
-  --pkg zeitgeist-1.0 \
+  --pkg zeitgeist-2.0 \
   --vapidir $(srcdir) \
   --vapidir $(top_srcdir)/vapi \
   --target-glib=2.26 \
@@ -59,7 +59,7 @@
   --pkg gio-unix-2.0 \
   --pkg glib-2.0 \
   --pkg gee-1.0 \
-  --pkg zeitgeist-1.0 \
+  --pkg zeitgeist-2.0 \
   --pkg libsoup-gnome-2.4 \
   --pkg libsoup-2.4 \
   --pkg json-glib-1.0 \

=== modified file 'src/blacklist-tracker.vala'
--- src/blacklist-tracker.vala	2012-11-19 11:00:54 +
+++ src/blacklist-tracker.vala	2013-07-02 09:35:32 +
@@ -101,8 +101,8 @@
   {
 if (e.num_subjects () > 0)
 {
-  unowned Subject s = e.get_subject (0);
-  unowned string uri = s.get_uri ();
+  Subject s = e.get_subject (0);
+  unowned string uri = s.uri;
   if (uri == null || uri == "") continue;
 
   if (uri.has_suffix ("*"))

=== modified file 'src/remote-scope.vala'
--- src/remote-scope.vala	2013-06-20 16:13:59 +
+++ src/remote-scope.vala	2013-07-02 09:35:32 +
@@ -19,6 +19,7 @@
  */
 
 using Config;
+using Zeitgeist;
 
 namespace Unity.VideoLens
 {
@@ -497,22 +498,22 @@
 private void zeitgeist_init () throws Error
 {
   zg_sources = new Zeitgeist.DataSourceRegistry ();
-  var templates = new PtrArray.sized(1);
-  var ev = new Zeitgeist.Event.full (Zeitgeist.ZG_ACCESS_EVENT, Zeitgeist.ZG_USER_ACTIVITY, "lens://unity-lens-video");
-  templates.add ((ev as GLib.Object).ref());
+  var templates = new GenericArray();
+  var ev = new Zeitgeist.Event.full (Zeitgeist.ZG.ACCESS_EVENT, Zeitgeist.ZG.USER_ACTIVITY, "lens://unity-lens-video");
+  templates.add (ev);
   var data_source = new Zeitgeist.DataSource.full ("98898", "Unity Video Lens", "", templates);
   zg_sources.register_data_source (data_source, null);
 }
 
 private void zeitgeist_insert_event (string uri, string title, string icon)
 {
-  var subject = new Zeitgeist.Subject.full (uri, Zeitgeist.NFO_VIDEO, Zeitgeist.NFO_REMOTE_DATA_OBJECT, "", uri, title, icon);
-  var event = new Zeitgeist.Event.full (Zeitgeist.ZG_ACCESS_EVENT, Zeitgeist.ZG_USER_ACTIVITY, "lens://unity-lens-video");
+  var subject = new Zeitgeist.Subject.full (uri, Zeitgeist.NFO.VIDEO, Zeitgeist.NFO.REMOTE_DATA_OBJECT, "", uri, title, icon);
+  var event = new Zeitgeist.Event.full (Zeitgeist.ZG.ACCESS_EVENT, Zeitgeist.ZG.USER_ACTIVITY, "lens://unity-lens-video");
   event.add_subject (subject);
 
-  var ev_array = new PtrArray.sized(1);
-  ev_array.add ((event as GLib.Object).ref ());
-  Zeitgeist.Log.get_default ().insert_events_from_ptrarray (ev_array, null);
+  var ev_array = new GenericArray();
+  ev_array.add (event);
+  Zeitgeist.Log.get_default ().insert_events_no_reply (ev_array);
 }
   }
 }

=== modified file 'src/scope.vala'
--- src/scope.vala	2013-06-20 16:13:59 +
+++ src/scope.vala	2013-07-02 09:35:32 +
@@ -19,6 +19,7 @@
  */
 
 using Config;
+using Zeitgeist;
 
 namespace Unity.VideoLens
 {
@@ -194,11 +195,11 @@
 
   var time_range = new Zeitgeist.TimeRange.to_now ();
   var event_template = new Zeitgei

[Zeitgeist] [Merge] lp:~zeitgeist/unity-lens-applications/fix-1196822-port-to-libzeitgeist2 into lp:unity-lens-applications

2013-07-02 Thread मनीष सिन्हा
The proposal to merge 
lp:~zeitgeist/unity-lens-applications/fix-1196822-port-to-libzeitgeist2 into 
lp:unity-lens-applications has been updated.

Description changed to:

Fixes LP #1196822 by porting unity-lens-applications to libzeitgeist2 and 
updated debian/control with proper build-dep

(PS - Signed contributor's agreement)

For more details, see:
https://code.launchpad.net/~zeitgeist/unity-lens-applications/fix-1196822-port-to-libzeitgeist2/+merge/172475
-- 
https://code.launchpad.net/~zeitgeist/unity-lens-applications/fix-1196822-port-to-libzeitgeist2/+merge/172475
Your team Zeitgeist Framework Team is subscribed to branch 
lp:~zeitgeist/unity-lens-applications/fix-1196822-port-to-libzeitgeist2.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~zeitgeist/unity-lens-applications/fix-1196822-port-to-libzeitgeist2 into lp:unity-lens-applications

2013-07-02 Thread मनीष सिन्हा
Manish Sinha (मनीष सिन्हा) has proposed merging 
lp:~zeitgeist/unity-lens-applications/fix-1196822-port-to-libzeitgeist2 into 
lp:unity-lens-applications.

Requested reviews:
  Unity Team (unity-team)
Related bugs:
  Bug #1196822 in unity-lens-applications: "Port unity-lens-applications to 
libzeitgeist2"
  https://bugs.launchpad.net/unity-lens-applications/+bug/1196822

For more details, see:
https://code.launchpad.net/~zeitgeist/unity-lens-applications/fix-1196822-port-to-libzeitgeist2/+merge/172475

Fixes LP #1196822 by porting unity-lens-applications to libzeitgeist2 and 
updated debian/control with proper build-dep

(PS - Signed contributor's license)
-- 
https://code.launchpad.net/~zeitgeist/unity-lens-applications/fix-1196822-port-to-libzeitgeist2/+merge/172475
Your team Zeitgeist Framework Team is subscribed to branch 
lp:~zeitgeist/unity-lens-applications/fix-1196822-port-to-libzeitgeist2.
=== modified file 'configure.ac'
--- configure.ac	2013-05-16 21:13:36 +
+++ configure.ac	2013-07-02 07:32:32 +
@@ -74,7 +74,7 @@
   gio-unix-2.0 >= $GLIB_REQUIRED
   gee-1.0
   dee-1.0 >= 0.5.16
-  zeitgeist-1.0 >= 0.3.8
+  zeitgeist-2.0 >= 0.9.12
   libcolumbus0 >= 0.4.0
   unity >= 7.0.0
   unity-protocol-private

=== modified file 'debian/control'
--- debian/control	2013-06-08 21:35:34 +
+++ debian/control	2013-07-02 07:32:32 +
@@ -10,7 +10,7 @@
libglib2.0-dev (>= 2.27),
libgee-dev,
libdee-dev (>= 0.5.16),
-   libzeitgeist-dev (>= 0.3.8),
+   libzeitgeist-2.0-dev (>= 0.9.12),
libunity-dev (>= 7.0.0),
libgnome-menu-3-dev,
dh-autoreconf,

=== modified file 'src/Makefile.am'
--- src/Makefile.am	2013-05-16 11:37:05 +
+++ src/Makefile.am	2013-07-02 07:32:32 +
@@ -33,7 +33,7 @@
   --pkg gio-2.0 \
   --pkg gio-unix-2.0 \
   --pkg dee-1.0 \
-  --pkg zeitgeist-1.0 \
+  --pkg zeitgeist-2.0 \
   --pkg unity \
   --pkg unity-protocol \
   --pkg gee-1.0 \

=== modified file 'src/daemon.vala'
--- src/daemon.vala	2013-07-01 12:17:01 +
+++ src/daemon.vala	2013-07-02 07:32:32 +
@@ -101,7 +101,7 @@
 private Unity.LauncherFavorites favorite_apps;
 private AppWatcher app_watcher;
 
-private PtrArray zg_templates;
+private GenericArray zg_templates;
 
 /* Gnome menu structure - also used to check whether apps are installed */
 private uint app_menu_changed_reindex_timeout = 0;
@@ -467,13 +467,13 @@
 private void populate_zg_templates ()
 {
   /* Create a template that activation of applications */
-  zg_templates = new PtrArray.sized(1);
-  var ev = new Zeitgeist.Event.full (ZG_ACCESS_EVENT, ZG_USER_ACTIVITY, "",
- new Subject.full ("application*",
-   "", //NFO_SOFTWARE,
-   "",
-   "", "", "", ""));
-  zg_templates.add ((ev as GLib.Object).ref());
+  zg_templates = new GenericArray();
+  var ev = new Zeitgeist.Event.full (ZG.ACCESS_EVENT, ZG.USER_ACTIVITY, "","");
+  ev.add_subject(new Subject.full ("application*",
+   "", //NFO.SOFTWARE,
+   "",
+   "", "", "", ""));
+  zg_templates.add (ev);
 }
 
 private void mark_dirty ()
@@ -487,7 +487,7 @@
   try
   {
 // simulate a kind of frecency
-var end_ts = Timestamp.now ();
+var end_ts = Timestamp.from_now ();
 var start_ts = end_ts - Timestamp.WEEK * 3;
 var rs = yield log.find_events (new TimeRange (start_ts, end_ts),
 zg_templates,
@@ -499,11 +499,11 @@
 // most popular apps must have high value, so unknown apps (where
 // popularity_map[app] == 0 aren't considered super popular
 int relevancy = 256;
-foreach (unowned Event event in rs)
+foreach (Event event in rs)
 {
   for (int i = 0; i < event.num_subjects (); i++)
   {
-unowned string uri = event.get_subject (i).get_uri ();
+string uri = event.get_subject (i).uri;
 if (uri == null) continue;
 popularity_map[uri] = relevancy;
   }
@@ -1846,7 +1846,7 @@
   {
 string? app_uri = null;
 if (ev.num_subjects () > 0)
-  app_uri = ev.get_subject (0).get_uri ();
+  app_uri = ev.get_subject (0).uri;
 
 if (app_uri == null)
 {

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp