openframeworks/openFrameworks — pull request #2307 by admsyn (2013-07-20 20:17:38+00:00)
Title: Fix warnings in OSX, switch to Cocoa file dialogs

This PR closes #2287

There are 3 main things here:

## Removed the Carbon prefix header from the project template.

This was creating a bunch of deprecation warnings in the user's project. The parts of oF that require Carbon seem to pull in the header on their own anyway. I did this by removing the 2 relevant build settings from the project template, then running `plutil -convert xml1 project.pbxproj` on the project template. I tested by doing a clean + build, and running an app with a GLUT window. The build time did not seem to be affected, and the app ran fine.

## Migrated the load, save and alert dialogs from Carbon to their Cocoa equivalents

This fixed another warning, and removed a *lot* of carbon boilerplate code from ofSystemUtils. This also fixed a bug where the dialogs wouldn't honor symlinks / aliases in the dialogs (using ofSystemLoadDialog and selecting a symlink will now select the thing the symlink is linking to, not the symlink itself). It also lets you get pretty loose with your default paths. So ofSystemLoadDialog("~/an_alias") will open up a dialog pointing to wherever `an_alias` in the user's home directory is pointing.

Carbon is no longer necessary in ofSystemUtils. I tested this with the fileOpenSaveDialogExample and didn't see any regressions. This would probably be a good one to test on an older OSX though (I don't have access to a 10.6 system anymore).

## Locating system font files with Core Text instead of the now-deprecated ATSFont system

The surface area for regressions here is pretty minimal, since it's just an internal helper for ofTrueTypeFont. I tested this with `OF_TTF_MONO`, `OF_TTF_SANS` and `OF_TTF_SERIF` for ofLoadFont. It could probably also use a test on 10.6, though.