Archive for August, 2008

Mailody meets Marble

As you might have figured, I’m trying to integrate with every technology that is Hot. Today I decided to sidetrack from the Nepomuk integration and do another one in the meanwhile.

[img_assist|nid=248|title=|desc=|link=node|align=center|width=515|height=431]

What you see in the image is the route of a mail message. You can see the origin of a mail in the map and how the message got to you…

It analyses the headers, grabs the ip-addresses of the mail servers, translates them to coordinates, start the MarbleWidget and draws the items on there.

Currently I use the unmaintained http://netgeo.caida.org-site to give me the coordinates which belong to an ip-address. I’m not so happy with that. I rather use the geoclue system, but I don’t really understand how to implement it.

Maybe someone has an idea what I can use best for the conversion from ip-address to location? Find me on freenode irc, nickname toma or leave a message.

Mailody and Akonadi meet Nepomuk

Isn’t it great to have two Pilars of KDE in the subject? Anyway, this weekend I started working on Nepomuk. The end goals is simple, I want to tag my e-mails and have the possibility to enter a comment about them.

First step was trying to get some basic interaction with Nepomuk. They seem to change their API a lot, so it took some time and help from DanielW on #nepomuk-kde to get that working. Afer that I went looking for a widget that could be used for this.

I actually like the complete widget that Dolphin uses, but that’s not available in KDE libs and I did not want to go throught the process of doing the move. Luckely Nepomuk provides a tiny widget which can be integrated easily and does not take to much space in Mailody. I’ve put it in a QDockWidget so people can put it at the bottom of the complete Mailody window if they need more space. It now looks like this:

[img_assist|nid=245|title=Mailody meets Nepomuk|desc=|link=none|align=center|width=453|height=166]

On the right there is a little arrow and if you press it, you see a popup with all existing tags so you can easily assign them to a message. Whenever you switch between messages the area shows the assigned tags.

Assigning is fun, but you need to be able to do anything with it, right? Right. Of course you can use the kioslave to search for the tag and get all the messages which are tagged with that tag, but that should also be possible in Mailody.

So I implemented an Akonadi Resource for it. Similar to an IMAP resource that shows you the folders of an account, the Nepomuk tags resource shows you a folder for each tag, selecting it brings out all the messages that belong to that tag. It looks like this:

[img_assist|nid=246|title=Akonadi meets Nepomuk|desc=|link=none|align=center|width=391|height=224]

To get it to work Volker Krause implemented the LinkJob and UnlinkJob in the Akonadi KDE library. This makes it possible to link certain messages from there original folders to a virtual folder. The server was already prepared to handle this kind of Virtual Folders. What would we do without Volker?

Conclusion is that it is now possible to tag your emails with any tag you like and retrieve the messages with a certain tag just as easily. Next step is to implement the possibility to make comments on mails.

Mailody now uses WebKit

After Akademy I decided that Webkit is a thing to explore more. The presentation and demonstration of Simon Hausmann at Akademy was very impressive. Not only by the capabilities QtWebKit, but also by the way the way they are working.

So, I decided to switch from KHTMLPart for displaying the messages to QWebView. Not everyone knows that even plain text messages are converted to HTML messages before they are shown. This is needed to make links clickable for example. KMail does that too btw. But of course simple text messages converted to html render perfectly in almost any html-rendering-engine.

The port to QtWebKit went pretty smoothly, although there are one or two small problems left. The rendering for most of my testcases / messages seems pretty much identical. Although I found some mails that look that much better now, for example:

[img_assist|nid=242|title=HTMLPart|desc=|link=node|align=center|width=100|height=51]

[img_assist|nid=243|title=QWebView|desc=|link=node|align=center|width=100|height=59]

But I don’t hold KHTMLPart responsible for that, html mails send by some clients are ugly and made without any kind of specs in mind. btw, while debugging I used the Arora browser, that’s actually a very nice browser.

N810 and OpenStreetMap and toma

Yesterday I ordered a holder for the N810 for my car. That way I can use it for route navigation. Until now I have used a proprietary device with proprietary maps and proprietary navigation software on it. Well those days are numbered. Time for a change.

[img_assist|nid=238|title=Double Navigation|desc=|link=node|align=right|width=100|height=75]

The N810 comes with a Map application by default which works quite well, I used it to drive back from Akademy, so I could compare both. To prove it, here is a picture of my cockpit on the way back.

That default Map-application crashed a couple of times on the way back, but that was before I flashed the N810 to the new firmware, I’ve to try if it still does that, but my test period is over now.The price is 99 euro for 3 year license, that’s not to bad, but still proprietary as far as I can see.

Then I ran into Maemo Mapper. It’s an application for the N810 which you can use to make tracks with the build in gps. I had some trouble getting the GPS to work, but finally read somewhere to get it to work, you need to set it in the settings as a bluetooth gps and don’t fill in anything in the address box behind it. And that worked.

That small application also has the possibility to show the maps of OpenStreetMap and to follow a track if you load that previously. Of course it will fetch the maps from OpenStreetMap, so if you are making a journey you better look at the map when you still have an internet connection at home, because during the route you have to have those maps present. Unless you have a unlimited data connection on your mobile phone, in that case you can fetch the maps from OSM as you are driving the track.

Maemo Mapper can not calculate the track for you, you have to go to a website and indicate the start and endpoint, then it will provide you a file which you can use in the application. Of course you can use the browser on the maemo for that, so it’s hardly a problem for me.

This way I now have route navigation in my car based on OSM maps. O boy, that feels good.

[img_assist|nid=239|title=N810 and Marble|desc=|link=node|align=right|width=100|height=79]

I noticed that the map of Culemborg was a bit outdated in some area’s. So I jumped in my car and drove around (must have looked silly that I was constantly driving into roads with dead ends, turning around and going to the next dead end road). Maemo Mapper saves the track and that track can be opened in Marble without problems.

After that I uploaded the same file to the OSM-site. After 30 minutes the track was added to the database and I could draw the actual roads on the map. I read it takes another few days before it gets published on the main map. It feels so good to actually being able to adjust the map to reality instead of waiting on a vendor to do it, and if you are unlucky, you have to buy a new device to ever see it.

Conclusion: Maemo Mapper rocks, Marble rocks, OSM rocks, N810 rocks. It’s good when stuff comes together.

Mailody embedded in Kontact

[img_assist|nid=236|title=mailody-in-kontact|desc=|link=node|align=left|width=200|height=148]

Here you can see Mailody embedded in Kontact. A wish a lot of people have asked me in the past few years. So there you have it.

There still is a lot of work to do, mainly due to kontact bugs and limitation I think though:
- I’ve no idea how the statusbar is supposed to work in the embedded mode, so I just disabled most of it.
- I’ve no idea why my Mailody toolbar isn’t visible in Kontact.
- I’ve no idea why QDockWidgets in my composer (separate QMainWindow) do not work at all or why the toolbar isn’t visible.
- I’ve no idea why I’ve all those duplicates in the left bar

So, if you are interested in fixing one of those, let me know ;-) I’m happy the initial integration is there though.