Getting the value of MAC OSX General settings/preferences.
Solved
General and Desktop
-
Is there any way to get the value from the MAC OSX general settings? For example i want to get the settings of how many recent files should appear on my Qt Application?
-
Tried to look for the plist of the settings but, the apple.generalsettings.plist is not giving me the data that i want to get.
-
auto sl = LSSharedFileListCreate( 0, kLSSharedFileListRecentDocumentItems, 0 ); auto vref = LSSharedFileListCopyProperty( sl, kLSSharedFileListRecentItemsMaxAmount ); int64_t v = 0; if ( CFGetTypeID( vref ) == CFNumberGetTypeID() ) CFNumberGetValue( (CFNumberRef)vref, kCFNumberSInt64Type, &v );
CFRelease appropriately...
-
auto sl = LSSharedFileListCreate( 0, kLSSharedFileListRecentDocumentItems, 0 ); auto vref = LSSharedFileListCopyProperty( sl, kLSSharedFileListRecentItemsMaxAmount ); int64_t v = 0; if ( CFGetTypeID( vref ) == CFNumberGetTypeID() ) CFNumberGetValue( (CFNumberRef)vref, kCFNumberSInt64Type, &v );
CFRelease appropriately...
@sandy.martel23 Thank you. Solved.