make this more portable in case the number of states changes in the future, also outdent and make function params more explicit
make this more portable in case the number of states changes in the future, also outdent and make function params more explicit


SVN revision: 55727

tizenorg/platform.upstream.enlightenment,FlorentRevest/Enlightenment,tizenorg/platform.upstream.enlightenment,tizenorg/platform.upstream.enlightenment,FlorentRevest/Enlightenment,rvandegrift/e,tasn/enlightenment,rvandegrift/e,tasn/enlightenment,rvandegrift/e,tasn/enlightenment,FlorentRevest/Enlightenment