Thank you very much for your patch! Next time it would be better to send a proper patch file in an unified file format, to achieve this you can download the trunk version:
$ svn co
http://svn.gnome.org/gtk+/trunk gtk (or using TortoiseSVN[0] if you do so on windows).
$ cd gtk/
Perform your modifications, and create a patch with svn:
$ svn diff > my_gtk_fix.patch
(or using the TortoiseSVN interface for patches)
It would be also nice to attach the patch to the bug page on bugzilla since it's the usual way to keep track of them.
As for the patch I'm not a Gtk+ maintainer so I cannot give you any comments. Just wanted to let you know how to make your contributions easier to try.