We have had lots of women go on maternity leave and come back successfully. In general we were very glad to have to them back. Companies are very different in how they treat this. So don't take one bad experience and think it is how you will be treated everywhere.
In interviewing, I would look at larger companies as they can absorb the work during the maternity leave more easily. I would also look at the average age of the employees. You would be happier in a place with middle-aged (you understand middle age starts at 30, right?) people who are married. They will understand your needs better than a place filled with 20-something single guys. You want to look for a place that already has a flexible work-from-home program if you want to do that especially if you want to come back part-time.
Do a lot of women appear to work there? In general, professional women tend to end up in places that are more supportive of women's needs.
Ask to see the HR manual when you get the job offer and look for place that has a policy for paternity leave. It's not a killer if they don't, but any place that does allow it is likelier to be more understanding of parental issues.
But the key is to ask about the conditions you want. If they turn you down because you asked about maternity leave, then you probably would not be happy working there.
From your earlier questions, I think you are in software development. In that case stay away from start-ups and game companies. They will expect you to routinely work 60+ hours a week which is a bad thing for a new mother. Programming to support a company's main business may not be as cool, but it is a whole lot more supportive of women's needs because they generally have women in other fields as well. And a company that has a large portion of women in their main business is very used to dealing with maternity leave. Look at the health care, financial, defense business sectors or government work (just few to get you started thinking that way) instead of businesses that only do application development.