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 <string>
#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 206 of file C4AppMac.mm.

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

Definition at line 193 of file C4AppMac.mm.

Referenced by C4ConfigGeneral::DefaultLanguage().

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

Here is the caller graph for this function:

bool OpenURL ( const char *  szURL)

Definition at line 199 of file C4AppMac.mm.

Referenced by C4AppDelegate::visitWebsite:.

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

Here is the caller graph for this function: