OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4AppMac.mm File Reference
#include "C4ForbidLibraryCompilation.h"
#include <GL/glew.h>
#include "C4Include.h"
#include "platform/C4Window.h"
#include "graphics/C4Draw.h"
#include "platform/C4App.h"
#import <Cocoa/Cocoa.h>
#import "platform/C4WindowController.h"
#import "graphics/C4DrawGLMac.h"
Include dependency graph for C4AppMac.mm:

Go to the source code of this file.

Functions

bool IsGermanSystem ()
 
bool OpenURL (const char *szURL)
 
bool EraseItemSafe (const char *szFilename)
 

Function Documentation

bool EraseItemSafe ( const char *  szFilename)

Definition at line 205 of file C4AppMac.mm.

206 {
207  NSString* filename = [NSString stringWithUTF8String: szFilename];
208  return [[NSWorkspace sharedWorkspace]
209  performFileOperation: NSWorkspaceRecycleOperation
210  source: [filename stringByDeletingLastPathComponent]
211  destination: @""
212  files: [NSArray arrayWithObject: [filename lastPathComponent]]
213  tag: 0];
214 }
bool IsGermanSystem ( )

Definition at line 192 of file C4AppMac.mm.

Referenced by C4ConfigGeneral::DefaultLanguage().

193 {
194  id languages = [[NSUserDefaults standardUserDefaults] valueForKey:@"AppleLanguages"];
195  return languages && [[languages objectAtIndex:0] isEqualToString:@"de"];
196 }

Here is the caller graph for this function:

bool OpenURL ( const char *  szURL)

Definition at line 198 of file C4AppMac.mm.

Referenced by C4AppDelegate::visitWebsite:.

199 {
200  std::string command = std::string("open ") + '"' + szURL + '"';
201  std::system(command.c_str());
202  return true;
203 }

Here is the caller graph for this function: