Closed ericbroska closed 10 years ago
Thats alot of code just for replacing one hardcoded path. Why is SystemPreferences.h needed and what does it do? Is it a private API class in Apple?
@codler yeah, you're right — it's a quite big piece of code, but… I just don't like any kind of hardcode :)
SystemPreferences.h is a declaration of «System Preferences.app»'s Apple Scripting interface, so it's needed for using such things as SystemPreferencesPane
and SystemPreferencesApplication
. It's the public API and you can generate it yourself:
$ sdef "/Applications/System Preferences.app" | sdp -fh --basename SystemPreferences -o ~/SystemPreferences.h
Also, it is possible to remove some code from this header (for instance, we don't need SystemPreferencesItem
, SystemPreferencesDocument
, SystemPreferencesWindow
, SystemPreferencesText
and so on).
Sry, this wont be merged