From fe6bbf173c6ca74d7f6f004e2ca4bdeba60f2603 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. git-svn-id: svn://10.0.0.236/trunk@155540 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/embedding/browser/photon/src/EmbedPrivate.cpp | 2 -- mozilla/embedding/browser/photon/src/PtMozilla.cpp | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mozilla/embedding/browser/photon/src/EmbedPrivate.cpp b/mozilla/embedding/browser/photon/src/EmbedPrivate.cpp index 1283971f710..ae7dcb70bcd 100644 --- a/mozilla/embedding/browser/photon/src/EmbedPrivate.cpp +++ b/mozilla/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/mozilla/embedding/browser/photon/src/PtMozilla.cpp b/mozilla/embedding/browser/photon/src/PtMozilla.cpp index 18c5f7a17b2..f9765436668 100644 --- a/mozilla/embedding/browser/photon/src/PtMozilla.cpp +++ b/mozilla/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 ) );