Tough nut to crack, this one. I know that when someone tells me to not mention another person, it's like my subconscious always ends up mentioning them. Instead of trying to shut it down, why don't you try listening when she talks about him. Laugh at jokes and make it comfortable for her. Eventually she will see that she mentions him a lot and cut back on it herself.
This happened to me when my parents divorced. All I could talk about around my stepmom was my own mom. It wasn't to upset her, it was just that I lived with my mom and we were very close so it was hard to mention my day-to-day without her coming up. Eventually I realized what I was doing and put myself in check. Because trust me, my stepmom DID NOT want to hear about my mom all the time!
I'm not good at beating around the bush or sugar-coating things. My responses are never personal vendetta's on your emotional state. It is what it is, whether you choose to accept it or not. <3