Skip to content
Browse files

Change the name of the app to Erlang

  • Loading branch information...
1 parent 4f28fe5 commit 0f451f5236b6003858d922a22ee9c152a2f38888 @dgud committed Mar 2, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 c_src/esdl_driver.c
View
9 c_src/esdl_driver.c
@@ -112,19 +112,22 @@ static ErlDrvData sdl_driver_start(ErlDrvPort port, char *buff)
return (ErlDrvData) data;
}
+#ifdef _OSX_COCOA
+extern OSErr CPSSetProcessName (ProcessSerialNumber *psn, char *processname);
+#endif
void esdl_init_native_gui()
{
#ifdef _OSX_COCOA
ProcessSerialNumber psn;
NSAutoreleasePool *pool;
- [[NSProcessInfo processInfo] setProcessName:@"Erlang"];
+ // [[NSProcessInfo processInfo] setProcessName:@"Erlang"];
// Enable GUI
GetCurrentProcess(&psn);
+ CPSSetProcessName(&psn, "Erlang"); // Undocumented function (but above doesn't work)
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
SetFrontProcess(&psn);
-
// Enable Cocoa calls from Carbon app
NSApplicationLoad();
@@ -135,7 +138,7 @@ void esdl_init_native_gui()
NSApplication *app = [NSApplication sharedApplication];
// Load and set icon
- NSMutableString *file = [[NSMutableString alloc] init];
+ //NSMutableString *file = [[NSMutableString alloc] init];
//[file appendFormat:@"%s/%s", erl_wx_privdir, "erlang-logo64.png"];
//[file appendFormat:@"%s/%s", "/usr/local/lib/erlang/lib/wx-0.98.8/priv", "erlang-logo64.png"];
//NSImage *icon = [[NSImage alloc] initWithContentsOfFile: file];

0 comments on commit 0f451f5

Please sign in to comment.
Something went wrong with that request. Please try again.