Sunday, 20 May 2007

Yay, less code

GTK+ now contains the old BaconVolume widget, called GtkVolumeButton. I hope we get GTK+ 2.12 for GNOME 2.20, so that Rhythmbox, Sound-juicer, Totem, Banshee, etc. can use the widget without cut'n'pasting bacon-volume.[ch].

Useless screenshot (you have to try it to believe it)

Many thanks to Ronald for writing the widget in the first place, and Matthias and Christian for the code reviews.


Philip said...

Excellent! Good work guys. :-)

Stephan said...

No f#ck#ng way...

What the hell does a VOLUME-slider doe inside the GNU Image Manipulation Program Tool Kit?! (Please note the image manipulation part)

There used to be a sensible library for this kind of stuff, called libgnomeui.

At this rate, other projects (like Xfce) are forced to migrate to 'yet another graphical toolkit (tm)', because the foundation on which the project rests is crumbling. For once it won't be because the library is unmaintained, but because it is over-maintained...

Sometimes i wonder if the GTK-developers are found with a luxury best described like: 'hey... it works, now what do we do?!' and start adding random features to spend the day.

hadess said...

The volume widget is less than 200 lines of code, including comments, and relies upon the GtkScaleButton that people have expressed interest in using as a zoom control, in applications like F-Spot.

Given the number of applications using the copy-paste version of the BaconVolume (about 10 at my last count), I'm pretty sure that this widget will be useful.

libgnomeui isn't a dumping-ground for half-assed widgets any more than gtk+. libgnomeui is dying anyway, most of the important parts of it (like session management, printing, etc.) are moving to GTK+ and co. because so many applications use it.

Oh, and GTK+ hasn't been for the sole use of the GIMP for about 10 years, since GNOME was launched.

Anonymous said...

Ah, goodie. I love less duplicate code!

I'm doubly happy because I've always hated this widget, and now somebody can fix it once for everybody. :-)