Revision: 12263
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12263&view=rev
Author: amaxwell
Date: 2008-01-04 13:58:54 -0800 (Fri, 04 Jan 2008)
Log Message:
-----------
Change webview cache model to reduce memory usage.
Modified Paths:
--------------
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m 2008-01-04
21:23:20 UTC (rev 12262)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m 2008-01-04
21:58:54 UTC (rev 12263)
@@ -41,6 +41,17 @@
#import <WebKit/WebKit.h>
#import <SystemConfiguration/SystemConfiguration.h>
+#if !defined(MAC_OS_X_VERSION_10_5) || (MAC_OS_X_VERSION_MAX_ALLOWED <
MAC_OS_X_VERSION_10_5)
+enum {
+ WebCacheModelDocumentViewer = 0,
+ WebCacheModelDocumentBrowser = 1,
+ WebCacheModelPrimaryWebBrowser = 2
+};
[EMAIL PROTECTED] WebPreferences (FVWebViewIcon)
+- (void)setCacheModel:(NSUInteger)cacheModel;
[EMAIL PROTECTED]
+#endif
+
@implementation FVWebViewIcon
static BOOL FVWebIconDisabled = NO;
@@ -369,6 +380,10 @@
[prefs setJavaScriptEnabled:NO];
[prefs setAllowsAnimatedImages:NO];
+ // most memory-efficient setting; remote resources are still cached to
disk
+ if ([prefs respondsToSelector:@selector(setCacheModel:)])
+ [prefs setCacheModel:WebCacheModelDocumentViewer];
+
[_webView setFrameLoadDelegate:self];
[_webView setPolicyDelegate:self];
[[_webView mainFrame] loadRequest:request];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit