Le lundi 11 août 2008 à 19:18 +0200, Frederic Crozat a écrit :
> Hi,
> 
> I'm trying to create a sound theme for next Mandriva Linux release and
> I'm having some issues with libcanberra 0.6 :
> 
> I've created a .desktop file containing :
> [Sound Theme]
> Name=Ia Ora
> Directories=stereo
> Inherits=freedesktop
> 
> [stereo]
> OutputProfile=stereo
> 
> 
> If I set Inherits=freedesktop or no Inherists, sound event not present
> in my theme but present in "freedesktop" theme are not located (I'm only
> changing login and logout sound for my tests) and for instance,
> canberra-gtk-play --id=bell  returns "failed to play sound: file or data
> not found" (I know the warning has disappeared in git but the issue
> remains).
> 
> If I set Inherits=foobar (where foobar doesn't exist), inheritance is
> correctly handled.
> 
> I tried to decipher sound-theme-spec.c code to understand why
> inheritance doesn't seem to be working but I failed for now. From my
> debugging session, it seems freedesktop fallback theme is completely
> ignored when libcanberra is testing all the various themes directory,
> despite the fact freedesktop theme was correctly loaded by
> load_theme_dir.
> 
> Help would be really appreciated.

I've digged a little more in libcanberra code and it seems the directory
lists (used to search sound files) for a theme is only containing
directory name for the various output profile, without the origin theme.
This is ok as long as theme inheritance is not involved. Unfortunately,
currently, inheritance is handled by simpling adding output profile from
parent theme to the child theme, but since the name of the theme is not
stored in the directory list, you end up in trying to add output profile
directories for the child theme.

For instance, if theme foo is :

[Sound Theme]
Name=foo
Directories=stereo
Inherits=freedesktop
 
[stereo]
OutputProfile=stereo

foo directory list is "stereo"
and when inheritance for freedesktop is being added, "stereo" is being
added again to the list (so it is discarded automatically, because it is
already in the list).

-- 
Frederic Crozat <[EMAIL PROTECTED]>
Mandriva

_______________________________________________
libcanberra-discuss mailing list
[email protected]
https://tango.0pointer.de/mailman/listinfo/libcanberra-discuss

Reply via email to