add hibernate now action

fix backlight to not reset to default on restarts.



SVN revision: 67544
This commit is contained in:
Carsten Haitzler 2012-01-26 06:21:21 +00:00
parent dd1d3ffda5
commit aaf80033e5
2 changed files with 15 additions and 3 deletions

View File

@ -2244,6 +2244,11 @@ _e_actions_cb_hibernate_dialog_delete(E_Win *win)
_e_actions_cb_hibernate_dialog_cancel(NULL, dia);
}
ACT_FN_GO(hibernate_now, __UNUSED__)
{
e_sys_action_do(E_SYS_HIBERNATE, NULL);
}
ACT_FN_GO(hibernate, )
{
if ((params) && (!strcmp(params, "now")))
@ -3106,6 +3111,10 @@ e_actions_init(void)
e_action_predef_name_set(N_("System"), N_("Hibernate"), "hibernate",
NULL, NULL, 0);
ACT_GO(hibernate_now);
e_action_predef_name_set(N_("System"), N_("Hibernate Now"), "hibernate_now",
NULL, NULL, 0);
ACT_GO(pointer_resize_push);
ACT_GO(pointer_resize_pop);

View File

@ -82,11 +82,14 @@ e_backlight_init(void)
_e_backlight_handler_desk_show = ecore_event_handler_add
(E_EVENT_DESK_SHOW, _e_backlight_handler, NULL);
// if (bl_avail == EINA_TRUE)
if (bl_avail)
{
e_backlight_update();
e_backlight_level_set(NULL, 0.0, 0.0);
e_backlight_level_set(NULL, e_config->backlight.normal, 1.0);
if (!getenv("E_RESTART"))
{
e_backlight_level_set(NULL, 0.0, 0.0);
e_backlight_level_set(NULL, e_config->backlight.normal, 1.0);
}
}
return 1;
}