Gnome-utils 2.13.95 – “Escape Velocity”

Seems like I forgot to announce the new release of gnome-utils; actually, this week-end I had a bad cold (I’m not completely cured, though), and standing in front of my laptop made my eyes sore after two or three minutes.

Anyway, the last release before March 15th is out. It should have been 2.13.94 (and it’s advertised as such inside the README and the NEWS files of the tarball, but who reads those files anyway?), but there has been some misunderstanding between the working copy I checked out from CVS in order to build the release and me. Well, it’s not the first time I fuck up something in the release process – and I’ve got the feeling that it won’t be the last.

The release contains just a couple of last minute fixes, like the handling of the transparency of the applet when the panel is set to a solid color and low opacity; also, the applet’s window can be closed using the Esc key.

Go get it and try it out.

FOSDEM 2006

Next week-end I’ll be in Brussels, at this year’s FOSDEM.

I wasn’t sure whether I’d be able to go or not – late flight booking and I had to check at two hostels before actually getting some place to sleep. I mostly plan to attend the GNOME track, especially Philip‘s talk on design patterns using GObject and Kristian‘s talk on Project Ridley; also, the X.org track and the embedded Linux track promise to be really interesting.

Gnome-utils 2.13.92 – Gnome-utils vs. Bugzilla

This evening, before going to dinner with Marta at my parent’s, I did the 2.13.92 release of gnome-utils, codenamed Gnome-utils versus Bugzilla.

Since we have approached the feature freeze, the UI freeze and now the string freeze, it’s mostly a “fix and clean up” release; a couple of nasty bugs were fixed, though, like the not translatable name of the screenshot file name in the screenshot application, or the dictionary applet’s window flicker when toggled. Also, thanks to Paolo Borelli (and his constant checking out of each commit inside the entire CVS using Bonsai) the log viewer preferences code has been cleaned up a bit, making it more solid and reliable.

Unless new crashers or blocker bugs are found, I think this will be the last release before 2.14.0 hits the tarballs; so, please test it and report any bug you should find as soon as possible, so that we can make Gnome-utils better before the next stable release!

Third-graders

This is a comment I left on Philip’s blog in response to Ross’ blog.

question: what are we, third graders that we must do all this touchy-feely, “we must not make comments” stuff?

ross’ comment was a bit on the edge, but its his blog, and he has any rights to write that the player sucks; the other blog post from joe is the more relevant: the entire free software/open source thingie works because we have copyright and because we have peer pressure. the “author” of listen stole code, because it didn’t simply lift it and put it into his project: he also removed the copyright notices. I copy code from many projects (as far as the license enables me to do it safely) but I leave at least a note saying from where I took the code and who’s the author. if a big company did the same thing we would all be jumping and screaming around.

what strikes me the most is that, instead of integrating stuff by talking to the various projects and – at most – forking some code base, the guy just went lifting code, collating stuff like a frankenstein movie, and then releasing the resulting “monster” without even a mention of the other projects. and all these people say: “oh, the media player situation demands it” or: “oh, amarok is such a fine player that we need a poor man’s clone for gnome” – basically insulting every author of the other media players around, insulting an author that want his contribution to the f/oss community recognized as he well should, and justifying the copyright infringement for the sake of having their pretty little clone.

these are energy stoppers. If I was a developer of another media player I would simply cease all my work instantly, out of such blatant ingratitude.

After having read some of the comments on Ross’ blog, and after the querelle about the NLD10 stuff that happened on the desktop-devel-list, I’m wondering if the major problem of the Gnome community is its being made of third graders, where one must not say bad things about someone else’s work because of a “we are all special”-kinda-like agreement that, it seems, you implicitly sign when you get an account.

Come on! If I think that a projects sucks I’ll write that it sucks, ferchrissake! I expect none the less from my peers, and I expect none the less from the many people that is well above my skills. If I wrote a piece of software and someone comes along saying that it sucks because of this and that, then I’ll respond or I’ll say fuck dude, you are right and will change it, or I’ll say yep, but it’s my project and I will go on. Gracefully taking criticism for your work is a valuable indicator that you are not a child anymore.

If you cannot cope with this, then please don’t even begin coding; because peer pressure and peer review are what makes F/OSS such a great endeavour.

Transfer

Marta got accepted for a MSc at the LSE, and she’d really like to move to Good Ol’ London – with me coming along.

So, in the next months I’ll have to find a gig in the UK: time to update my resumé.

Gnome-utils 2.13.91 – Ain’t That a Brown Paper Bag?

The first second β-release of the Gnome-utils package is out!

Fixes for crashers, better error handling, font settings and much more!

Go get it!

Update

Gnome-utils 2.13.90 had a glitch in the build system that resulted in the absence of the translations database in the package; thus I’ve just released the 2.13.91 version of gnome-utils, Ain’t that a brown paper bag, which fixes the glitch.

Porting

I’ve just updated the Recent Files and Bookmarks page on Gnome’s wiki: some (long due) clean ups and typo checking, but I’ve also added a porting guide, showing how to use the RecentManager and RecentChooser objects: addition, look up, display, sorting and filtering. If you are using the EggRecent code in your applications, go check it out.

As soon as Gnome 2.14 hits the mirrors, I’ll finally deprecate the EggRecent code – and won’t have to deal with the horrible EggRecentViewGtk widget anymore. Really, if there is a reason I wanted to implement the recenly used documents stuff, it surely must be to get rid of that code.

Roadmap

With the incoming release of Gnome 2.13.90, we are approaching the 2.14 version of Gnome. Now, features are frozen, and soon even changing the UI will require at least two approvals (one from the GUP and one from the release team); so, while we still have a full month for fixing bugs, I think it’s time for some little thinking and planning ahead about the next release cycle of gnome-utils.

The biggest job for the 2.15/2.16 cycle will be the cleaning up of the System Log Viewer. The code-base is a bit messy, but thanks to the great work of Vincent we’ve avoided the Design by Accretion Syndrome; still, even a white space consistency patch would be in order: some lines have a (horrid) three-space indentation, while some other have a tab indentation. So, I’d move everything to a tab-based indentation. The other “cosmetic” clean up is the removal of the dead and/or obsolete calls, the usage of a naming scheme for the classes and functions, and a switch to typed objects (e.g. boxed types and GObject-based types). I’ve already begun some attempt at cleaning up the code base, but this will most likely require to land in a new branch as soon as we release gnome-utils 2.14.

The other job is the implementation of a couple of transport methods for Dictionary, namely the HTTP-based transport, which should allow the connection to a web-based dictionary service; the file-based transport, which should allow the querying of locally available dictionaries; the StarDict transport, similar to the file-based one, but including a C parser for the StarDict format. Regarding this format, I’ve had a look at the C++ library and I seriously think that before releasing some software under an open source licence, a serious check on the code style should be in order; I don’t like C++, I think it’s inherently inefficient and messy, but something like this:

sd-lib-cpp
whitespace horror in lib.cpp

should really be closed source software – in order to avoid programmers throwing themselves out of the window after having had a look at it.

One more job would be the re-working of the gfloppy utility, with the addition of the ability to format every removable media (floppies, USB sticks, CD/DVD RW, etc). This will require some updates inside HAL – namely, the volume formatting and partitioning support. I think that, while floppies are becoming more and more rare these days, gfloppy might be reborn into something very useful again.

Finally, the last job for the 2.15/2.16 cycle should be the update of the Screenshot utility. First of all, I’d like to close bug #325708, but the whole bug list should be triaged and updated.

Obviously, I can’t promise that everything will be ready in time for 2.16. As always, patches that will make this happen faster are welcome.

Broken

The next release of gnome-utils, 2.13.90, will make libgdict adhere to the API/ABI freeze, even if it’s not part of the Gnome Developer Platform but only of the Desktop.

The freeze had been in effect since the last release (January 18th), and I planned not to change libgdict API; unfortunately, when writing the support for the document_font_name GConf key, which was introduced in Gnome 2.12 and that should be honoured by any application showing arbitrarily long texts to the user, I noticed that a call to gtk_widget_modify_font to a GtkContainer does not propagate to the containers’s children. The widget the Dictionary uses to display the text of the definitions is, in fact, a composite widget (a GtkVBox) as it needs to hold the text display and the find bar; the inner widgets are held inside a private structure, and are not visible to the outside.

If I wanted to work around this, I would have written something like this function inside the code of the libgdict users:

static void
gtk_container_modify_font_children (GtkContainer *container,
				    const gchar  *font_name)
{
  GList *children, *l;
  PangoFontDescription *font_desc;

  g_return_if_fail (GTK_IS_CONTAINER (container));

  font_desc = NULL;
  if (font_name)
    {
      font_desc = pango_font_description_from_string (font_name);
      g_return_if_fail (font_desc != NULL);
    }

  children = gtk_container_get_children (container);
  for (l = children; l != NULL; l = l->next)
     {
        GtkWidget *widget = GTK_WIDGET (l->data);

	gtk_widget_modify_font (widget, font_desc);
     }

  g_list_free (children);

  if (font_desc)
    pango_font_description_free (font_desc);
}

But it would not have worked; I wanted to change the font of the GtkTextView widget inside the GdictDefbox, while the function above would have changed font for all internal widgets – including the find pane.

Assigning a name to the GtkTextView widget, say “text-display”, by using the gtk_widget_set_name function, and changing the code of the inner loop to something like this:

...
  for (l = children; l != NULL; l = l->next)
     {
        GtkWidget *widget = GTK_WIDGET (l->data);
	const gchar *name = gtk_widget_get_name (widget);

	if (strcmp (name, "text-display") == 0)
          gtk_widget_modify_font (widget, font_desc);
     }
...

I would have avoided the API breakage inside libgdict – but I would also have created a performance bottleneck, since I transformed a constant time operation into a linear time one (from an assignment to a list walk) – plus, I don’t know what happens into gtk_widget_modify_font; also, I would have created a documentation issue, since I now would have to document the widget’s name and hope that nobody would ever have the urge to change the GdictDefbox font – at least, not after having had lunch.

Giving a name to the inner children of a composite widget is always a good practice – it makes handling these kind of situations easier; but between an hackish approach and a breakage of an API freeze, I would rather choose the latter. Hacks tend to get sticky, and you get a design by accretion if you let them stick around enough.

So, I opten for adding a new property to the GdictDefbox widget, called font-name, and its two accessor functions:

G_CONST_RETURN gchar *gdict_defbox_get_font_name (GdictDefbox *defbox);
void                  gdict_defbox_set_font_name (GdictDefbox *defbox,
						  const gchar *font_name);

Which are just proxies for the gtk_widget_modify_font function. Since nobody uses libgdict (it’s been out there only for the folks using Ubuntu or jhbuild), the breakage is really minimal; nevertheless, I feel a bit guilty for not having tested this stuff before, in time for the freeze.