The power of open source

I’m just giving the finishing touches to my wxWidgets + SQLite + CppUnit personal project, all written in standard C++, and compiling in Mac, Windows and Linux as well. And I had the opportunity to see how good is to be able to change the source code of a library when you need it.

The problem was that the wxCalendarCtrl control that comes with wxWidgets 2.6.3 (see note below) did not render properly on Windows. In all the other platforms it looked OK, but in Windows it just looked like this:

As you can see, the wxSpinCtrl used to change the years is next to unusable. I looked around the API documentation to see if there was some method to change that width, but it turns out that there is not such thing. But… since wxWidgets is open-source, I just opened the \src\generic\calctrl.cpp file and looked inside to see how the whole thing was built: I found that the size of the spinner depends on that of the months wxComboBox control, and then what I did is just to force the size of the combo box to a fixed size of 100 pixels, instead of the default value “wxDefaultCoord” (I did the change in line 275, in the constructor of the wxComboBox called “m_comboMonth”).

I rebuilt the library, and then I rebuilt my own project linking to the patched code:

Voilà! No need to dig into proprietary support website that seldom bring an answer, or to wait for a service pack or patch or anything else that will correct the thing. With open source software, I can just go and fix things myself, whenever I need it. And for free.

Note: By the way, I’m using version 2.6.3 since I want the code to compile under Mac OS X 10.2 “Jaguar” as well (as far as I saw, 2.7 is not compatible with Jaguar any more). I will post more screenshots, as well as the whole source code, very soon!

Derniere video de Brad Will

Ce video est une compilation des dernieres images prises par Bradley Will, journaliste d’Indymedia (http://indymedia.org) dans l’etat d’Oaxaca, dans le Mexique.

La video, integralement en espagnol, dure 17 minutes, et montre tout d’abord les actions de resistance du peuple d’Oaxaca contre le gouvernement, qui fait disparaitre des gens et etablit un etat de guerre civile dans cet etat du centre-sud-ouest du pays. Corruption, misere, terrorisme d’etat, disparition de personnes, censure, persecution politique, rien ne manque.

Vers la fin, le cameraman Brad Will est touche par une balle et meurt peu de temps apres. La camera continue de tourner. Les images sont dures mais je crois qu’il faut savoir ce qui se passe ailleurs.

Ames sensibles s’abstenir. Pour ceux qui sont interesses et qui se sentent concernes, merci de redistribuer.

http://video.google.com/videoplay?docid=-3664350201077731285

Technical news of the day

As usual, a small resume of interesting stuff going on:

And on my side, I’m preparing a nice cross-platform project using wxWidgets, SQLite and CppUnit, written on C++ and compiling and running in Mac OS X, Ubuntu Dapper and Windows 2000/XP.

Java on Ubuntu for PowerPC

Ubuntu bundles a great application, Synaptic Package Manager, which makes an excellent job to manage the dependencies, installation and desinstallation of applications of any kind in the Ubuntu platform. This usually works for all the platforms supported by Ubuntu, including the PowerPC architecture, which is the one that concerns my good old G3 iBook.

As I said, it usually works. Particularly for Java, the installation via Synaptic Package Manager does not work, since Sun does not provide Java, in any version, for the Linux/PowerPC platform (there is a Java version for Linux, but it targets the x86 architecture). And since Java is not an open source project (yet), it becomes harder to know what to do.

So this is where this page comes in: it provides all the information needed to install Java in a PowerPC-based Mac, from the 603 to the G5. It even provides the instructions to configure Firefox, Mozilla and Opera to use your newly installed Java installation properly!

Update Xfce in Ubuntu Dapper

Just found this article about how to update the Xfce desktop with the latest version, 4.4rc1, released earlier last September.

The problems I had with following those instructions in my PowerPC G3 iBook were:

  1. I could not have the Trash icon working in the panels
  2. The “Thunar” version that kept appearing was version 0.3, not the latest 0.4.

As such, I rebuilt Thunar following these instructions, and then I applied this quick fix found here:

  • cd /usr/bin
  • sudo mv Thunar Thunar.backup
  • sudo mv thunar thunar.backup
  • sudo ln -s /usr/local/bin/Thunar Thunar
  • sudo ln -s Thunar thunar

This did it! I now have the latest version of Xfce and Thunar running in my computer.

Xubuntu

Since I discovered Ubuntu I’ve been trying to install it in different hardware, in different computers, even in virtual machines, and I just love it. It installs without problems, I can add and remove the coolest productivity and development tools fast and easy, everything is ready to use, and it just feels great.

My latest discovery is Xubuntu. It is basically the same as Ubuntu and Kubuntu, but with the Xfce desktop instead or GNOME or KDE. The nice thing is that I have not had to uninstall Ubuntu: I just typed “sudo apt-get install xubuntu-desktop” at the command prompt, and 10 minutes later I logged into Xubuntu.

The net result is a sooooooo much faster user experience.

The main machine where I have Xubuntu installed is a rather old G3 iBook that I bought in 2002, with only 256 MB of RAM and 30 GB of hard disk. The machine runs like a charm, but of course with GNOME and KDE there’s a lot of swapping. As soon as I installed the Xfce desktop, things went really faster. I can only recommend using Xubuntu in old machines: the base system only takes 90 MB of RAM, and applications load faster than in GNOME or KDE.

I just love (X)(K)(Ed)Ubuntu :)