Man convicted of killing ex-girlfriend, shooting man