Prevent crash on nil statement
Replaced NSInteger with int

No need to use NSInteger if the functions we call only return int
Cast to keep the compiler happy
Release instance variables in owning class
Cast to keep the compiler happy
Print error if XML parsing fails
Naming conventions: keep analyzer happy
CLANG complained about possible nil key or value
Fixed error check
Casts to keep the compiler happy
Casts too keep the compiler happy
Use 10.7 NSRect conversion if available
Make sure not to mutate enumerated collection
Let the compiler know about a 10.7 only method
Check image source before use

Image source may be incomplete or damaged
GC compatibility
Fix cast to match return type
Merge commit '3e879cc46c4de5a0954e7fd9facdea143743b657' into v2.6.x