Placate Joerg some more by making screen savers get a reasonable default

timeout.
2.2-RELEASE candidate, like all the work here in release/sysinstall.
This commit is contained in:
Jordan K. Hubbard 1996-11-04 17:42:22 +00:00
parent fd25850c96
commit d57b472224
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19397
9 changed files with 54 additions and 24 deletions

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: config.c,v 1.51 1996/10/14 21:32:25 jkh Exp $
* $Id: config.c,v 1.52 1996/11/04 12:56:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -323,6 +323,15 @@ configSysconfig(char *config)
fclose(fp);
}
int
configSaver(dialogMenuItem *self)
{
variable_set((char *)self->data);
if (!variable_get(VAR_BLANKTIME))
variable_set2(VAR_BLANKTIME, "300");
return DITEM_SUCCESS;
}
int
configSaverTimeout(dialogMenuItem *self)
{

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: menus.c,v 1.89 1996/10/14 21:32:31 jkh Exp $
* $Id: menus.c,v 1.90 1996/11/04 12:56:26 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -1173,14 +1173,14 @@ probably enable one of these screen savers to prevent phosphor burn-in.",
"Choose a nifty-looking screen saver",
NULL,
{ { "blank", "Simply blank the screen",
dmenuVarCheck, dmenuSetVariable, NULL, "saver=blank" },
dmenuVarCheck, configSaver, NULL, "saver=blank" },
{ "Green", "\"Green\" power saving mode (if supported by monitor)",
dmenuVarCheck, dmenuSetVariable, NULL, "saver=green" },
dmenuVarCheck, configSaver, NULL, "saver=green" },
{ "Snake", "Draw a FreeBSD \"snake\" on your screen",
dmenuVarCheck, dmenuSetVariable, NULL, "saver=snake" },
dmenuVarCheck, configSaver, NULL, "saver=snake" },
{ "Star", "A \"twinkling stars\" effect",
dmenuVarCheck, dmenuSetVariable, NULL, "saver=star" },
dmenuVarCheck, configSaver, NULL, "saver=star" },
{ "Timeout", "Set the screen saver timeout interval",
dmenuVarCheck, configSaverTimeout, NULL, "blanktime", ' ', ' ', ' ' },
dmenuVarCheck, configSaverTimeout, NULL, "blanktime" },
{ NULL } },
};

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.82 1996/10/14 21:32:33 jkh Exp $
* $Id: sysinstall.h,v 1.83 1996/11/04 12:56:33 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -371,6 +371,7 @@ extern int configFstab(void);
extern void configSysconfig(char *config);
extern void configResolv(void);
extern int configPackages(dialogMenuItem *self);
extern int configSaver(dialogMenuItem *self);
extern int configSaverTimeout(dialogMenuItem *self);
extern int configNTP(dialogMenuItem *self);
extern int configXFree86(dialogMenuItem *self);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: config.c,v 1.51 1996/10/14 21:32:25 jkh Exp $
* $Id: config.c,v 1.52 1996/11/04 12:56:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -323,6 +323,15 @@ configSysconfig(char *config)
fclose(fp);
}
int
configSaver(dialogMenuItem *self)
{
variable_set((char *)self->data);
if (!variable_get(VAR_BLANKTIME))
variable_set2(VAR_BLANKTIME, "300");
return DITEM_SUCCESS;
}
int
configSaverTimeout(dialogMenuItem *self)
{

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: menus.c,v 1.89 1996/10/14 21:32:31 jkh Exp $
* $Id: menus.c,v 1.90 1996/11/04 12:56:26 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -1173,14 +1173,14 @@ probably enable one of these screen savers to prevent phosphor burn-in.",
"Choose a nifty-looking screen saver",
NULL,
{ { "blank", "Simply blank the screen",
dmenuVarCheck, dmenuSetVariable, NULL, "saver=blank" },
dmenuVarCheck, configSaver, NULL, "saver=blank" },
{ "Green", "\"Green\" power saving mode (if supported by monitor)",
dmenuVarCheck, dmenuSetVariable, NULL, "saver=green" },
dmenuVarCheck, configSaver, NULL, "saver=green" },
{ "Snake", "Draw a FreeBSD \"snake\" on your screen",
dmenuVarCheck, dmenuSetVariable, NULL, "saver=snake" },
dmenuVarCheck, configSaver, NULL, "saver=snake" },
{ "Star", "A \"twinkling stars\" effect",
dmenuVarCheck, dmenuSetVariable, NULL, "saver=star" },
dmenuVarCheck, configSaver, NULL, "saver=star" },
{ "Timeout", "Set the screen saver timeout interval",
dmenuVarCheck, configSaverTimeout, NULL, "blanktime", ' ', ' ', ' ' },
dmenuVarCheck, configSaverTimeout, NULL, "blanktime" },
{ NULL } },
};

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.82 1996/10/14 21:32:33 jkh Exp $
* $Id: sysinstall.h,v 1.83 1996/11/04 12:56:33 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -371,6 +371,7 @@ extern int configFstab(void);
extern void configSysconfig(char *config);
extern void configResolv(void);
extern int configPackages(dialogMenuItem *self);
extern int configSaver(dialogMenuItem *self);
extern int configSaverTimeout(dialogMenuItem *self);
extern int configNTP(dialogMenuItem *self);
extern int configXFree86(dialogMenuItem *self);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: config.c,v 1.51 1996/10/14 21:32:25 jkh Exp $
* $Id: config.c,v 1.52 1996/11/04 12:56:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -323,6 +323,15 @@ configSysconfig(char *config)
fclose(fp);
}
int
configSaver(dialogMenuItem *self)
{
variable_set((char *)self->data);
if (!variable_get(VAR_BLANKTIME))
variable_set2(VAR_BLANKTIME, "300");
return DITEM_SUCCESS;
}
int
configSaverTimeout(dialogMenuItem *self)
{

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: menus.c,v 1.89 1996/10/14 21:32:31 jkh Exp $
* $Id: menus.c,v 1.90 1996/11/04 12:56:26 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -1173,14 +1173,14 @@ probably enable one of these screen savers to prevent phosphor burn-in.",
"Choose a nifty-looking screen saver",
NULL,
{ { "blank", "Simply blank the screen",
dmenuVarCheck, dmenuSetVariable, NULL, "saver=blank" },
dmenuVarCheck, configSaver, NULL, "saver=blank" },
{ "Green", "\"Green\" power saving mode (if supported by monitor)",
dmenuVarCheck, dmenuSetVariable, NULL, "saver=green" },
dmenuVarCheck, configSaver, NULL, "saver=green" },
{ "Snake", "Draw a FreeBSD \"snake\" on your screen",
dmenuVarCheck, dmenuSetVariable, NULL, "saver=snake" },
dmenuVarCheck, configSaver, NULL, "saver=snake" },
{ "Star", "A \"twinkling stars\" effect",
dmenuVarCheck, dmenuSetVariable, NULL, "saver=star" },
dmenuVarCheck, configSaver, NULL, "saver=star" },
{ "Timeout", "Set the screen saver timeout interval",
dmenuVarCheck, configSaverTimeout, NULL, "blanktime", ' ', ' ', ' ' },
dmenuVarCheck, configSaverTimeout, NULL, "blanktime" },
{ NULL } },
};

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.82 1996/10/14 21:32:33 jkh Exp $
* $Id: sysinstall.h,v 1.83 1996/11/04 12:56:33 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -371,6 +371,7 @@ extern int configFstab(void);
extern void configSysconfig(char *config);
extern void configResolv(void);
extern int configPackages(dialogMenuItem *self);
extern int configSaver(dialogMenuItem *self);
extern int configSaverTimeout(dialogMenuItem *self);
extern int configNTP(dialogMenuItem *self);
extern int configXFree86(dialogMenuItem *self);