I'm annoyed at my friend constantly talking about her dead grandpa
That sounds like a handful. Does she only ever talk about him?
Yes, I wish she wouldn't talk about it so much
It is good to be there to listen to your friend, but it can be overwhelming. If you need a break from it you should not have to take the emotional burden of her greif on.
But she's my friend. It's my obligation to listen to her.
I'm real glad that you are always willing to lend and ear to her, that's what friends are for! I'm sure she appreciates all the time you give her and to help her heal.