tkan, Gallery is published using the GPL. In general you can do whatever you want with the source, as long as any product derived from it also is released using the GPL and that the source is publicly available.
So basically, have fun, go mad, change whatever you like 