From: Michael R. <mr...@us...> - 2002-10-31 17:07:00
|
Update of /cvsroot/xine/xine-ui/src/xitk In directory usw-pr-cvs1:/tmp/cvs-serv17428/src/xitk Modified Files: event.c kbindings.c kbindings.h Log Message: small new feature: pressing d switches monitor into standby (useful for people using some kind of tv out) Index: event.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/event.c,v retrieving revision 1.129 retrieving revision 1.130 diff -u -r1.129 -r1.130 --- event.c 31 Oct 2002 10:27:30 -0000 1.129 +++ event.c 31 Oct 2002 17:06:53 -0000 1.130 @@ -37,6 +37,7 @@ #include <signal.h> #include <limits.h> #include <zlib.h> +#include <sys/wait.h> #include <xine.h> #include <xine/xineutils.h> @@ -547,6 +548,15 @@ case ACTID_KBEDIT: gui_kbedit_show(NULL, NULL); + break; + + case ACTID_DPMSSTANDBY: + { + pid_t pid; + if ((pid = fork()) == 0) + execlp("xset", "xset", "dpms", "force", "standby", NULL); + waitpid(pid, NULL, 0); + } break; default: Index: kbindings.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/kbindings.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- kbindings.c 31 Oct 2002 10:27:31 -0000 1.51 +++ kbindings.c 31 Oct 2002 17:06:54 -0000 1.52 @@ -377,6 +377,8 @@ "ViewlogShow", ACTID_VIEWLOG , "l", KEYMOD_META , 0 }, { "Key binding editor", "KeyBindingEditor", ACTID_KBEDIT , "k", KEYMOD_META , 0 }, + { "Switch Monitor to DPMS standby mode", + "DPMSStandby", ACTID_DPMSSTANDBY , "d", KEYMOD_NOMOD , 0 }, { 0, 0, 0, 0, 0 , 0 } }; Index: kbindings.h =================================================================== RCS file: /cvsroot/xine/xine-ui/src/xitk/kbindings.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- kbindings.h 31 Oct 2002 10:27:31 -0000 1.25 +++ kbindings.h 31 Oct 2002 17:06:55 -0000 1.26 @@ -109,6 +109,7 @@ ACTID_SETUP, ACTID_VIEWLOG, ACTID_KBEDIT, + ACTID_DPMSSTANDBY, /* * The below events map one-to-one with definitions in xine-lib's events.h */ |