Live Wire

Back from FOSDEM 2007, after a little detour in Helsinki.

I’ve opened a bug for the places support in GtkFileChooser: #413076. Attached to it you’ll find a patch; it should be taken with a grain of salt: it’s still a work in progress, but implements the main features and shows how the new API should work. In short, if your application need to use some predefined, user visible folder and you want to provide a link inside the file chooser, you need to create your bookmark file, drop it somewhere and call:

gtk_file_chooser_add_shortcuts_from_file (file_chooser
                                          "/path/to/bookmarks.xbel",
                                          NULL);

We’d need an intltool able to recognise the title (and eventually description) markup elements of the bookmark files and merge them into the translation pool, so that you can have the places already localised (the machinery is already in place in the patch). I’ll keep working on it, and finish up the implementation of the automagic places that applications can install in a common place and have it appear in every file chooser, based on the group or application name used in the bookmark.

I’m also working again on the Application class (the wiki page is really out of date with the current iteration I have been workin on – I’ll update it as soon as possible); now that the session management code has landed in libegg I will add hooks into the application class to have it do The Right Thing®. Other than an application class, GTK+ really needs a desktop abstraction – a simple API to know whether we are connected to a network, or to control the screensaver, or to launch the default browser/mailer/editor/whatever. For that to work properly we should really have a working configuration system like GConf moved below GTK+. I did some prototype API for a configuration engine, mostly stealing^Wtaking inspiration from alexl work on GVFS (which already has a nice and clean API); will probably have something usable soon.

Gtk+ 2.9.0 released

Finally, the first development release of GTK+ (codenamed The Magic Project Ridley aka libgnome sucks release by a developer whose name won’t be disclosed in this blog) has been finally sealed by Matthias Clasen yesterday, after battling with make distcheck.

There is so much goodness in this release that I’ll just wait for Kris to make a blog about it, and link the NEWS file and let you see the enormous work that has been done in the past nine months. So, find the contributor nearest to you and hug him (or buy him a beer); to help this hugging (and beer buying) procedure, here’s a list:

Ævar Arnfjörð Bjarmason, Akkana Peck, Alexander Larsson, Alexander Nedotuskov, Alex Graveley, Anders Carlsson, Andrei Yurkevich, Andrew Conkling, Andrew S. Dixon, Arjan van de Ven, Arnaud Charlet, Bastien Nocera, Behdad Esfahbod, Benedikt Meurer, Benjamin Berg, Benjamin Otte, Benoît Carpentier, Bodo-Merle Sandor, Bogdan Nicula, Brad Taylor, Calum Benson, Carlos Garnacho Parro, Carl Worth, Chris Lahey, Chris Lord, Christian Kirbach, Christian Lohmaier, Christian Neumair, Christian Persch, Christian Stimming, Christophe Belle, Claudio Saavedra, Clytie Siddall, Colin Walters, Cory Dodt, Coverity, Crispin Flowerday, Damien Carbery, Damon Chaplin, Daniel Drake, Daniel Kasak, Dan Winship, Dave Andreoli, David Baron, David Trowbridge, Davyd Madeley, Denis Auroux, Dennis Cranston, Diego González, Dom Lachowicz, Donald Straney, Duncan Coutts, Ed Catmur, Elie De Brauwer, Emmanuel Rodriguez, Eric Cazeaux, Evert Verhellen, Francisco Javier F. Serrador, Frederic Croszat, Guilherme de S. Pastore, Guillaume Cottenceau, Gustavo Carneiro, Hamed Malek, Hans Breuer, Havoc Pennington, Hylke van der Schaaf, Ian McDonald, Itai Bar-Haim, Jaap A. Haitsma, James Su, Jean-Yves Lefort, Jens Granseuer, Jeremy Cook, Jody Goldberg, Joe Marcus Clarke, Joe Wreschnig, Johan Dahlin, John Cupitt, John Ehresman, John Finlay, John Palmieri, John Spray, Jonathan Blandford, Jorn Baayen, JP Rosevaar, Jürg Billeter, Kalle Vahlmann, Kathy Fernandez, Kazuki Iwamoto, Kean Johnston, Kjartan Maraas, Kristian Rietveld, Larry Ewing, Leena Gunda, Lillian Angel, Li Yuan, Lorenzo Gil Sanchez, Maciej Katafiasz, Magnus Bergmann, Markku Vire, Mark McLoughlin, Marko Anastasov, Mark Wielaard, Mart Raudsepp, Martyn Russell, Mathias Hasselmann, Matthijs Douze, Maxim Udushlivy, Michael Emmel, Michael Natterer, Milosz Derezynski, Morten Welinder, Murray Cumming, Nickolay V. Shmyrev, Nicolas Setton, Niklas Knutsson, Olexiy Avramchenko, Owen Taylor, Paolo Borelli, Paolo Maggi, Peter Breitenlohner, Peter Harvey, Peter Lund, Peter Zelezny, Philip Langdale, Raphael Slinckx, Ray Strode, Richard Hult, Robert Ögren, Rodney Dawes, Ross Burton, Ryan Lovett, Sadrul Habib Chowdhury, Sebastien Bacher, Søren Sandmann, Stanislav Brabec, Stefan Kost, Stephane Chauveau, Steve Chaplin, Steve Frécinaux, Sven Herzberg, Sven Neumann, Thomas Broyer, Thomas Fitzsimmons, Thomas Klausner, Thomas Leonard, Tim Evans, Tim Janik, Todd Berman, Tommi Komulainen, Torbjörn Andersson, Tor Lillqvist (and his Evil Twin), Torsten Schoenfeld, Tze’ela Hebron, Vincent Untz, Wolfgang Thaller, Wouter Bolsterlee, Yang Hong, Yevgen Muntyan, Yong Wang. And, obviously, our fearless maintainer Matthias Clasen.

Kudos to all of them.

Developement Trunk

Shamed by kris’ post about the state of Project Ridley stuff, I resumed the recent-files hacking after the gnome-utils/gnome-dictionary crazy run that occupied my nights in the last three months or so.

RecentManager and RecentChooser

I already did a review of the documentation and the code last month, but I stopped before committing because I wanted to make a major overhauling of the sorting and filtering stuff – namely, the removal of the sorting and filtering functions from the RecentManager class and the implementation of custom sorting inside the RecentChooser class.

At first, I designed the RecentManager object as the only proxy for every operation on the list of recently used resources; then I designed the RecentChooser interface, in order to create a uniform API to display and access the data provided by the RecentManager. It all worked without much pain: you would instantiate a RecentChooser implementation and it would create its own manager. This, though, led to an unclean separation between model and viewer in an otherwise MVC approach. I went back to the design table, and severed each direct usage of the RecentManager API that would affect the list displayed by the RecentChooser from within the various implementations. This approach allowed the usage of the same RecentManager instance inside N RecentChooser implementations – allowing, also, to have a single, session-based, RecentManager instance shared between various processes (not coded, until we can integrate all the stuff inside GTK). The only downside in this operation was due to code replication between the RecentChooser and the RecentManager; thus, like I already did move the filtering stuff out inside the RecentFilter object, I moved the sorting stuff inside the RecentChooser API (and its implementations) and out of the RecentManager – which now just manages the list, and it’s used just to add, look up and remove resources from the list it holds.

More informations on the wiki: here and here.

LinkButton

I also did some work on the LinkButton, the widget that should supercede GnomeHref from libgnomeui. Attached to bug #314808 there’s the current implementation.

More informations on the wiki: here.