Skip to content

Commit

Permalink
Show an error message on Mac if not properly configured
Browse files Browse the repository at this point in the history
  • Loading branch information
baconpaul committed Dec 16, 2018
1 parent 6e9e263 commit e5737f0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/common/SurgeStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,28 @@ SurgeStorage::SurgeStorage()
MessageBox(::GetActiveWindow(), "Surge is not properly installed. Please reinstall.",
"Configuration not found", MB_OK | MB_ICONERROR);
#endif
#if MAC
SInt32 nRes = 0;
CFUserNotificationRef pDlg = NULL;
const void* keys[] = { kCFUserNotificationAlertHeaderKey,
kCFUserNotificationAlertMessageKey
};
const void* vals[] = {
CFSTR("Surge is not properly installed"),
CFSTR("Unable to open configuration.xml from ~/Library/Application Support/Surge")

};

CFDictionaryRef dict = CFDictionaryCreate(0, keys, vals,
sizeof(keys)/sizeof(*keys),
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);

pDlg = CFUserNotificationCreate(kCFAllocatorDefault, 0,
kCFUserNotificationStopAlertLevel,
&nRes, dict);
#endif

}

TiXmlElement* e = snapshotloader.FirstChild("autometa")->ToElement();
Expand Down

0 comments on commit e5737f0

Please sign in to comment.