From: <dom...@us...> - 2014-10-28 17:18:09
|
Revision: 654 http://sourceforge.net/p/fvwm-crystal/code/654 Author: dominique_libre Date: 2014-10-28 17:18:07 +0000 (Tue, 28 Oct 2014) Log Message: ----------- functions/Mixer, functions/Tooltip, functions/LoadCommonStuffs: made the tool tip function to work, load it and use it for the volume key bindings. Modified Paths: -------------- ChangeLog fvwm/components/functions/LoadCommonStuffs fvwm/components/functions/Mixer fvwm/components/functions/Tooltip Modified: ChangeLog =================================================================== --- ChangeLog 2014-10-28 17:12:55 UTC (rev 653) +++ ChangeLog 2014-10-28 17:18:07 UTC (rev 654) @@ -11,6 +11,8 @@ file must be provided that describe the edited file. apps/DesktopIcons: Add support for arbitrary directories. functions/Fullscreen: Updated comments. + functions/Mixer, functions/Tooltip, functions/LoadCommonStuffs: made the tool tip function + to work, load it and use it for the volume key bindings. vendredi 17 octobre 2014 script PrefVars: Add the full screen by default preference into the editor. Modified: fvwm/components/functions/LoadCommonStuffs =================================================================== --- fvwm/components/functions/LoadCommonStuffs 2014-10-28 17:12:55 UTC (rev 653) +++ fvwm/components/functions/LoadCommonStuffs 2014-10-28 17:18:07 UTC (rev 654) @@ -30,6 +30,7 @@ Include components/functions/BlingBling Include components/functions/Fvwm-Crystal-Menu Include components/functions/CheckForFiles +Include components/functions/Tooltip Append preferences/Startup # Preferred applications {{{2 @@ -64,4 +65,3 @@ # Notification area {{{2 Include components/functions/NotificationAreaManager-$[infostore.NotificationAreaManager] Include preferences/NotificationArea-Width - Modified: fvwm/components/functions/Mixer =================================================================== --- fvwm/components/functions/Mixer 2014-10-28 17:12:55 UTC (rev 653) +++ fvwm/components/functions/Mixer 2014-10-28 17:18:07 UTC (rev 654) @@ -29,6 +29,7 @@ # # At that time and for what I know, only amixer do have a native dB support. # This is a must have feature for a professional audio mixer. +# Amixer do have tooltip support now; it show the master volume. # Preferences {{{1 # If there is no selected mixer, load the default @@ -97,6 +98,8 @@ xmms2) echo Nop ;; \\ *) echo Nop ;; \\ esac' ++ I PipeRead 'if [ $[infostore.Mixer] = amixer ]; then \\ + echo Volume-Tooltip; echo Deschedule $[schedule.last]; echo Schedule 1500 Kill-FvwmTooltip Volume; fi' # Change-Volume-Down <value> {{{2 DestroyFunc Change-Volume-Down @@ -113,6 +116,8 @@ xmms2) echo Nop ;; \\ *) echo Nop ;; \\ esac' ++ I PipeRead 'if [ $[infostore.Mixer] = amixer ]; then \\ + echo Volume-Tooltip; echo Deschedule $[schedule.last]; echo Schedule 1500 Kill-FvwmTooltip Volume; fi' # Mixer volume toggle mute {{{2 # Selected player will toggle the pause. @@ -219,8 +224,11 @@ # echo "InfoStoreAdd CurrentVolume $tmpval2"' # Show the volume tooltip -#DestroyFunc Volume-Tooltip -#AddToFunc Volume-Tooltip +DestroyFunc Volume-Tooltip +AddToFunc Volume-Tooltip ++ I PipeRead 'tmpval=`amixer -c $[infostore.SoundCard] get $[infostore.VolControl]`; tmpval2=`echo $tmpval|sed -e "s:\\(.*\\)\\(\\[.*dB]\\):\\2:" -e "s:\\[::" -e "s:\\]::"`; echo "InfoStoreAdd CurrentVolume $tmpval2"' ++ I PipeRead 'echo "Fvwm-Tooltip Volume \\"Main volume\\" $[infostore.CurrentVolume] +$(($[vp.width]/2))-$(($[vp.height]/2)) 20 750"' +#+ I Schedule 1000 KillModule FvwmButtons FvwmButtons-Tooltip-Volume #+ I PointerWindow (FvwmButtons-Media1) FvwmButtons-Tooltip "Volume" "Main volume" "$[infostore.CurentVolume]" "+4-40" "20" "750" # Wrapper function Modified: fvwm/components/functions/Tooltip =================================================================== --- fvwm/components/functions/Tooltip 2014-10-28 17:12:55 UTC (rev 653) +++ fvwm/components/functions/Tooltip 2014-10-28 17:18:07 UTC (rev 654) @@ -15,8 +15,8 @@ # + I PointerWindow (FvwmButtons-Music) FvwmButtons-Tooltip Volume "Main volume" "$[CurrentVolume]" "+4-40" 20 1000 # will show a tooltip when the pointer is entering on FvwmButtons-Music. -DestroyFunc FvwmButtons-Tooltip -AddToFunc FvwmButtons-Tooltip +DestroyFunc Fvwm-Tooltip +AddToFunc Fvwm-Tooltip + I KillModule FvwmButtons-Tooltip-$0 + I DestroyModuleConfig FvwmButtons-Tooltip-$0: * + I *FvwmButtons-Tooltip-$0: Geometry $3 @@ -30,6 +30,17 @@ + I *FvwmButtons-Tooltip-$0: (1x1, Id "Tooltip-$0", Title (Side) "$[gt.$1] $2") + I Style FvwmButtons-Tooltip-$0 Layer $4 + I Module FvwmButtons FvwmButtons-Tooltip-$0 -+ I Schedule $5 KillModule FvwmButtons FvwmButtons-Tooltip-$0 +# It doesn't work well when Schedule is in the same function +# Usage: Kill-FvwmTooltip <name> +# +# where <name> is the same than in Fvwm-Tooltip +# Example: +# + I Schedule 2500 Kill-FvwmTooltip Volume + +DestroyFunc Kill-FvwmTooltip +AddToFunc Kill-FvwmTooltip ++ I KillModule FvwmButtons FvwmButtons-Tooltip-$0 +#+ I All (FvwmButtons-Tooltip-$0) Schedule $5 KillModule FvwmButtons FvwmButtons-Tooltip-$0 + # vim:ft=fvwm This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |