[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

Filed under: General — Thomas @ 13:32

2003-12-31
13:32

GNOME

Been hacking on a piece of desktop integration - sound profiles for GNOME. The idea is very simple. A lot of applications need to convert audio (sound-juicer, nautilus in the future, gnome-sound-recorder, ...) Right now, they have to ask media-specific details like sample rate, format, and so on. And they all do it in their own way.

The thing I'm doing is pretty similar to something I remember seeing in Windows in a more basic form; some way of specifying audio profiles. For example, the human name would be "FM Radio Quality", and behind it would be a profile that would convert to Ogg/Vorbis, at 32000 KHz, with a certain quality setting.

The point would be that these profiles could be stored in GConf and managed centrally. Applications could also use a default setting for operations if they want to. This way, Sound-Juicer would just present you with a drop-down box of human-readable encoding profiles. When dragging cd tracks out of Nautilus, or right-clicking on tracks in Nautilus, they could be converted using those profiles.

Taking a leaf out of hadess's book, I started to look around for bits I could steal. The GNOME panel has some notion of profiles, but there is something very complicated going on there. So I decided to steal from gnome-terminal, which has the added bonus of having lots of code by Havoc, which gives me the feeling I can trust the implementation :)

Work is progressing nicely, and I'm learning a few new tricks. Right now, however, I've come to a dead end. I need opinions. I have a .c/.h combination for the profile edit dialog. There's one function that will instantiate a new dialog to edit a profile. The GtkDialog is in a glade XML file. the GapProfileEdit GObject is a subclass of GtkDialog and is just the dialog with a few private bits for internal management. So far, everything is great.

However, combining GObjects that are extensions of GtkWidgets with Glade presents me with a problem. Here are my options:

  • don't get the actual GtkDialog from glade, but get the contents of that dialog and add them to the custom GapProfileEdit dialog. The drawback is that things that are specified in glade (response buttons and so on) will be missing, because creating a GtkDialog instantiates those too apparently.
  • I empty the created GtkDialog somehow and add the glade stuff in it

Neither really feel right - there should be some way to instantiate a custom widget from an xml file. I suppose I could try and see if there is some way I can override the parent's instantiator and have it instantiate from glade instead.

Sounds

I had someone read in pieces of sound for GNOME, GStreamer and Dave/Dina. Here are some samples:

The first two pointed out to me that esound isn't very good at this on my laptop. The sound breaks up too much because the machine is doing too much stuff at those times.

Interested in hearing opinions - I wouldn't mind having a voice theme for the desktop.

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URL

Sorry, the comment form is closed at this time.

picture