Monday, May 24, 2010

Official start of Google Summer of Code is today..

It's May 24th! Official date to begin coding for Google Summer of Code. Of course I already started coding before the official start date because I have to manage the summer of code work with my final semester of study in university.
What I have done so far

-Submitted a patch to get Tabs sync working on weave (see: https://bugzilla.mozilla.org/show_bug.cgi?id=567583)
-Wrote a separate extension to get/set read/unread status of mailnews (working on feeds currently) messages
-Started work on weave engine for mailnews sync (however I still haven't managed to install the engine into weave so that still has to be done)

Mid term evaluations are due July 12 by which time I should have the new mailnews engine functional for both upsync and down sync. I will be posting weekly updates on this blog so stay tuned:)


Saturday, May 22, 2010

Getting Weave (Firefox) Sync to work on Seamonkey (and maybe Thunderbird too!)

This post is about the development environment I am using to get the weave sync (more about the new name change later!) addon to work for Seamonkey. I have setup the development environment so that I can code the extension from one central location (my eclipse IDE) and test any changes made immediately in Firefox, Seamonkey and Thunderbird all at once. Before doing this, making sure the code worked for all three applications was a nightmare, but I finally figured out the right way to do it.

I am doing all the development from ubuntu (jaunty) and using eclipse as my IDE. I have xulrunner installed on ubuntu and xulbooster plugin installed in eclipse. I also have the jsEclipse plugin installed in eclipse for easy editing of javascript files. I followed the build instructions for weave available at https://wiki.mozilla.org/Labs/Weave/Building to get the latest weave source and build it. Build didn't work the first time around though, and I had to tweak the Makefile a bit to get it to work. Getting the code to install in all Firefox, Seamonkey and Thunderbird applications was done by creating extension proxies (https://developer.mozilla.org/en/Setting_up_extension_development_environment#Firefox_extension_proxy_file). Once all that was done I only had to restart each application to view the changes I had made in the code. If any changes are made to the .in files (install.rdf.in and chrome.manifest.in) however I had to run make again.

Name Change

For marketing reasons Weave Sync will soon be renamed as Firefox Sync (from version 1.3 onwards). This will make things very confusing when the addon is adopted to Seamonkey and Thunderbird. Users will then have Firefox Sync installed as an addon on Seamonkey or Thunderbird and that just doesn't make much sense namewise. The name change has not been officially announced yet. I got to know about it from my project mentor's blog( http://home.kairo.at/blog/2010-05/weave_is_firefox_is_seamonkey_is_confusi ). Regardless of the name change however I will continue my project to get tabs and mailnews sync functionality working for Seamonkey. There are plans to integrate Weave to the Mozilla platform soon (like Personas) so all naming issues will disappear once that is done.

Tuesday, May 18, 2010

Tabs sync for Seamonkey with Weave Sync add-on

Oops, I'm late in submitting my weekly report! Things didn't go as planned for this week. I found that the tabs sync engine of weave that previously worked on SM in weave version 1.1 no longer worked for SM in weave 1.2.3. This is due to the changes brought on to weave in version 1.2 along with the new overlay which included the about:weave-tabs page for viewing 'Tabs From Other Computers'. The syncing functionality stopped working because now tabs were being accessed from the browser session instead of using gBrowser global variable. The browser session is accessed using the nsISessionStore interface. The XPCOM url for accessing nsISessionStore in SM is different from that of FX (SM: "@mozilla.org/suite/sessionstore;1" , FX: "@mozilla.org/browser/sessionstore;1"). Therefore the util.js file in weave modules had to be changed to get tabs sync working again in weave for version 1.2.3. Some other javascript files also required changes (FX specific code like gBrowser.loadOneTab and gBrowser.loadTabs had to be replaced.

Once the url was resolved tab sync was again fuctional in SM. The next task was to get the 'Tabs from other computers' menu displayed with a proper overlay and have the about: weave-tabs page correctly display the list of tabs from other computers.

I have written an experimental xpi for testing weave tabs sync on SM. I just tested this on the new Seamonkey 2.1 Alpha 1 which has just been released (http://www.seamonkey-project.org/releases/seamonkey2.1a1/). The xpi can be downloaded from here https://sourceforge.net/projects/tabs-for-sm-wv/files/.

This xpi has tabs sync working for SM. Next step is to report a bug in BMO and submit my patch to it. I still have one issue left to resolve though. It appears the code only syncs tabs between different SM instances. FX tabs for example do not show up on SM. This needs fixing.

It seems the biggest issue in getting weave sync to work on SM is that every time weave code is changed it is written specifically for FX so there is a chance SM fucntionality will be affected.

Sunday, May 9, 2010

Listening to mailnews property changes

Last week was bit busy with job interviews and completing final year project work so I had to limit the time I had to work on my SM-Weave project. Hope to catch up on more work this week.

Here's what I did last week..

I setup a listener for mail/news item property changes. Now I can capture any read/unread status changes made in the UI as well as other property changes such as tagging a mailnews item. I will use this listener in the Tracker class of my weavesync engine which I have just started work on.

The updated code with the listener is in the svn.

The same listener code also works in Thunderbird and I will continue testing in both SM and TB to try to have the final sync engine working on both apps.

For this week I need to somehow catch NeilAway (who is always away;) ) on SM IRC and discuss the best place to put the weave menu item 'Tabs From Other Computers'. Then get it approved by KaiRo (IRC nick of my project mentor) and write the overlay and possibly have it submitted as a patch for weave.

Also hope to get my first experimental weave engine working before next week.