From 11790e1f90b457f440b2d2bd36a7a576dc1e427d Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Thu, 25 Jun 2009 23:05:44 +0000 Subject: - Revert r844, making background printing draw from the print accessory view again. Improve by setting background printing to on by default, read on startup. --- Resources/PreferenceDefaults.plist | 4 ++++ Source/SPPrintAccessory.m | 1 + Source/TableDocument.m | 3 --- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Resources/PreferenceDefaults.plist b/Resources/PreferenceDefaults.plist index ec642bbd..55ef1071 100644 --- a/Resources/PreferenceDefaults.plist +++ b/Resources/PreferenceDefaults.plist @@ -84,5 +84,9 @@ ConsoleShowHelps + PrintBackground + + PrintImagePreviews + diff --git a/Source/SPPrintAccessory.m b/Source/SPPrintAccessory.m index 4128e8ad..93c7ce4e 100644 --- a/Source/SPPrintAccessory.m +++ b/Source/SPPrintAccessory.m @@ -12,6 +12,7 @@ - (void)awakeFromNib { [self setView:printAccessoryView]; + [[WebPreferences standardPreferences] setShouldPrintBackgrounds:[[defaultsController valueForKeyPath:@"values.PrintBackground"] boolValue] ]; [defaultsController addObserver:self forKeyPath:@"values.PrintBackground" options:NSKeyValueObservingOptionNew context:@"PrinterSettingsChanged"]; } diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 3cc11425..acd8d978 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -81,9 +81,6 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum sshTunnel = nil; printWebView = [[WebView alloc] init]; - // otherwise WebView doesn't print background colors - WebPreferences* wvPrefs = [printWebView preferences]; - [wvPrefs setShouldPrintBackgrounds: YES]; [printWebView setFrameLoadDelegate:self]; prefs = [NSUserDefaults standardUserDefaults]; -- cgit v1.2.3