mirror of
https://gitlab.freedesktop.org/upower/power-profiles-daemon.git
synced 2026-05-05 01:48:04 +02:00
main: Initialise state for actions
Run "deactivate" on all the actions that don't correspond to the initial selected profile so that non-power-saving get correctly applied if they're not the default.
This commit is contained in:
parent
ab360e4498
commit
5078e578bd
1 changed files with 8 additions and 0 deletions
|
|
@ -477,6 +477,14 @@ name_acquired_handler (GDBusConnection *connection,
|
|||
goto bail;
|
||||
}
|
||||
|
||||
/* Set initial state for actions */
|
||||
for (i = 0; i < NUM_PROFILES; i++) {
|
||||
if (i == data->active_profile)
|
||||
continue;
|
||||
set_all_actions_active (data->actions[i], FALSE);
|
||||
}
|
||||
set_all_actions_active (data->actions[data->active_profile], TRUE);
|
||||
|
||||
send_dbus_event (data, PROP_ALL);
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue