Print configuration is now saved between Tux Paint sessions on Mac OS X.

This commit is contained in:
Martin Fuhrer 2007-07-25 05:39:18 +00:00
parent 23f586a668
commit c0962bf16e
5 changed files with 98 additions and 37 deletions

View file

@ -183,7 +183,7 @@ static NSString *getApplicationName(void)
- (IBAction) onPageSetup:(id)sender
{
DisplayPageSetup();
[self sendSDLControlShiftKeystroke:SDLK_p];
}
- (IBAction) onUndo:(id)sender
@ -204,6 +204,8 @@ static NSString *getApplicationName(void)
- (IBAction) onQuit:(id)sender
{
[[NSUserDefaults standardUserDefaults] synchronize];
/* Post a SDL_QUIT event */
SDL_Event event;
event.type = SDL_QUIT;
@ -219,6 +221,15 @@ static NSString *getApplicationName(void)
SDL_PushEvent(&event);
}
- (void) sendSDLControlShiftKeystroke:(int)key
{
SDL_Event event;
event.type = SDL_KEYDOWN;
event.key.keysym.sym = key;
event.key.keysym.mod = KMOD_CTRL | KMOD_SHIFT;
SDL_PushEvent(&event);
}
/* Set the working directory to the .app's parent directory */
- (void) setupWorkingDirectory:(BOOL)shouldChdir
{