"Fork" from https://bitbucket.org/shmidt/slcountrypicker