From 694f8176e2efd031b5f844d8a6750aecb1bccd01 Mon Sep 17 00:00:00 2001 From: ericwa Date: Thu, 15 Dec 2011 18:31:34 +0000 Subject: [PATCH] * Source/NSPrintPanel.m: Move _finalWritePrintInfo: call to the end of _pickedButton:. This fixes the save and preview buttons for me. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34294 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSPrintPanel.m | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef0e02d4f..c8eacfc50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-12-15 Eric Wasylishen + + * Source/NSPrintPanel.m: + Move _finalWritePrintInfo: call to the end of _pickedButton:. This + fixes the save and preview buttons for me. + 2011-12-14 Eric Wasylishen * Source/NSPrinter.m: diff --git a/Source/NSPrintPanel.m b/Source/NSPrintPanel.m index 776855329..dca3f37cf 100644 --- a/Source/NSPrintPanel.m +++ b/Source/NSPrintPanel.m @@ -354,9 +354,6 @@ static NSPrintPanel *shared_instance = nil; { int tag = [sender tag]; - // FIXME - [self _finalWritePrintInfo: _printInfo]; - if (tag == NSPPSaveButton) { _picked = NSPPSaveButton; @@ -402,6 +399,10 @@ static NSPrintPanel *shared_instance = nil; { NSLog(@"Print panel buttonAction: from unknown sender - x%p\n", sender); } + + // FIXME + [self _finalWritePrintInfo: _printInfo]; + [NSApp stopModalWithCode: (_picked == NSCancelButton) ? NSCancelButton : NSOKButton]; }