After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703502 - Move zeitgeist-dp to libzeitgeist2
Move zeitgeist-dp to libzeitgeist2
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-07-03 04:18 UTC by Manish Sinha
Modified: 2013-09-05 18:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Port zeitgeist-dp plugin to zeitgeist-2.0 (4.77 KB, patch)
2013-07-03 04:28 UTC, Manish Sinha
needs-work Details | Review
Updated patch to fix issues raised in above mentioned review (4.94 KB, patch)
2013-07-03 20:42 UTC, Manish Sinha
accepted-commit_now Details | Review
Fixed the patch above by removing section for libgd and all () (4.69 KB, patch)
2013-07-03 23:20 UTC, Manish Sinha
none Details | Review
Updated patch with space for add_subject too (4.69 KB, patch)
2013-07-03 23:49 UTC, Manish Sinha
committed Details | Review

Description Manish Sinha 2013-07-03 04:18:43 UTC
At the moment the datasource of zeitgeist in totem called zeitgeist-dp depends on zeitgeist-1.0

In the long run zeitgeist-1.0 is going to be deprecated and replaced by zeitgeist-2.0 which has lots of improvement including better gobject language support (e.g. using GenericArray instead of PtrArray.

totem's zeitgeist-dp should be migrated to zeitgeist-2.0
Comment 1 Manish Sinha 2013-07-03 04:28:20 UTC
Created attachment 248279 [details] [review]
Port zeitgeist-dp plugin to zeitgeist-2.0

This patch updates the zeitgeist-dp plugin to use the latest libzeitgeist2 library which brings user friendliness to the code. No more PtrArray.
Comment 2 Philip Withnall 2013-07-03 11:32:39 UTC
Review of attachment 248279 [details] [review]:

::: src/plugins/zeitgeist-dp/totem-zeitgeist-dp-plugin.vala
@@ +43,3 @@
                                        (Callback) playing_changed, this);
 
+    GenericArray<Event> templates = new GenericArray<Event>();

Please use spaces before opening brackets, as is the code style in the rest of Totem. (e.g. “new GenericArray<Event> ()”.)

@@ +44,3 @@
 
+    GenericArray<Event> templates = new GenericArray<Event>();
+    var event = new Zeitgeist.Event.full ("", Zeitgeist.ZG.USER_ACTIVITY,

If you have “using Zeitgeist”, you should be able to remove the explicit “Zeitgeist.” namespace here.
Comment 3 Manish Sinha 2013-07-03 20:42:44 UTC
Created attachment 248350 [details] [review]
Updated patch to fix issues raised in above mentioned review
Comment 4 Philip Withnall 2013-07-03 22:45:46 UTC
Review of attachment 248350 [details] [review]:

The removal of libgd is irrelevant, and shouldn’t be in this patch. Once you fix that, and fix the two comments below, please then commit it to master. Thanks.

::: src/plugins/zeitgeist-dp/totem-zeitgeist-dp-plugin.vala
@@ +219,3 @@
         current_media.title,
         "");
+      GenericArray<Event> events = new GenericArray<Event>();

Still missing a space before the brackets here.

@@ +225,3 @@
+                                            null);
+      event.add_subject(subject);
+      events.add(event);

And on these two lines.
Comment 5 Manish Sinha 2013-07-03 23:20:16 UTC
Created attachment 248357 [details] [review]
Fixed the patch above by removing section for libgd and all ()

Sorry for missing that second space before ()

I don't have push access to totem repo, so posting the patch again. I cross checked the path and it looks like everything should be fixed by now.
Comment 6 Manish Sinha 2013-07-03 23:49:51 UTC
Created attachment 248358 [details] [review]
Updated patch with space for add_subject too

My bad, I missed the changes needed for

+event.add_subject(subject);
+events.add(event);

Fixed it now
Comment 7 Philip Withnall 2013-07-04 12:01:52 UTC
Comment on attachment 248358 [details] [review]
Updated patch with space for add_subject too

Committed to master with some minor namespacing and commit message changes. Thanks.

commit 1130296a0dcd74649c0979aab31043410801d51f
Author: Manish Sinha <manishsinha@ubuntu.com>
Date:   Tue Jul 2 21:24:55 2013 -0700

    Fixes #703502 by porting zeitgeist-dp plugin to zeitgeist-2.0
    
    This drops the libzeitgeist dependency and replaces it with
    a zeitgeist-2.0 dependency ≥ 0.9.12.
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=703502
    
    Signed-off-by: Manish Sinha <manishsinha@ubuntu.com>

 configure.ac                                            |  4 ++--
 src/plugins/zeitgeist-dp/Makefile.am                    |  2 +-
 src/plugins/zeitgeist-dp/totem-zeitgeist-dp-plugin.vala | 23 ++++++++++++++---------
 3 files changed, 17 insertions(+), 12 deletions(-)
Comment 8 Kalev Lember 2013-08-26 10:15:57 UTC
Could you cherry-pick this to the gnome-3-10 branch as well, please?
Comment 9 Bastien Nocera 2013-09-05 18:09:59 UTC
Done.