Sun Nov 28 21:52:12 GMT 1999

(gilbertt)

Made the screensaver lock command configurable in E-ScreenSave.


SVN revision: 1430
This commit is contained in:
Tom Gilbert 1999-11-28 18:17:18 +00:00
parent ea9b3ecfc9
commit 6f5f6103ae
2 changed files with 7 additions and 6 deletions

View File

@ -67,6 +67,7 @@ save_config (void)
Esnprintf (buf, sizeof(buf), "%d", opt.cloak_anim);
}
Epplet_modify_config ("CLOAK_ANIM", buf);
Epplet_modify_config ("LOCK_COMMAND", opt.lock_cmd);
}
static void
@ -87,6 +88,9 @@ load_config (void)
opt.cloak_delay = atof (Epplet_query_config_def ("CLOAK_DELAY", "4"));
opt.rand_delay = atof (Epplet_query_config_def ("RAND_DELAY", "60"));
opt.draw_interval = atof (Epplet_query_config_def ("DRAW_INTERVAL", "0.1"));
if(opt.lock_cmd)
free(opt.lock_cmd);
opt.lock_cmd=_Strdup(Epplet_query_config_def ("LOCK_COMMAND", "xscreensaver-command -lock &"));
}
static void
@ -326,13 +330,9 @@ cb_out (void *data, Window w)
static void
cb_shoot (void *data)
{
char *sys;
sys=_Strdup("xscreensaver-command -lock &");
system(sys);
if(opt.lock_cmd)
system(opt.lock_cmd);
free (sys);
return;
data = NULL;
}

View File

@ -41,5 +41,6 @@ struct
char *file_stamp;
char *file_type;
char *script;
char *lock_cmd;
}
opt;