gharris999;322268 Wrote: 
> Mavit: any clue as to how to put back the default sleep button behavior
> if the user unchecks the 'handle sleep button' setting?  (Short of
> restarting the server, that is?)

Have you looked at addDispatch? It allows you to get a coderef for an
existing function and either replace it or "wrap" it with your code.
See my code for SleepFade for an example.

Have you looked at ContextMenu as an alternative way to launch this
with an old-style IR remote control? The basic idea is instead of so
many plugins vying for a limited number of button mappings, they could
register with a context menu provider like ContextMenu so users could
easily find functions. For instance, hold arrow_right to get the
ContextMenu options, scroll (if needed) to SvrPowerControl, choose
Sleep or Hibernate or whatever, and right-arrow to execute the command.
Downside (beyond installing ContextMenu!) is more steps. Upside is fewer
complex button mappings to remember, and all the standard mappings would
continue to work. (It looks like a consequence of your approach to the
Sleep button is that even things like the Controller's Settings ->
Sleep might break.)

For the sleep button, I've also had good luck editing the map file to
make holding the sleep button do something special, but simply pressing
the sleep button do its normal tasks -- see AllQuiet (which also has
ContextMenu support in the latest release).


-- 
peterw

http://www.tux.org/~peterw/
free plugins: http://www.tux.org/~peterw/#slim
AllQuiet BlankSaver FuzzyTime PlayLog PowerCenter/BottleRocket 
SaverSwitcher SettingsManager SleepFade StatusFirst SyncOptions
VolumeLock
------------------------------------------------------------------------
peterw's Profile: http://forums.slimdevices.com/member.php?userid=2107
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to