|
@@ -2510,10 +2510,15 @@ main(int argc, char *argv[])
|
|
}
|
|
}
|
|
- (void)editConfig
|
|
- (void)editConfig
|
|
{
|
|
{
|
|
- create_config_file(g_ctx, g_config_file);
|
|
|
|
- [[NSWorkspace sharedWorkspace]
|
|
|
|
- openFile:[NSString stringWithUTF8String:g_config_file]
|
|
|
|
- withApplication:@"TextEdit"];
|
|
|
|
|
|
+ create_config_file(g_ctx, g_config_file_name);
|
|
|
|
+ NSString *path = [NSString stringWithUTF8String:g_config_file_name];
|
|
|
|
+ if (![[NSWorkspace sharedWorkspace] openFile:path withApplication:@"TextEdit"]) {
|
|
|
|
+ NSAlert *alert = [[[NSAlert alloc] init] autorelease];
|
|
|
|
+ [alert setAlertStyle:NSWarningAlertStyle];
|
|
|
|
+ [alert setMessageText:NSLocalizedString(@"Unable to open config file.", "")];
|
|
|
|
+ [alert setInformativeText:path];
|
|
|
|
+ (void)[alert runModal];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- (void)shutDown
|
|
- (void)shutDown
|
|
{
|
|
{
|
|
@@ -2581,7 +2586,7 @@ main(int argc, char *argv[])
|
|
[NSApp activateIgnoringOtherApps:YES];
|
|
[NSApp activateIgnoringOtherApps:YES];
|
|
[NSApp run];
|
|
[NSApp run];
|
|
|
|
|
|
- stop_civetweb(g_ctx);
|
|
|
|
|
|
+ stop_civetweb();
|
|
|
|
|
|
return EXIT_SUCCESS;
|
|
return EXIT_SUCCESS;
|
|
}
|
|
}
|