e blanking - add new special "locked timeout" that can be shorter
this allows you to have a different timeout when locked thats much shorter to save screen/power more unless you log in. @feature
This commit is contained in:
parent
804f038f71
commit
f43d2b881c
|
@ -623,6 +623,7 @@ _e_config_edd_init(Eina_Bool old)
|
|||
E_CONFIG_VAL(D, T, screensaver_expose, INT);
|
||||
E_CONFIG_VAL(D, T, screensaver_ask_presentation, UCHAR);
|
||||
E_CONFIG_VAL(D, T, screensaver_ask_presentation_timeout, DOUBLE);
|
||||
E_CONFIG_VAL(D, T, screensaver_desklock_timeout, INT);
|
||||
|
||||
E_CONFIG_VAL(D, T, screensaver_wake_on_notify, INT);
|
||||
E_CONFIG_VAL(D, T, screensaver_wake_on_urgent, INT);
|
||||
|
|
|
@ -221,6 +221,7 @@ struct _E_Config
|
|||
int screensaver_expose; // GUI
|
||||
unsigned char screensaver_ask_presentation; // GUI
|
||||
double screensaver_ask_presentation_timeout; // GUI
|
||||
int screensaver_desklock_timeout; // GUI
|
||||
|
||||
int screensaver_wake_on_notify; // GUI
|
||||
int screensaver_wake_on_urgent; // GUI
|
||||
|
|
|
@ -358,6 +358,7 @@ e_desklock_show(Eina_Bool suspend)
|
|||
e_util_env_set("E_DESKLOCK_LOCKED", "locked");
|
||||
_e_desklock_state = EINA_TRUE;
|
||||
e_bindings_disabled_set(1);
|
||||
e_screensaver_update();
|
||||
return 1;
|
||||
lang_fail:
|
||||
if (e_config->desklock_language)
|
||||
|
@ -421,6 +422,8 @@ e_desklock_hide(void)
|
|||
ev->suspend = 1;
|
||||
ecore_event_add(E_EVENT_DESKLOCK, ev, NULL, NULL);
|
||||
|
||||
e_screensaver_update();
|
||||
|
||||
if (e_desklock_is_external())
|
||||
{
|
||||
_e_custom_desklock_exe = NULL;
|
||||
|
|
|
@ -813,7 +813,10 @@ main(int argc, char **argv)
|
|||
_e_main_shutdown_push(e_desklock_shutdown);
|
||||
|
||||
if (waslocked || (locked && ((!after_restart) || (!getenv("E_DESKLOCK_UNLOCKED")))))
|
||||
e_desklock_show(EINA_TRUE);
|
||||
{
|
||||
e_desklock_show(EINA_TRUE);
|
||||
e_screensaver_update();
|
||||
}
|
||||
|
||||
if (e_config->show_splash)
|
||||
e_init_status_set(_("Setup Paths"));
|
||||
|
|
|
@ -52,7 +52,13 @@ e_screensaver_timeout_get(Eina_Bool use_idle)
|
|||
int timeout = 0, count = (1 + _e_screensaver_ask_presentation_count);
|
||||
|
||||
if ((e_config->screensaver_enable) && (!e_config->mode.presentation))
|
||||
timeout = e_config->screensaver_timeout * count;
|
||||
{
|
||||
if ((e_desklock_state_get()) &&
|
||||
(e_config->screensaver_desklock_timeout > 0))
|
||||
timeout = e_config->screensaver_desklock_timeout;
|
||||
else
|
||||
timeout = e_config->screensaver_timeout * count;
|
||||
}
|
||||
|
||||
if ((use_idle) && (!e_config->mode.presentation))
|
||||
{
|
||||
|
@ -565,7 +571,10 @@ e_screensaver_eval(Eina_Bool saver_on)
|
|||
if (!_screensaver_ignore)
|
||||
{
|
||||
if (e_screensaver_on_get())
|
||||
ecore_event_add(E_EVENT_SCREENSAVER_OFF, NULL, NULL, NULL);
|
||||
{
|
||||
e_screensaver_update();
|
||||
ecore_event_add(E_EVENT_SCREENSAVER_OFF, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ struct _E_Config_Dialog_Data
|
|||
|
||||
int enable_screensaver;
|
||||
double timeout;
|
||||
double desklock_timeout;
|
||||
int ask_presentation;
|
||||
double ask_presentation_timeout;
|
||||
|
||||
|
@ -66,6 +67,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
{
|
||||
cfdata->enable_screensaver = e_config->screensaver_enable;
|
||||
cfdata->timeout = (double)e_config->screensaver_timeout / 60.0;
|
||||
cfdata->desklock_timeout = (double)e_config->screensaver_desklock_timeout;
|
||||
cfdata->ask_presentation = e_config->screensaver_ask_presentation;
|
||||
cfdata->ask_presentation_timeout = e_config->screensaver_ask_presentation_timeout;
|
||||
cfdata->screensaver_suspend = e_config->screensaver_suspend;
|
||||
|
@ -99,6 +101,7 @@ _basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
|
|||
{
|
||||
e_config->screensaver_enable = cfdata->enable_screensaver;
|
||||
e_config->screensaver_timeout = lround(cfdata->timeout * 60.0);
|
||||
e_config->screensaver_desklock_timeout = lround(cfdata->desklock_timeout);
|
||||
e_config->screensaver_ask_presentation = cfdata->ask_presentation;
|
||||
e_config->screensaver_ask_presentation_timeout = cfdata->ask_presentation_timeout;
|
||||
e_config->screensaver_suspend = cfdata->screensaver_suspend;
|
||||
|
@ -144,6 +147,7 @@ _basic_check_changed(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfd
|
|||
{
|
||||
return ((e_config->screensaver_enable != cfdata->enable_screensaver) ||
|
||||
(e_config->screensaver_timeout != lround(cfdata->timeout * 60.0)) ||
|
||||
(e_config->screensaver_desklock_timeout != lround(cfdata->desklock_timeout)) ||
|
||||
(e_config->screensaver_ask_presentation != cfdata->ask_presentation) ||
|
||||
(!EINA_DBL_EQ(e_config->screensaver_ask_presentation_timeout, cfdata->ask_presentation_timeout)) ||
|
||||
(e_config->screensaver_suspend != cfdata->screensaver_suspend) ||
|
||||
|
@ -172,8 +176,16 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
|
|||
ow = e_widget_label_add(evas, _("Timeout"));
|
||||
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
|
||||
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
||||
ow = e_widget_slider_add(evas, 1, 0, _("%1.0f minutes"),
|
||||
0.5, 90.0, 1.0, 0, &(cfdata->timeout), NULL, 100);
|
||||
ow = e_widget_slider_add(evas, 1, 0, _("%1.1f minutes"),
|
||||
0.1, 60.0, 0.1, 0, &(cfdata->timeout), NULL, 100);
|
||||
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
|
||||
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
||||
|
||||
ow = e_widget_label_add(evas, _("Special timeout when locked (0 is off)"));
|
||||
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
|
||||
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
||||
ow = e_widget_slider_add(evas, 1, 0, _("%1.0f seconds"),
|
||||
0.0, 60.0, 1.0, 0, &(cfdata->desklock_timeout), NULL, 100);
|
||||
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
|
||||
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
||||
|
||||
|
|
Loading…
Reference in New Issue