Postings by Mathias in August 2007

Recently I needed spell checking support for some cairo (and Pango) based canvas widget. Should be easy to pick, considering there are several aproaches to implement spell checking for GTK+ widgets, like gtkspell or libsexy. Unfortunatly those pretty libraries have the fault of focusing on one single widget only. So equiped with the power of Vala I wrote some small generic spell checking library for GTK+. Instead of directly attaching to some widget this library uses a simple interface for adding spellcheck support:

Update: Forgot to demonstrate the multi-lingual mode. Updated the screen cast. It works similiar to Evolution and gtkspell3: A word only fails if it isn't found in any dictionary and some of the menu entries are modified to contain - in violation to the HIG, but in lack of a better idea - submenus. Also forgot to mention future plans: For text views it should be possible to selectivly disable spell checking for read-only or code sections. Also it should be possible to retreive a section's language by inspecting Pango attributes of the text. Well, and finally I have to properly package the beast.

Unfortunatly this is not integrated into upstream automake yet - simply because I am not very skilled in reading other people's Perl code - but the vala-support script itself is written in Perl already, so it should be easy for some skilled Perl hacker to merge that code into automake.

So the summer of code has reached its hands-down phasis and few minutes before the deadline finally height-for-width support has landed:

Proper support for rotated labels with ellipses also has been backported to GTK+:

.

Well, but end of Summer of Code doesn't mean end of hacking: Have to teach GtkHBox and GtkTable the size-for-allocation trick. The icon view could profit from exposing such information. Well, and finally the extended layout branch has to be merged into GTK+ trunk, which currently is feature frozen.

Guess this Summer of Code was quite some success for me: Implemented some useful features and finally managed to fully join the GNOME community.

I didn't provide a status report for some time, so what happend in extended layout world?

I stopped to waste time with baseline alignment and switched to spreading natural size support over GTK+. As a result of this effort many widgets and one cell renderer are providing and interpreting natural size information now: GtkAlignment, GtkBin, GtkButton, GtkCellRendererText, GtkCellView, GtkFrame, GtkHBox, GtkLabel, GtkSocket, GtkTable and GtkVBox.

When working on GtkVBox and vertical natural size aware alignment in GtkTable I realized GtkLabel doesn't support ellipses when rotated. So I implemented ellipsizing support for rotated labels. This code only works properly for angles being multiples of 90° so far (first screencast), but I managed to write some test program getting ellipses right for any angle (second screencast) - just have to adopt the code to the label.

Completly unrelated Teemu Ikonen reminded me of my common file format chooser project. So I moved the code from Bugzilla to libegg. Finally I also figured out how to automatically integrate that widget with file choosers. So I added file filter synchronization and automatic file extension appending (third screencast). The code still is quite rough. Icons should be retrieved via the MIME type API of GVFS. Nevertheless it would be nice if interested parties would verify if it works for them in principle. Change requests should be posted in Bug 440431.