def save_all_targets(all_targets, targets): """Set actual targets from button to dict.""" # FIXME: Seems a bit convoluted. for action, activated in targets.items(): all_targets[action] = activated or all_targets[action] return all_targets