From 621e529bcc6a982c2104b27b8fb7248cfd1bd5ec Mon Sep 17 00:00:00 2001 From: "amardare%qnx.com" Date: Mon, 26 Apr 2004 19:53:40 +0000 Subject: [PATCH] Changes for qnx/photon platform only. It should not affect other platforms. Added the memory_cache_kb_size setting. --- embedding/browser/photon/src/EmbedPrivate.cpp | 2 -- embedding/browser/photon/src/PtMozilla.cpp | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/embedding/browser/photon/src/EmbedPrivate.cpp b/embedding/browser/photon/src/EmbedPrivate.cpp index 1283971f7105..ae7dcb70bcdb 100644 --- a/embedding/browser/photon/src/EmbedPrivate.cpp +++ b/embedding/browser/photon/src/EmbedPrivate.cpp @@ -932,8 +932,6 @@ static void mozilla_set_default_pref( nsIPref *pref ) nsIPref *pref = moz->EmbedRef->GetPrefs(); */ -/* ATENTIE */ printf( "In mozilla_set_default_pref\n" ); - /* translation set = Western European (ISO 8859-1) */ pref->SetUnicharPref( "intl.charset.default", NS_ConvertASCIItoUCS2("iso8859-1").get()); diff --git a/embedding/browser/photon/src/PtMozilla.cpp b/embedding/browser/photon/src/PtMozilla.cpp index 18c5f7a17b24..f9765436668d 100644 --- a/embedding/browser/photon/src/PtMozilla.cpp +++ b/embedding/browser/photon/src/PtMozilla.cpp @@ -641,6 +641,13 @@ mozilla_set_pref( PtWidget_t *widget, char *option, char *value ) else if( !strcmp( option, "clear_main_cache_on_exit" ) ) ; /* not used */ else if( !strcmp( option, "keep_index_file_updated" ) ) ; /* not used */ +/* memory cache options */ + else if( !strcmp( option, "memory_cache_kb_size" ) || !strcmp( option, "image_cache_size_KB" ) ) { + int kb = atoi( value ); + if( kb <= 0 ) kb = 100; /* have a minimum threshold */ + pref->SetIntPref( "browser.cache.memory.capacity", kb ); + } + /* Miscellaneous options */ else if( !strcmp( option, "History_Expire" ) ) pref->SetIntPref( "browser.history_expire_days", atoi( value ) );