Ok, one problem more…
My applet works almost like a charm… BUT
I have a function defined to change the Icons of the control-Buttons in FvwmButton.
The function is:
DestroyFunc CHANGE_ICON
AddToFunc CHANGE_ICON
+ I SendToModule FvwmShelf ChangeButton $0 Icon $1
And the call from the Script is:
[code]
Set $MPC = {exec /usr/bin/mpc -h }$mpd_host{ -p }$mpd_port
Set $cmd = $MPC{ status}
Set $cmd = $cmd{|awk ‘/volume/’|sed -e ‘s/volume: *//’ -e ‘s/%//’}
Set $volume = (GetOutput $cmd 1 1)
If $volume == 0 Then
Do {CHANGE_ICON mpdVol audio-volume-muted.png}
If $volume > 0 Then
Do {CHANGE_ICON mpdVol audio-volume-low.png}
If $volume >= 33 Then
Do {CHANGE_ICON mpdVol audio-volume-medium.png}
If $volume >= 66 Then
Do {CHANGE_ICON mpdVol audio-volume-high.png}[/code]
And the Line for the MPD-Volume-Button in FvwmButton is:
*FvwmShelf: (4x2 Frame 0, Id "mpdVol", Icon stock_volume.png Action (Mouse 4) `Exec exec /usr/bin/mpc -h $mpd_host -p $mpd_port volume +5 > /dev/null`, \
Action (Mouse 5) `Exec exec /usr/bin/mpc -h $mpd_host -p $mpd_port volume -5 > /dev/null`)
When i change the volume from localhost, the icon changes correctly.
But when i change the volume from remote, i get a error-message on the computer, where the volume should be changed.
[fvwm][ComplexFunction]: <<ERROR>>
Grab failed in function CHANGE_ICON mpp player_play.png, unable to execute immediate action
But the volume changes correct…
And in the .xsession-error is also this error:
[code]** (gnome-alsamixer:21241): WARNING **: gam_toggle_get_state (). No idea what to
do for mixer element “Line Jack Mode”!
** (gnome-alsamixer:21241): WARNING **: gam_toggle_get_state (). No idea what to
do for mixer element “IEC958 Playback Source”!
** (gnome-alsamixer:21241): WARNING **: gam_toggle_get_state (). No idea what to
do for mixer element “Input Source”!
** (gnome-alsamixer:21241): WARNING **: gam_toggle_get_state (). No idea what to
do for mixer element “Input Source”![/code]
How i said, the volume changes correctly, only the icon doesn’t get changed from remote. On the remote-host, where the applet is also running, the icon changes correct also.
scientific