WebKit:
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Sep 2004 21:13:50 +0000 (21:13 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Sep 2004 21:13:50 +0000 (21:13 +0000)
        Reviewed by Darin.

        - put preference keys in a private header file so Safari can use them for Managed Preferences

        * WebView.subproj/WebPreferenceKeysPrivate.h:
        new Private header file, includes the #defines for NSUserDefaults preference keys

        * WebView.subproj/WebPreferences.m:
        moved the preference key #defines out of here; now imports WebPreferenceKeysPrivate.h

        * WebKit.pbproj/project.pbxproj:
        updated for new file

WebBrowser:

        Reviewed by Darin.

        - fixed these bugs:
        <rdar://problem/3786507> Safari's managed preferences manifest needs to be
        brought up to date and made localizable
        <rdar://problem/3550533> Would like Safari to make more preferences "managed"
        in the Managed Preferences sense

        * Preferences.subproj/AdvancedPreferences.m:
        (-[AdvancedPreferences updateStyleSheetMenu]):
        disable popup button if style sheet enabled-ness or location is forced
        (-[AdvancedPreferences updateMinFontSizeViews]):
        disable checkbox and combo box if min font size value is forced
        (-[AdvancedPreferences updateTabToAllViews]):
        disable checkbox if tab-to-links value is forced

        * Preferences.subproj/AppearancePreferences.h:
        new outlets for "Select" buttons
        * Preferences.subproj/English.lproj/AppearancePreferences.nib:
        wire up "Select" button outlets
        * Preferences.subproj/AppearancePreferences.m:
        (-[AppearancePreferences updateDefaultCharacterSetPopup]):
        disable popup if text encoding value is forced
        (-[AppearancePreferences initializeFromDefaults]):
        disable each "Select" button if the font or font size is forced

        * Preferences.subproj/AutoFillPreferences.m:
        (-[AutoFillPreferences updateViews]):
        disable each checkbox if its value is forced

        * Preferences.subproj/BookmarkPreferences.m:
        (-[BookmarkPreferences setUpCheckbox:fromPreferenceKey:]):
        renamed from "setStateOfCheckbox:..."; now disables checkbox
        if the preference key value is forced
        (-[BookmarkPreferences updateBookmarksViews]):
        updated for name change

        * Preferences.subproj/GeneralPreferences.m:
        (-[GeneralPreferences updateExternalLinkPolicyViews]):
        disable radio buttons if value is forced
        (-[GeneralPreferences initializeFromDefaults]):
        disable new window policy popup, downloads clearing policy popup, and/or
        auto-open downloads checkbox if its value is forced

        * Preferences.subproj/SecurityPreferences.m:
        (-[SecurityPreferences updateJavaScriptViews]):
        disable javascript and/or block popups checkbox if its value is forced
        (-[SecurityPreferences updateMiscellaneousSecurityViews]):
        disable insecure forms checkbox if its value is forced
        (-[SecurityPreferences initializeFromDefaults]):
        disable java checkbox and/or plugins checkbox if its value is forced

        * Preferences.subproj/TabsPreferences.m:
        (-[TabsPreferences updateViews]):
        disable each checkbox if its value is forced

        * PrintingAccessoryViewController.m:
        (-[PrintingAccessoryViewController accessoryView]):
        disable each checkbox if its value is forced

        * Resources/com.apple.Safari.manifest/Contents/Resources/com.apple.Safari.manifest:
        updated key names to match latest spec; removed keys that have been removed in latest
        spec (pfm_print_string and pfm_ui_category); added pfm_titles; removed periods from
        pfm_descriptions since they aren't sentences; made all keys user-managed

        * Resources/com.apple.Safari.manifest/Contents/Resources/English.lproj/Localizable.strings:
        created contents from com.apple.Safari.manifest. I did this by hand this time, but wrote
        bug 3789768 about automating it later.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7459 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/WebKit.pbproj/project.pbxproj
WebKit/WebView.subproj/WebPreferenceKeysPrivate.h [new file with mode: 0644]
WebKit/WebView.subproj/WebPreferences.m

index 9e1e70a37bc1ac91356bb8a90f996ef2372d3afa..233057493eb78536204d210938160c005bb205e2 100644 (file)
@@ -1,3 +1,18 @@
+2004-09-06  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Darin.
+        
+        - put preference keys in a private header file so Safari can use them for Managed Preferences
+
+        * WebView.subproj/WebPreferenceKeysPrivate.h:
+        new Private header file, includes the #defines for NSUserDefaults preference keys
+        
+        * WebView.subproj/WebPreferences.m:
+        moved the preference key #defines out of here; now imports WebPreferenceKeysPrivate.h
+
+        * WebKit.pbproj/project.pbxproj:
+        updated for new file
+
 2004-09-03  Chris Blumenberg  <cblu@apple.com>
 
        Fixed: <rdar://problem/3782543> CrashTracer: ...87 crashes at com.apple.WebKit: -[WebNetscapePluginPackage initWithPath:] + 0x18c
index d867c2bb1c14c068039a74c9b14f7c74bac11196..b171cf826456a3f476d1b24d7ea2e9aeb27ad595 100644 (file)
                                51E94C6A06C0347500A9B09E,
                                83634A7406DA5ECD0026E290,
                                93B641FC06E292BC0055F610,
+                               EDE850CE06ECC79E005FAB05,
                        );
                        isa = PBXHeadersBuildPhase;
                        runOnlyForDeploymentPostprocessing = 0;
 //9C4
                9C7CABBB0190A37C0ECA16EA = {
                        children = (
+                               EDE850CD06ECC79E005FAB05,
                                F52CA6BD02DF9D0F018635CA,
                                F52CA6BE02DF9D49018635CA,
                                51E94C0706C02CA300A9B09E,
                        settings = {
                        };
                };
+               EDE850CD06ECC79E005FAB05 = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       path = WebPreferenceKeysPrivate.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               EDE850CE06ECC79E005FAB05 = {
+                       fileRef = EDE850CD06ECC79E005FAB05;
+                       isa = PBXBuildFile;
+                       settings = {
+                               ATTRIBUTES = (
+                                       Private,
+                               );
+                       };
+               };
 //ED0
 //ED1
 //ED2
diff --git a/WebKit/WebView.subproj/WebPreferenceKeysPrivate.h b/WebKit/WebView.subproj/WebPreferenceKeysPrivate.h
new file mode 100644 (file)
index 0000000..d7df8ed
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ *  WebPreferenceKeysPrivate.h
+ *  WebKit
+ *
+ *  Created by John Sullivan on 9/6/04.
+ *  Copyright 2004 Apple Computer, Inc. All rights reserved.
+ *
+ */
+
+// These are private because callers should be using the cover methods. They are in
+// a Private (as opposed to Internal) header file because Safari uses some of them
+// for managed preferences.
+#define WebKitLogLevelPreferenceKey @"WebKitLogLevel"
+#define WebKitStandardFontPreferenceKey @"WebKitStandardFont"
+#define WebKitFixedFontPreferenceKey @"WebKitFixedFont"
+#define WebKitSerifFontPreferenceKey @"WebKitSerifFont"
+#define WebKitSansSerifFontPreferenceKey @"WebKitSansSerifFont"
+#define WebKitCursiveFontPreferenceKey @"WebKitCursiveFont"
+#define WebKitFantasyFontPreferenceKey @"WebKitFantasyFont"
+#define WebKitMinimumFontSizePreferenceKey @"WebKitMinimumFontSize"
+#define WebKitMinimumLogicalFontSizePreferenceKey @"WebKitMinimumLogicalFontSize"
+#define WebKitDefaultFontSizePreferenceKey @"WebKitDefaultFontSize"
+#define WebKitDefaultFixedFontSizePreferenceKey @"WebKitDefaultFixedFontSize"
+#define WebKitDefaultTextEncodingNamePreferenceKey @"WebKitDefaultTextEncodingName"
+#define WebKitUserStyleSheetEnabledPreferenceKey @"WebKitUserStyleSheetEnabledPreferenceKey"
+#define WebKitUserStyleSheetLocationPreferenceKey @"WebKitUserStyleSheetLocationPreferenceKey"
+#define WebKitShouldPrintBackgroundsPreferenceKey @"WebKitShouldPrintBackgroundsPreferenceKey"
+#define WebKitJavaEnabledPreferenceKey @"WebKitJavaEnabled"
+#define WebKitJavaScriptEnabledPreferenceKey @"WebKitJavaScriptEnabled"
+#define WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey @"WebKitJavaScriptCanOpenWindowsAutomatically"
+#define WebKitPluginsEnabledPreferenceKey @"WebKitPluginsEnabled"
+#define WebKitAllowAnimatedImagesPreferenceKey @"WebKitAllowAnimatedImagesPreferenceKey"
+#define WebKitAllowAnimatedImageLoopingPreferenceKey @"WebKitAllowAnimatedImageLoopingPreferenceKey"
+#define WebKitDisplayImagesKey @"WebKitDisplayImagesKey"
+#define WebKitPageCacheSizePreferenceKey @"WebKitPageCacheSizePreferenceKey"
+#define WebKitObjectCacheSizePreferenceKey @"WebKitObjectCacheSizePreferenceKey"
+#define WebKitBackForwardCacheExpirationIntervalKey @"WebKitBackForwardCacheExpirationIntervalKey"
+#define WebKitTabToLinksPreferenceKey @"WebKitTabToLinksPreferenceKey"
+#define WebKitPrivateBrowsingEnabledPreferenceKey @"WebKitPrivateBrowsingEnabled"
index 9afa6b491b92f5daf915c3c09ae9cb4a950ec561..cd7767835765374681921fed238e4e7c872c6d4d 100644 (file)
@@ -4,6 +4,7 @@
 */
 
 #import <WebKit/WebPreferencesPrivate.h>
+#import <WebKit/WebPreferenceKeysPrivate.h>
 
 #import <WebKit/WebKitLogging.h>
 #import <WebKit/WebKitNSStringExtras.h>
 
 #import <WebCore/WebCoreSettings.h>
 
-// These are private because callers should be using the cover methods
-#define WebKitLogLevelPreferenceKey @"WebKitLogLevel"
-#define WebKitStandardFontPreferenceKey @"WebKitStandardFont"
-#define WebKitFixedFontPreferenceKey @"WebKitFixedFont"
-#define WebKitSerifFontPreferenceKey @"WebKitSerifFont"
-#define WebKitSansSerifFontPreferenceKey @"WebKitSansSerifFont"
-#define WebKitCursiveFontPreferenceKey @"WebKitCursiveFont"
-#define WebKitFantasyFontPreferenceKey @"WebKitFantasyFont"
-#define WebKitMinimumFontSizePreferenceKey @"WebKitMinimumFontSize"
-#define WebKitMinimumLogicalFontSizePreferenceKey @"WebKitMinimumLogicalFontSize"
-#define WebKitDefaultFontSizePreferenceKey @"WebKitDefaultFontSize"
-#define WebKitDefaultFixedFontSizePreferenceKey @"WebKitDefaultFixedFontSize"
-#define WebKitDefaultTextEncodingNamePreferenceKey @"WebKitDefaultTextEncodingName"
-#define WebKitUserStyleSheetEnabledPreferenceKey @"WebKitUserStyleSheetEnabledPreferenceKey"
-#define WebKitUserStyleSheetLocationPreferenceKey @"WebKitUserStyleSheetLocationPreferenceKey"
-#define WebKitShouldPrintBackgroundsPreferenceKey @"WebKitShouldPrintBackgroundsPreferenceKey"
-#define WebKitJavaEnabledPreferenceKey @"WebKitJavaEnabled"
-#define WebKitJavaScriptEnabledPreferenceKey @"WebKitJavaScriptEnabled"
-#define WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey @"WebKitJavaScriptCanOpenWindowsAutomatically"
-#define WebKitPluginsEnabledPreferenceKey @"WebKitPluginsEnabled"
-#define WebKitAllowAnimatedImagesPreferenceKey @"WebKitAllowAnimatedImagesPreferenceKey"
-#define WebKitAllowAnimatedImageLoopingPreferenceKey @"WebKitAllowAnimatedImageLoopingPreferenceKey"
-#define WebKitDisplayImagesKey @"WebKitDisplayImagesKey"
-#define WebKitPageCacheSizePreferenceKey @"WebKitPageCacheSizePreferenceKey"
-#define WebKitObjectCacheSizePreferenceKey @"WebKitObjectCacheSizePreferenceKey"
-#define WebKitBackForwardCacheExpirationIntervalKey @"WebKitBackForwardCacheExpirationIntervalKey"
-#define WebKitTabToLinksPreferenceKey @"WebKitTabToLinksPreferenceKey"
-#define WebKitPrivateBrowsingEnabledPreferenceKey @"WebKitPrivateBrowsingEnabled"
-
 NSString *WebPreferencesChangedNotification = @"WebPreferencesChangedNotification";
 
 #define KEY(x) (_private->identifier ? [_private->identifier stringByAppendingString:(x)] : (x))