»
S
I
D
E
B
A
R
«
Writing a nice API: comments needed
Apr 26th, 2009 by Pierre-Luc Beaudoin

In the race to the 0.3 development release, we are reviewing the API to see it is nice to use, bindable and most of all intuitive to g* coders.  But sometimes, it is hard to find out how to do it well: comments on this particular issue would be appreciated.

ChamplainView is the map view that displays the map.  It needs a ChamplainMapSource from which it gets the map.  There are specialised objects that inherit from ChamplainMapSource such as ChamplainNetworkMapSource and the upcoming ChamplainLocalMapSource (or what ever it will be named by the end of the SoC).

champlainNetworkMapSource* champlain_network_map_source_new_full (const gchar *name,
    const gchar *license,
    const gchar *license_uri,
    guint min_zoom,
    guint map_zoom,
    guint tile_size,
    ChamplainMapProjection projection,
    const gchar *uri_format);

As you don’t want to fill all this information each time you create a new map source, libchamplain currently provides helper constructions:

ChamplainMapSource * champlain_map_source_new_osm_mapnik (void);
ChamplainMapSource * champlain_map_source_new_osm_cyclemap (void);
ChamplainMapSource * champlain_map_source_new_osm_osmarender (void);
ChamplainMapSource * champlain_map_source_new_oam (void);
ChamplainMapSource * champlain_map_source_new_mff_relief (void);

We think it could be interesting to replace these by a Factory to which you pass an enum value to get the constructed ChamplainMapSource.  You would probably be able to add your own map source constructor (as you can implement your own map sources).  You would probably be able to get the list of available map source too.

The question is: is this overkill? the best way to do it? is there something similar in glib or gtk to get inspired from? We base most of the API decisions by looking at other Gtk+ widgets, but this particular object seems to be a different case.

We are asking for your ideas.

Flashing BIOS without floppy drive, cd-rom and no Windows
Apr 25th, 2009 by Pierre-Luc Beaudoin

In this blog post, I’d like to explain how I flashed my BIOS without a floppy drive, a cd-rom or a Microsoft Windows installation so that other users can find quickly how to do it.

First, you need a USB key.

Then, you use unetbootin to flash a copy of FreeDos to your key.  You can use the built-in FreeDos distribution.

Download the BIOS flashing utility from your motherboard manufacturer and put it on the USB key.

Reboot your computer and force it to boot from the USB key.

On the FreeDos boot menu, select Live CD.

At the A:\> prompt, enter b: then Enter.

You will now have access to the files contained on your USB key.  Follow your manufaturer’s recommanded steps to flash your BIOS.

My free (as in beer) trial of last.fm is over
Apr 22nd, 2009 by Pierre-Luc Beaudoin

I was working listening to last.fm as every day when suddenly the music stopped and the email notification icon appeared.  “Your free trial to Last.fm Radio is about to end.” said the email.  “It is already over” though I.

Who wants to give me a one-year subscription to last.fm? It is only 27 € (if you pay in US$).  My username is  plbeaudoin. :)

I am also open to suggestion for a free (as in speech) service that works as well as last.fm, has content and has built-in support in apps…

Update: Thanks to Benjamin Podszun for his gift! :) On a site note: last.fm, while I understand that the concept of subscription is new for you, the page describing the status of your subscription is 1) very hidden, 2) lacks details.

libchamplain has got a SoC project
Apr 20th, 2009 by Pierre-Luc Beaudoin

There will be a Google Summer of Code project for libchamplain - your Clutter based Map Widget for your Clutter or Gtk+ based applications. This project will be realized by Simon Wenner.  He will be working on getting the map rendered locally (using OpenStreetMap xml data) as opposed to downloading the pre-rendered tiles as libchamplain currently does.  At the end of the summer, libchamplain will support both for best flexibility.

This functionality means a lot of possibilities for libchamplain: better accessibility, smaller bandwidth needs, smaller cache footprint, more context data and finally themable maps.  These can be very useful if you are running on different platforms such as Maemo 5 or a desktop: bigger fonts, more contrast, tango colors!

(oh and by the way, this is the new default markers: more on them in a later post)

Unfortunately, another very interestant SoC idea didn’t make it to selected list: a glib based OSM data API.  That would have made it very useful to access the downloaded data.  But hey, that will be for later!  Thanks to all the students that submitted a project idea on libchamplain :-)

»  Substance: WordPress   »  Style: Ahren Ahimsa