Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Ideas | Propositions Modify the function "cairo_dock_play_sound"
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Ideas | Propositions

Subjects Author Language Messages Last message
[Locked] Modify the function "cairo_dock_play_sound"
inspirra Russian 3 SQP [Read]
02 October 2010 à 13:42

inspirra, Friday 01 October 2010 à 23:33


Subscription date : 17 September 2010
Messages : 23
All modern Linux distributions use PulseAudio.
Therefore, propose to add GUI configuration for the function "cairo_dock_play_sound".
Or, must use "paplay" priority (with option "--client-name=cairo-dock").

I temporarily made following patch:
--- src/gldit/cairo-dock-applet-facility.c.orig 2010-06-10 18:15:35.000000000 +0400
+++ src/gldit/cairo-dock-applet-facility.c 2010-06-10 18:15:56.000000000 +0400
@@ -319,4 +319,4 @@
gchar *cSoundCommand = NULL;
- if (g_file_test ("/usr/bin/play", G_FILE_TEST_EXISTS))
- cSoundCommand = g_strdup_printf("play \"%s\"", cSoundPath);
+ if (g_file_test ("/usr/bin/cairo-paplay", G_FILE_TEST_EXISTS))
+ cSoundCommand = g_strdup_printf("cairo-paplay \"%s\"", cSoundPath);


Sorry, I'm not a programmer. And I do not know how to add options "--client-name=cairo-dock" directly into your code.

/usr/bin/cairo-paplay:
#!/bin/sh
/usr/bin/paplay --client-name=cairo-dock "$@"

SQP, Saturday 02 October 2010 à 10:31


Subscription date : 03 July 2010
Messages : 1081
I personally wouldn't force anyone using pulse, but I don't even have play installed on maverick
I'd suggest something like aplay as default, and option for paplay or other (phonon would be prefered on kde, don't know how that work, there's some oss4 lovers...)
On gnome we could use the selected backend. Multimedia selector is hidden in menu but still in full config (hidden too damn) : gstreamer-properties

(don't even know how to trigger sound with the dock)

matttbe, Saturday 02 October 2010 à 12:23


Subscription date : 24 January 2009
Messages : 12573
Why not:
if (g_file_test ("/usr/bin/paplay"G_FILE_TEST_EXISTS)) 
    
cSoundCommand g_strdup_printf("paplay --client-name=cairo-dock \"%s\""cSoundPath);
else if (
g_file_test ("/usr/bin/aplay"G_FILE_TEST_EXISTS)) 
    
cSoundCommand g_strdup_printf("aplay \"%s\""cSoundPath);
else if (
g_file_test ("/usr/bin/play"G_FILE_TEST_EXISTS)) 
    
cSoundCommand g_strdup_printf("play \"%s\""cSoundPath); 

SQP, Saturday 02 October 2010 à 13:42


Subscription date : 03 July 2010
Messages : 1081
"sounds" ok to me

Ideas | Propositions

Subjects Author Language Messages Last message
[Locked] Modify the function "cairo_dock_play_sound"
inspirra Russian 3 SQP [Read]
02 October 2010 à 13:42


Glx-Dock / Cairo-Dock List of forums Ideas | Propositions Modify the function "cairo_dock_play_sound" Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.