Revision 3316 libsylph/utils.c

View differences:

utils.c
52 52
#  include <shlobj.h>
53 53
#endif
54 54

  
55
#ifdef __APPLE__
56
#  include <AppKit/AppKit.h>
57
#endif
58

  
55 59
#include "utils.h"
56 60
#include "socket.h"
57 61

  
......
2129 2133
		} else
2130 2134
			startup_dir = g_get_current_dir();
2131 2135
	}
2136
#elif defined(__APPLE__)
2137
	if (!startup_dir) {
2138
		const gchar *path;
2139
		NSAutoreleasePool *pool;
2140

  
2141
		pool = [[NSAutoreleasePool alloc] init];
2142

  
2143
		path = [[[NSBundle mainBundle] bundlePath] UTF8String];
2144
		startup_dir = g_strdup(path);
2145

  
2146
		[pool release];
2147

  
2148
		if (!startup_dir)
2149
			startup_dir = g_get_current_dir();
2150
	}
2132 2151
#else
2133 2152
	if (!startup_dir)
2134 2153
		startup_dir = g_get_current_dir();

Also available in: Unified diff