If you are over weight it is perfectly safe to diet while pregnant as long as you are getting the vitamines the baby needs. Remember the eating for two does not mean you take in enough for two people. It just means you eat healthy. I am 32 weeks and a small girl and i still do not eat more then i would regularly eat. I just make sure i eat often. And my weight is right on i have not gained too little or too much. I have a friend who is a bigger girl and her dr wanted her to gain 15 lbs max. She ate great and dieted during her preg and only gained 8 lbs and had a very healthy 8 lb baby.
There's no harm in eating take away and sweet just in moderation. Don't think of it as dieting just eating healthy for you and your baby. Gentle exercise is fine in pregnancy unless your Dr has told you not to. You don't want to elevate your heart rate excessively for example. Swimming, walking and cycling are all good for example.