Magneto-gravity waves and the heating of the solar corona