Commit 961724ed authored by thatcher's avatar thatcher

Reviewed by Geoff.

        <rdar://problem/4841044> Temporarily default Mail.app editable link clicking behavior, until they do it themselves

        * WebKit.xcodeproj/project.pbxproj:
        * WebView/WebView.mm:
        (+[WebView initialize]):
        (-[WebView setPreferences:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 11fc281b
2006-11-17 Timothy Hatcher <timothy@apple.com>
Reviewed by Geoff.
<rdar://problem/4841044> Temporarily default Mail.app editable link clicking behavior, until they do it themselves
* WebKit.xcodeproj/project.pbxproj:
* WebView/WebView.mm:
(+[WebView initialize]):
(-[WebView setPreferences:]):
2006-11-16 Don Gibson <dgibson77@gmail.com>
Reviewed and landed by ap.
......
......@@ -1666,7 +1666,7 @@ NSMutableDictionary *countInvocations;
@implementation WebView
#if REMOVE_SAFARI_DOM_TREE_DEBUG_ITEM
#ifdef REMOVE_SAFARI_DOM_TREE_DEBUG_ITEM
// this prevents open source users from crashing when using the Show DOM Tree menu item in Safari
// FIXME: remove this when it is no longer needed to prevent Safari from crashing
+(void)initialize
......@@ -1695,6 +1695,18 @@ NSMutableDictionary *countInvocations;
}
#endif
#ifdef DISABLE_EDITABLE_LINKS_IN_MAIL
+(void)initialize
{
static BOOL tooLate = NO;
if (!tooLate) {
if ([[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.mail"] && [[WebPreferences standardPreferences] editableLinkBehavior] == WebKitEditableLinkDefaultBehavior)
[[WebPreferences standardPreferences] setEditableLinkBehavior:WebKitEditableLinkOnlyLiveWithShiftKey];
tooLate = YES;
}
}
#endif
+ (BOOL)canShowMIMEType:(NSString *)MIMEType
{
return [self _viewClass:nil andRepresentationClass:nil forMIMEType:MIMEType];
......@@ -2017,6 +2029,10 @@ NS_ENDHANDLER
- (void)setPreferences:(WebPreferences *)prefs
{
if (_private->preferences != prefs) {
#ifdef DISABLE_EDITABLE_LINKS_IN_MAIL
if ([[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.mail"] && [prefs editableLinkBehavior] == WebKitEditableLinkDefaultBehavior)
[prefs setEditableLinkBehavior:WebKitEditableLinkOnlyLiveWithShiftKey];
#endif
[[NSNotificationCenter defaultCenter] removeObserver:self name:WebPreferencesChangedNotification object:[self preferences]];
[WebPreferences _removeReferenceForIdentifier:[_private->preferences identifier]];
[_private->preferences release];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment