Move state_slot variable from g_extern to g_settings