Merge lp:~markjtully/zeitgeist-datasources/thunderbird into lp:zeitgeist-datasources/0.8

Proposed by Mark Tully
Status: Merged
Merged at revision: 168
Proposed branch: lp:~markjtully/zeitgeist-datasources/thunderbird
Merge into: lp:zeitgeist-datasources/0.8
Diff against target: 640 lines (+466/-14) (has conflicts)
13 files modified
MAINTAINERS (+1/-1)
configure.ac (+46/-12)
firefox/extension/chrome/content/module.js (+1/-1)
thunderbird/Makefile.am (+13/-0)
thunderbird/README (+10/-0)
thunderbird/extension/Makefile.am (+40/-0)
thunderbird/extension/chrome.manifest (+5/-0)
thunderbird/extension/chrome/content/event.js (+85/-0)
thunderbird/extension/chrome/content/module.js (+62/-0)
thunderbird/extension/chrome/content/zeitgeist.xul (+7/-0)
thunderbird/extension/defaults/preferences/prefs.js (+2/-0)
thunderbird/extension/install.rdf (+28/-0)
thunderbird/extension/license.txt (+166/-0)
Text conflict in configure.ac
To merge this branch: bzr merge lp:~markjtully/zeitgeist-datasources/thunderbird
Reviewer Review Type Date Requested Status
Manish Sinha (मनीष सिन्हा) Approve
Review via email: mp+79506@code.launchpad.net

Description of the change

Plugin for Thunderbird

To post a comment you must log in.
Revision history for this message
Seif Lotfy (seif) wrote :
Download full text (28.7 KiB)

I got a question...
lets say I receive an email from <email address hidden> in my seif <at> lotfy <dot> com
inbox
where are both infos stored... imho event origin should be the inbox address
while the sender address should be the subject.origin
Other than that its perfect
AWESOME job

On Mon, Oct 17, 2011 at 1:09 AM, Teester <email address hidden> wrote:

> Teester has proposed merging
> lp:~markjtully/zeitgeist-datasources/thunderbird into
> lp:zeitgeist-datasources.
>
> Requested reviews:
> Zeitgeist Data-Sources Team (zeitgeist-dataproviders)
> Related bugs:
> Bug #594215 in Zeitgeist Data-Sources: "Add thunderbird support"
> https://bugs.launchpad.net/zeitgeist-datasources/+bug/594215
>
> For more details, see:
>
> https://code.launchpad.net/~markjtully/zeitgeist-datasources/thunderbird/+merge/79506
>
> Plugin for Thunderbird
> --
>
> https://code.launchpad.net/~markjtully/zeitgeist-datasources/thunderbird/+merge/79506
> Your team Zeitgeist Data-Sources Team is requested to review the proposed
> merge of lp:~markjtully/zeitgeist-datasources/thunderbird into
> lp:zeitgeist-datasources.
>
> === modified file 'MAINTAINERS'
> --- MAINTAINERS 2011-06-04 21:08:58 +0000
> +++ MAINTAINERS 2011-10-16 23:07:05 +0000
> @@ -6,7 +6,7 @@
> Please thank our Contributers:
> * Travis Glenn Hansen - thansen
> * Jon Nettleton - jnettlet
> -* Mark Jtully - teester
> +* Mark Tully - teester
> * Tassilo Horn - tsdh
> * Patrick M. Niedzielski
> * Danielle Madeley
>
> === modified file 'configure.ac'
> --- configure.ac 2011-09-14 19:29:53 +0000
> +++ configure.ac 2011-10-16 23:07:05 +0000
> @@ -63,7 +63,7 @@
> AC_MSG_NOTICE([Requested to enable all plugins: ${all_plugins}])
>
> # The full list of plugins
> -allowed_plugins="bzr chrome eog geany gedit vim emacs tomboy telepathy
> xchat rhythmbox firefox totem-libzg firefox-36-libzg"
> +allowed_plugins="bzr chrome eog geany gedit vim emacs tomboy telepathy
> xchat rhythmbox firefox totem-libzg firefox-36-libzg thunderbird"
> # currently disabled = "epiphany"
>
> # npapi-plugin has a template Makefile.am, but don't use it directly
> @@ -155,10 +155,10 @@
> plugin_error_or_ignore "libzeitgeist not
> found"
> continue
> fi
> - if test "x$HAVE_GTK" = "xno"; then
> + if test "x$HAVE_GTK" = "xno"; then
> plugin_error_or_ignore "You need to install
> gtk development headers"
> continue
> - fi
> + fi
> PKG_CHECK_MODULES(GEANY, geany,
> [HAVE_GEANY=yes], [HAVE_GEANY=no])
> if test "${HAVE_GEANY}" != "yes" ; then
> @@ -179,7 +179,7 @@
> PKG_CHECK_MODULES(ZEITGEIST_SHARP, zeitgeist-sharp,
> ENABLE_ZEITGEIST_SHARP=yes,
> ENABLE_ZEITGEIST_SHARP=no)
> PKG_CHECK_MODULES(TOMBOY_ADDINS, tomboy-addins,
> - HAS_TOMBOY_ADDINS=yes,
> HAS_TOMBOY_ADDINS=no)
> + HAS_TOMBOY...

Revision history for this message
Seif Lotfy (seif) wrote :

I got a question...
lets say I receive an email from <email address hidden> in my seif <at> lotfy <dot> com
inbox
where are both infos stored... imho event origin should be the inbox address
while the sender address should be the subject.origin
Other than that its perfect
AWESOME job

Revision history for this message
Mark Tully (markjtully) wrote :

Just to make sure I understand:
Using the terminology from http://zeitgeist-project.com/docs/0.7/datamodel.html#event, the Actor parameter should be the inbox address rather than application://thunderbird.desktop, in order to tie the event to the email account rather than to Thunderbird?

So if my account at a@b.c gets an email entitled 'Hello' from X, with email address x@y.z, the event should look like:
  Event interpretation: EVENT_INTERPRETATION.RECEIVE_EVENT
  Event manifestation: EVENT_MANIFESTATION.SYSTEM_NOTIFICATION
  Actor: a@b.c
  Subject:
   Subject interpretation: MESSAGE.EMAIL
   Subject manifestation: MAILBOX_DATA_OBJECT
   url: Message uri
   mimetype: message/rfc822
   origin: x@y.z
   title: X - Hello
   storage: net

Revision history for this message
Siegfried Gevatter (rainct) wrote :

2011/10/22 Teester <email address hidden>:
> Just to make sure I understand:
> Using the terminology from http://zeitgeist-project.com/docs/0.7/datamodel.html#event, the Actor parameter should be the inbox address rather than application://thunderbird.desktop, in order to tie the event to the email account rather than to Thunderbird?

No, the actor is the application related to the event.

I think I'd add the account to which the message was send as a second
subject with subject_manifestation=MAILBOX.

Revision history for this message
Seif Lotfy (seif) wrote :

@RainCT or we can use it as the mailbox as the event.origin

@Teester we have a slot called event.origin (its not in the API)
in module.js<http://bazaar.launchpad.net/~markjtully/zeitgeist-datasources/thunderbird/revision/157/thunderbird/extension/chrome/content/module.js>
change
zeitgeist_event_new_full to send an extra argument origin right after
"actor"
I am not sure libzeitgeist supports this change yet I will bug one of the
devs about it. https://bugs.launchpad.net/libzeitgeist/+bug/879852

@mhr3 can u have a look please

On Sat, Oct 22, 2011 at 12:46 PM, Siegfried Gevatter <email address hidden>wrote:

> 2011/10/22 Teester <email address hidden>:
> > Just to make sure I understand:
> > Using the terminology from
> http://zeitgeist-project.com/docs/0.7/datamodel.html#event, the Actor
> parameter should be the inbox address rather than
> application://thunderbird.desktop, in order to tie the event to the email
> account rather than to Thunderbird?
>
> No, the actor is the application related to the event.
>
> I think I'd add the account to which the message was send as a second
> subject with subject_manifestation=MAILBOX.
>
> --
>
> https://code.launchpad.net/~markjtully/zeitgeist-datasources/thunderbird/+merge/79506
> Your team Zeitgeist Data-Sources Team is requested to review the proposed
> merge of lp:~markjtully/zeitgeist-datasources/thunderbird into
> lp:zeitgeist-datasources.
>

Revision history for this message
Siegfried Gevatter (rainct) wrote :

2011/10/22 Seif Lotfy <email address hidden>:
> @RainCT or we can use it as the mailbox as the event.origin
yeah

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

Mark, I hope you got notified via mail about this. Please look into this whenever you get time

Revision history for this message
Mark Tully (markjtully) wrote :

It appears to me from testing that libzeitgeist will need to be changed to accommodate event.origin. I can add several subjects to an event easily enough, however.

So, as far as I can see, there are 3 options:

1: Commit what's here at the moment and patch the extension if libzeitgeist is changed. The Firefox dataprovider (at least) will also presumably need to be patched to work with changes in libzeitgeist.

2: Wait until libzeitgeist is changed, then commit the Thunderbird dataprovider with support for event.origin

3: Change the Thunderbird dataprovider to use 2 subjects, one defining the email and one defining the mailbox the email arrives to and then patch the extension if event.origin support arrives later.

Revision history for this message
Michal Hruby (mhr3) wrote :

3) sounds like a bad idea, I'd prefer 2), but I'm not sure whether we're going to add API to libzg soon enough. Need to talk to kamstrup.

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

Hello Mark, I asked mhr3 and his response was that it is available in latest release (0.3.14)

158. By Mark Tully

Added an origin (the mailbox name) to events added to Zeitgeist
Bumped extension version to 0.2
Bumped em:maxversion in install.rdf to 17 (due out in October 2012)

Revision history for this message
Mark Tully (markjtully) wrote :

I've added support for event.origin to the branch now.

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

Works fine on my side

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'MAINTAINERS'
--- MAINTAINERS 2011-10-27 18:15:50 +0000
+++ MAINTAINERS 2012-03-21 01:55:20 +0000
@@ -6,7 +6,7 @@
6Please thank our Contributers:6Please thank our Contributers:
7* Travis Glenn Hansen - thansen7* Travis Glenn Hansen - thansen
8* Jon Nettleton - jnettlet8* Jon Nettleton - jnettlet
9* Mark Jtully - teester9* Mark Tully - teester
10* Tassilo Horn - tsdh10* Tassilo Horn - tsdh
11* Patrick M. Niedzielski11* Patrick M. Niedzielski
12* Danielle Madeley12* Danielle Madeley
1313
=== modified file 'configure.ac'
--- configure.ac 2011-10-24 01:35:00 +0000
+++ configure.ac 2012-03-21 01:55:20 +0000
@@ -63,7 +63,11 @@
63AC_MSG_NOTICE([Requested to enable all plugins: ${all_plugins}])63AC_MSG_NOTICE([Requested to enable all plugins: ${all_plugins}])
6464
65# The full list of plugins65# The full list of plugins
66<<<<<<< TREE
66allowed_plugins="bzr chrome eog geany gedit vim emacs tomboy telepathy xchat rhythmbox firefox totem-libzg firefox-36-libzg monodevelop"67allowed_plugins="bzr chrome eog geany gedit vim emacs tomboy telepathy xchat rhythmbox firefox totem-libzg firefox-36-libzg monodevelop"
68=======
69allowed_plugins="bzr chrome eog geany gedit vim emacs tomboy telepathy xchat rhythmbox firefox totem-libzg firefox-36-libzg thunderbird"
70>>>>>>> MERGE-SOURCE
67# currently disabled = "epiphany"71# currently disabled = "epiphany"
6872
69# npapi-plugin has a template Makefile.am, but don't use it directly73# npapi-plugin has a template Makefile.am, but don't use it directly
@@ -154,10 +158,10 @@
154 plugin_error_or_ignore "libzeitgeist not found"158 plugin_error_or_ignore "libzeitgeist not found"
155 continue159 continue
156 fi160 fi
157 if test "x$HAVE_GTK" = "xno"; then161 if test "x$HAVE_GTK" = "xno"; then
158 plugin_error_or_ignore "You need to install gtk development headers"162 plugin_error_or_ignore "You need to install gtk development headers"
159 continue163 continue
160 fi164 fi
161 PKG_CHECK_MODULES(GEANY, geany,165 PKG_CHECK_MODULES(GEANY, geany,
162 [HAVE_GEANY=yes], [HAVE_GEANY=no])166 [HAVE_GEANY=yes], [HAVE_GEANY=no])
163 if test "${HAVE_GEANY}" != "yes" ; then167 if test "${HAVE_GEANY}" != "yes" ; then
@@ -204,7 +208,7 @@
204 PKG_CHECK_MODULES(ZEITGEIST_SHARP, zeitgeist-sharp,208 PKG_CHECK_MODULES(ZEITGEIST_SHARP, zeitgeist-sharp,
205 ENABLE_ZEITGEIST_SHARP=yes, ENABLE_ZEITGEIST_SHARP=no)209 ENABLE_ZEITGEIST_SHARP=yes, ENABLE_ZEITGEIST_SHARP=no)
206 PKG_CHECK_MODULES(TOMBOY_ADDINS, tomboy-addins,210 PKG_CHECK_MODULES(TOMBOY_ADDINS, tomboy-addins,
207 HAS_TOMBOY_ADDINS=yes, HAS_TOMBOY_ADDINS=no)211 HAS_TOMBOY_ADDINS=yes, HAS_TOMBOY_ADDINS=no)
208 PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0, 212 PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0,
209 HAS_GTK_SHARP=yes, HAS_GTK_SHARP=no)213 HAS_GTK_SHARP=yes, HAS_GTK_SHARP=no)
210214
@@ -228,6 +232,8 @@
228 fi232 fi
229 AC_SUBST(ZEITGEIST_SHARP_LIBS)233 AC_SUBST(ZEITGEIST_SHARP_LIBS)
230 ;;234 ;;
235 thunderbird)
236 ;;
231 totem*)237 totem*)
232 if test "${with_vala}" != "yes" ; then238 if test "${with_vala}" != "yes" ; then
233 plugin_error_or_ignore "you need vala installed to use the ${plugin} plugin"239 plugin_error_or_ignore "you need vala installed to use the ${plugin} plugin"
@@ -265,7 +271,7 @@
265 plugin_error_or_ignore "${plugin} is not handled"271 plugin_error_or_ignore "${plugin} is not handled"
266 continue272 continue
267 ;;273 ;;
268 esac274 esac
269275
270 # Add the specified plugin276 # Add the specified plugin
271 used_plugins2="${used_plugins2} ${plugin}"277 used_plugins2="${used_plugins2} ${plugin}"
@@ -311,13 +317,13 @@
311 continue 2317 continue 2
312 ;;318 ;;
313 firefox)319 firefox)
314 AC_CONFIG_FILES([320 AC_CONFIG_FILES([
315 firefox/Makefile321 firefox/Makefile
316 firefox/extension/Makefile322 firefox/extension/Makefile
317 ])323 ])
318 continue 2324 continue 2
319 ;;325 ;;
320 firefox-36-libzg)326 firefox-36-libzg)
321 AC_CONFIG_FILES([327 AC_CONFIG_FILES([
322 firefox-36-libzg/Makefile328 firefox-36-libzg/Makefile
323 firefox-36-libzg/extension/Makefile329 firefox-36-libzg/extension/Makefile
@@ -329,19 +335,39 @@
329 AC_CONFIG_FILES([geany/Makefile])335 AC_CONFIG_FILES([geany/Makefile])
330 continue 2336 continue 2
331 ;;337 ;;
338<<<<<<< TREE
332 gedit)339 gedit)
340=======
341 gedit)
342>>>>>>> MERGE-SOURCE
333 AC_CONFIG_FILES([gedit/Makefile])343 AC_CONFIG_FILES([gedit/Makefile])
334 continue 2344 continue 2
335 ;;345 ;;
336 tomboy)346 tomboy)
337 AC_CONFIG_FILES([tomboy/Makefile])347 AC_CONFIG_FILES([tomboy/Makefile])
338 continue 2348 continue 2
339 ;;349 ;;
350<<<<<<< TREE
340 rhythmbox)351 rhythmbox)
352=======
353 rhythmbox)
354>>>>>>> MERGE-SOURCE
341 AC_CONFIG_FILES([rhythmbox/Makefile])355 AC_CONFIG_FILES([rhythmbox/Makefile])
342 continue 2356 continue 2
357<<<<<<< TREE
343 ;;358 ;;
344 totem-libzg)359 totem-libzg)
360=======
361 ;;
362 thunderbird)
363 AC_CONFIG_FILES([
364 thunderbird/Makefile
365 thunderbird/extension/Makefile
366 ])
367 continue 2
368 ;;
369 totem-libzg)
370>>>>>>> MERGE-SOURCE
345 AC_CONFIG_FILES([totem-libzg/Makefile])371 AC_CONFIG_FILES([totem-libzg/Makefile])
346 continue 2372 continue 2
347 ;;373 ;;
@@ -357,11 +383,19 @@
357 AC_CONFIG_FILES([emacs/Makefile])383 AC_CONFIG_FILES([emacs/Makefile])
358 continue 2384 continue 2
359 ;;385 ;;
386<<<<<<< TREE
360 telepathy)387 telepathy)
361 AC_CONFIG_FILES([telepathy/Makefile])388 AC_CONFIG_FILES([telepathy/Makefile])
362 continue 2389 continue 2
363 ;;390 ;;
364 xchat)391 xchat)
392=======
393 telepathy)
394 AC_CONFIG_FILES([telepathy/Makefile])
395 continue 2
396 ;;
397 xchat)
398>>>>>>> MERGE-SOURCE
365 AC_CONFIG_FILES([xchat/Makefile])399 AC_CONFIG_FILES([xchat/Makefile])
366 continue 2400 continue 2
367 ;;401 ;;
368402
=== modified file 'firefox/extension/chrome/content/module.js'
--- firefox/extension/chrome/content/module.js 2011-08-24 18:34:53 +0000
+++ firefox/extension/chrome/content/module.js 2012-03-21 01:55:20 +0000
@@ -1,6 +1,6 @@
1var libzeitgeist = {1var libzeitgeist = {
2 2
3 zeitgeistPath: "libzeitgeist-1.0.so",3 zeitgeistPath: "libzeitgeist-1.0.so.1",
4 4
5 lib: null,5 lib: null,
6 6
77
=== added directory 'thunderbird'
=== added file 'thunderbird/Makefile.am'
--- thunderbird/Makefile.am 1970-01-01 00:00:00 +0000
+++ thunderbird/Makefile.am 2012-03-21 01:55:20 +0000
@@ -0,0 +1,13 @@
1SUBDIRS = extension
2
3# identifier for the TB profile in which 'make install' installs this extension
4TARGET_PROFILE = *default*
5
6local-install: all
7 $(MAKE) -C extension $@
8 cp xpcom-thunderbird\@zeitgeist-project.com.xpi ~/.thunderbird/$(TARGET_PROFILE)/extensions/
9
10local-uninstall:
11 $(MAKE) -C extension $@
12 -rm -rf ~/.thunderbird/$(TARGET_PROFILE)/extensions/xpcom-thunderbird\@zeitgeist-project.com.xpi
13
014
=== added file 'thunderbird/README'
--- thunderbird/README 1970-01-01 00:00:00 +0000
+++ thunderbird/README 2012-03-21 01:55:20 +0000
@@ -0,0 +1,10 @@
1Links
2=====
3
4Useful resources:
5 https://developer.mozilla.org/en/js-ctypes/Using_js-ctypes
6
7TODO
8====
9 * add events for attachments
10 * add events for calendar if thunderbird has lightning intalled
011
=== added directory 'thunderbird/extension'
=== added file 'thunderbird/extension/Makefile.am'
--- thunderbird/extension/Makefile.am 1970-01-01 00:00:00 +0000
+++ thunderbird/extension/Makefile.am 2012-03-21 01:55:20 +0000
@@ -0,0 +1,40 @@
1SUBDIRS =
2
3extensiondir = $(datadir)/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}
4EXTENSIONS_SYMLINK = $(extensiondir)
5
6xul_extdir = $(datadir)/xul-ext-zeitgeist
7dist_xul_ext_DATA = \
8 license.txt \
9 chrome.manifest \
10 install.rdf \
11 $(NULL)
12
13contentdir = $(xul_extdir)/chrome/content
14dist_content_DATA = \
15 chrome/content/zeitgeist.xul \
16 chrome/content/zeitgeist.png \
17 chrome/content/event.js \
18 chrome/content/module.js \
19 $(NULL)
20
21prefsdir = $(xul_extdir)/defaults/preferences
22dist_prefs_DATA = \
23 defaults/preferences/zeitgeist.js \
24 $(NULL)
25
26install-exec-hook:
27 $(MKDIR_P) $(DESTDIR)$(extensiondir)
28 test -h "$(DESTDIR)$(EXTENSIONS_SYMLINK)" || $(LN_S) -f "$(DESTDIR)$(xul_extdir)" "$(DESTDIR)$(EXTENSIONS_SYMLINK)"
29
30# we want to allow also local install
31EXTENSION_CONTENT = \
32 $(dist_xul_ext_DATA) \
33 defaults \
34 chrome \
35 $(NULL)
36
37local-install: all
38 zip -r ../xpcom-thunderbird@zeitgeist-project.com.xpi $(EXTENSION_CONTENT)
39
40local-uninstall:
041
=== added directory 'thunderbird/extension/chrome'
=== added file 'thunderbird/extension/chrome.manifest'
--- thunderbird/extension/chrome.manifest 1970-01-01 00:00:00 +0000
+++ thunderbird/extension/chrome.manifest 2012-03-21 01:55:20 +0000
@@ -0,0 +1,5 @@
1content zeitgeist chrome/content/
2
3overlay chrome://messenger/content/messenger.xul chrome://zeitgeist/content/zeitgeist.xul
4
5locale zeitgeist en-US chrome/locale/en-US/
06
=== added directory 'thunderbird/extension/chrome/content'
=== added file 'thunderbird/extension/chrome/content/event.js'
--- thunderbird/extension/chrome/content/event.js 1970-01-01 00:00:00 +0000
+++ thunderbird/extension/chrome/content/event.js 2012-03-21 01:55:20 +0000
@@ -0,0 +1,85 @@
1var ZeitgeistNewMailListener = {
2
3 init: function() {
4 var notificationService = Components.classes["@mozilla.org/messenger/msgnotificationservice;1"]
5 .getService(Components.interfaces.nsIMsgFolderNotificationService);
6 notificationService.addListener(this, notificationService.msgAdded);
7 },
8
9 msgAdded: function(aMsgHdr) {
10
11 let folder = aMsgHdr.folder;
12
13 // Only add to zeitgeist if the folder the message is in is flagged as an inbox ("0x00001000")
14 if (folder.flags & "0x00001000") {
15
16 let hdrParser = Components.classes["@mozilla.org/messenger/headerparser;1"]
17 .getService(Components.interfaces.nsIMsgHeaderParser);
18
19 let uri = folder.getUriForMsg(aMsgHdr);
20 let author = hdrParser.extractHeaderAddressName(aMsgHdr.mime2DecodedAuthor);
21 let address = hdrParser.extractHeaderAddressMailboxes(aMsgHdr.author);
22 let message_subject = aMsgHdr.mime2DecodedSubject
23 let account = aMsgHdr.folder.server.prettyName
24
25 let subject = libzeitgeist.zeitgeist_subject_new_full( uri,
26 "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Email",
27 "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#MailboxDataObject",
28 "message/rfc822",
29 address,
30 author + " - " + message_subject,
31 "net");
32
33 let event = libzeitgeist.zeitgeist_event_new_full( "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#ReceiveEvent",
34 "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#SystemNotification",
35 "application://thunderbird.desktop",
36 subject,
37 null);
38
39 libzeitgeist.zeitgeist_event_set_origin( event,
40 account)
41
42 libzeitgeist.zeitgeist_log_insert_events_no_reply(libzeitgeist.log, event, null);
43
44 //Log event in Thunderbird's error console if logging pref is true
45 var prefs = Components.classes["@mozilla.org/preferences-service;1"]
46 .getService(Components.interfaces.nsIPrefBranch);
47 if (prefs.getBoolPref("extensions.zeitgeist.log")) {
48 zeitgeist.debug("Event added to zeitgeist:" +
49 "\n\t\tEvent interpretation: EVENT_INTERPRETATION.RECEIVE_EVENT" +
50 "\n\t\tEvent manifestation: EVENT_MANIFESTATION.SYSTEM_NOTIFICATION" +
51 "\n\t\tActor: application://thunderbird.desktop" +
52 "\n\t\tOrigin: " + account +
53 "\n\t\tSubject:\n\t\t\tSubject interpretation: MESSAGE.EMAIL" +
54 "\n\t\t\tSubject manifestation: MAILBOX_DATA_OBJECT" +
55 "\n\t\t\turl: " + uri +
56 "\n\t\t\tmimetype: message/rfc822" +
57 "\n\t\t\torigin: " + address +
58 "\n\t\t\ttitle: " + author + " - " + message_subject +
59 "\n\t\t\tstorage: net");
60 }
61 }
62 },
63};
64
65var zeitgeist = {
66 init: function() {
67 ZeitgeistNewMailListener.init();
68 libzeitgeist.init();
69 },
70
71 uninit: function() {
72
73 libzeitgeist.shutdown();
74 },
75
76 debug: function (aMessage) {
77 var consoleService = Components.classes["@mozilla.org/consoleservice;1"]
78 .getService(Components.interfaces.nsIConsoleService);
79 consoleService.logStringMessage("Zeitgeist Extension (" + new Date() + " ):\n\t" + aMessage);
80 window.dump("Zeitgeist Extension: (" + new Date() + " ):\n\t" + aMessage + "\n");
81 }
82};
83
84window.addEventListener("load", function() {zeitgeist.init()}, false);
85window.addEventListener("unload", function() {zeitgeist.uninit()}, false);
086
=== added file 'thunderbird/extension/chrome/content/module.js'
--- thunderbird/extension/chrome/content/module.js 1970-01-01 00:00:00 +0000
+++ thunderbird/extension/chrome/content/module.js 2012-03-21 01:55:20 +0000
@@ -0,0 +1,62 @@
1var libzeitgeist = {
2
3 zeitgeistPath: "libzeitgeist-1.0.so.1",
4
5 lib: null,
6
7 init: function() {
8
9 Components.utils.import("resource://gre/modules/ctypes.jsm");
10
11 this.lib = ctypes.open(this.zeitgeistPath);
12
13 //Structures
14 this._ZeitgeistEvent = new ctypes.StructType("_ZeitgeistEvent");
15 this._ZeitgeistSubject = new ctypes.StructType("_ZeitgeistSubject");
16 this._ZeitgeistLog = new ctypes.StructType("_ZeitgeistLog");
17
18 //Methods
19 this.zeitgeist_event_new_full = this.lib.declare( "zeitgeist_event_new_full",
20 ctypes.default_abi,
21 ctypes.char.ptr,
22 ctypes.char.ptr, //interpretation
23 ctypes.char.ptr, //manifestation
24 ctypes.char.ptr, //actor
25 ctypes.char.ptr, //subject
26 ctypes.voidptr_t);
27
28 this.zeitgeist_event_set_origin = this.lib.declare( "zeitgeist_event_set_origin",
29 ctypes.default_abi,
30 ctypes.voidptr_t,
31 ctypes.char.ptr, //event
32 ctypes.char.ptr); //origin
33
34 this.zeitgeist_subject_new_full = this.lib.declare( "zeitgeist_subject_new_full",
35 ctypes.default_abi,
36 ctypes.char.ptr,
37 ctypes.char.ptr, //uri
38 ctypes.char.ptr, //interpretation
39 ctypes.char.ptr, //manfestation
40 ctypes.char.ptr, //mimetype
41 ctypes.char.ptr, //origin
42 ctypes.char.ptr, //text
43 ctypes.char.ptr); //storage
44
45 this.zeitgeist_log_new = this.lib.declare( "zeitgeist_log_new",
46 ctypes.default_abi,
47 ctypes.char.ptr );
48
49 this.zeitgeist_log_insert_events_no_reply = this.lib.declare( "zeitgeist_log_insert_events_no_reply",
50 ctypes.default_abi,
51 ctypes.void_t.ptr,
52 ctypes.char.ptr, //log
53 ctypes.char.ptr, //event
54 ctypes.voidptr_t);
55
56 this.log = libzeitgeist.zeitgeist_log_new();
57 },
58
59 shutdown: function() {
60 this.lib.close();
61 }
62};
063
=== added file 'thunderbird/extension/chrome/content/zeitgeist.png'
1Binary files thunderbird/extension/chrome/content/zeitgeist.png 1970-01-01 00:00:00 +0000 and thunderbird/extension/chrome/content/zeitgeist.png 2012-03-21 01:55:20 +0000 differ64Binary files thunderbird/extension/chrome/content/zeitgeist.png 1970-01-01 00:00:00 +0000 and thunderbird/extension/chrome/content/zeitgeist.png 2012-03-21 01:55:20 +0000 differ
=== added file 'thunderbird/extension/chrome/content/zeitgeist.xul'
--- thunderbird/extension/chrome/content/zeitgeist.xul 1970-01-01 00:00:00 +0000
+++ thunderbird/extension/chrome/content/zeitgeist.xul 2012-03-21 01:55:20 +0000
@@ -0,0 +1,7 @@
1<?xml version="1.0"?>
2<overlay id="zeitgeist" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
3
4 <script type="application/javascript" src="chrome://zeitgeist/content/module.js"></script>
5 <script type="application/javascript" src="chrome://zeitgeist/content/event.js"></script>
6
7</overlay>
08
=== added directory 'thunderbird/extension/chrome/locale'
=== added directory 'thunderbird/extension/chrome/locale/en-US'
=== added directory 'thunderbird/extension/defaults'
=== added directory 'thunderbird/extension/defaults/preferences'
=== added file 'thunderbird/extension/defaults/preferences/prefs.js'
--- thunderbird/extension/defaults/preferences/prefs.js 1970-01-01 00:00:00 +0000
+++ thunderbird/extension/defaults/preferences/prefs.js 2012-03-21 01:55:20 +0000
@@ -0,0 +1,2 @@
1pref("extensions.zeitgeist.log" , false);
2
03
=== added file 'thunderbird/extension/install.rdf'
--- thunderbird/extension/install.rdf 1970-01-01 00:00:00 +0000
+++ thunderbird/extension/install.rdf 2012-03-21 01:55:20 +0000
@@ -0,0 +1,28 @@
1<?xml version="1.0"?>
2
3<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4 xmlns:em="http://www.mozilla.org/2004/em-rdf#">
5
6 <Description about="urn:mozilla:install-manifest">
7 <em:id>thunderbird@zeitgeist-project.com</em:id>
8 <em:version>0.2</em:version>
9 <em:type>2</em:type>
10
11 <!-- Target Application this extension can install into,
12 with minimum and maximum supported versions. -->
13 <em:targetApplication>
14 <Description>
15 <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
16 <em:minVersion>5.0</em:minVersion>
17 <em:maxVersion>17.*</em:maxVersion>
18 </Description>
19 </em:targetApplication>
20
21 <!-- Front End MetaData -->
22 <em:name>Zeitgeist</em:name>
23 <em:description>Dataprovider for the zeitgeist framework</em:description>
24 <em:creator>Mark Tully</em:creator>
25 <em:homepageURL>http://launchpad.net/zeitgeist</em:homepageURL>
26 <em:iconURL>chrome://zeitgeist/content/zeitgeist.png</em:iconURL>
27 </Description>
28</RDF>
029
=== added file 'thunderbird/extension/license.txt'
--- thunderbird/extension/license.txt 1970-01-01 00:00:00 +0000
+++ thunderbird/extension/license.txt 2012-03-21 01:55:20 +0000
@@ -0,0 +1,166 @@
1 GNU LESSER GENERAL PUBLIC LICENSE
2 Version 3, 29 June 2007
3
4 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8
9 This version of the GNU Lesser General Public License incorporates
10the terms and conditions of version 3 of the GNU General Public
11License, supplemented by the additional permissions listed below.
12
13 0. Additional Definitions.
14
15 As used herein, "this License" refers to version 3 of the GNU Lesser
16General Public License, and the "GNU GPL" refers to version 3 of the GNU
17General Public License.
18
19 "The Library" refers to a covered work governed by this License,
20other than an Application or a Combined Work as defined below.
21
22 An "Application" is any work that makes use of an interface provided
23by the Library, but which is not otherwise based on the Library.
24Defining a subclass of a class defined by the Library is deemed a mode
25of using an interface provided by the Library.
26
27 A "Combined Work" is a work produced by combining or linking an
28Application with the Library. The particular version of the Library
29with which the Combined Work was made is also called the "Linked
30Version".
31
32 The "Minimal Corresponding Source" for a Combined Work means the
33Corresponding Source for the Combined Work, excluding any source code
34for portions of the Combined Work that, considered in isolation, are
35based on the Application, and not on the Linked Version.
36
37 The "Corresponding Application Code" for a Combined Work means the
38object code and/or source code for the Application, including any data
39and utility programs needed for reproducing the Combined Work from the
40Application, but excluding the System Libraries of the Combined Work.
41
42 1. Exception to Section 3 of the GNU GPL.
43
44 You may convey a covered work under sections 3 and 4 of this License
45without being bound by section 3 of the GNU GPL.
46
47 2. Conveying Modified Versions.
48
49 If you modify a copy of the Library, and, in your modifications, a
50facility refers to a function or data to be supplied by an Application
51that uses the facility (other than as an argument passed when the
52facility is invoked), then you may convey a copy of the modified
53version:
54
55 a) under this License, provided that you make a good faith effort to
56 ensure that, in the event an Application does not supply the
57 function or data, the facility still operates, and performs
58 whatever part of its purpose remains meaningful, or
59
60 b) under the GNU GPL, with none of the additional permissions of
61 this License applicable to that copy.
62
63 3. Object Code Incorporating Material from Library Header Files.
64
65 The object code form of an Application may incorporate material from
66a header file that is part of the Library. You may convey such object
67code under terms of your choice, provided that, if the incorporated
68material is not limited to numerical parameters, data structure
69layouts and accessors, or small macros, inline functions and templates
70(ten or fewer lines in length), you do both of the following:
71
72 a) Give prominent notice with each copy of the object code that the
73 Library is used in it and that the Library and its use are
74 covered by this License.
75
76 b) Accompany the object code with a copy of the GNU GPL and this license
77 document.
78
79 4. Combined Works.
80
81 You may convey a Combined Work under terms of your choice that,
82taken together, effectively do not restrict modification of the
83portions of the Library contained in the Combined Work and reverse
84engineering for debugging such modifications, if you also do each of
85the following:
86
87 a) Give prominent notice with each copy of the Combined Work that
88 the Library is used in it and that the Library and its use are
89 covered by this License.
90
91 b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 document.
93
94 c) For a Combined Work that displays copyright notices during
95 execution, include the copyright notice for the Library among
96 these notices, as well as a reference directing the user to the
97 copies of the GNU GPL and this license document.
98
99 d) Do one of the following:
100
101 0) Convey the Minimal Corresponding Source under the terms of this
102 License, and the Corresponding Application Code in a form
103 suitable for, and under terms that permit, the user to
104 recombine or relink the Application with a modified version of
105 the Linked Version to produce a modified Combined Work, in the
106 manner specified by section 6 of the GNU GPL for conveying
107 Corresponding Source.
108
109 1) Use a suitable shared library mechanism for linking with the
110 Library. A suitable mechanism is one that (a) uses at run time
111 a copy of the Library already present on the user's computer
112 system, and (b) will operate properly with a modified version
113 of the Library that is interface-compatible with the Linked
114 Version.
115
116 e) Provide Installation Information, but only if you would otherwise
117 be required to provide such information under section 6 of the
118 GNU GPL, and only to the extent that such information is
119 necessary to install and execute a modified version of the
120 Combined Work produced by recombining or relinking the
121 Application with a modified version of the Linked Version. (If
122 you use option 4d0, the Installation Information must accompany
123 the Minimal Corresponding Source and Corresponding Application
124 Code. If you use option 4d1, you must provide the Installation
125 Information in the manner specified by section 6 of the GNU GPL
126 for conveying Corresponding Source.)
127
128 5. Combined Libraries.
129
130 You may place library facilities that are a work based on the
131Library side by side in a single library together with other library
132facilities that are not Applications and are not covered by this
133License, and convey such a combined library under terms of your
134choice, if you do both of the following:
135
136 a) Accompany the combined library with a copy of the same work based
137 on the Library, uncombined with any other library facilities,
138 conveyed under the terms of this License.
139
140 b) Give prominent notice with the combined library that part of it
141 is a work based on the Library, and explaining where to find the
142 accompanying uncombined form of the same work.
143
144 6. Revised Versions of the GNU Lesser General Public License.
145
146 The Free Software Foundation may publish revised and/or new versions
147of the GNU Lesser General Public License from time to time. Such new
148versions will be similar in spirit to the present version, but may
149differ in detail to address new problems or concerns.
150
151 Each version is given a distinguishing version number. If the
152Library as you received it specifies that a certain numbered version
153of the GNU Lesser General Public License "or any later version"
154applies to it, you have the option of following the terms and
155conditions either of that published version or of any later version
156published by the Free Software Foundation. If the Library as you
157received it does not specify a version number of the GNU Lesser
158General Public License, you may choose any version of the GNU Lesser
159General Public License ever published by the Free Software Foundation.
160
161 If the Library as you received it specifies that a proxy can decide
162whether future versions of the GNU Lesser General Public License shall
163apply, that proxy's public statement of acceptance of any version is
164permanent authorization for you to choose that version for the
165Library.
166

Subscribers

People subscribed via source and target branches