--- kdeaddons-3.5.6/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp.orig 2005-10-10 16:53:12.000000000 +0200 +++ kdeaddons-3.5.6/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp 2007-02-15 19:30:51.000000000 +0100 @@ -101,6 +101,7 @@ "cachepolicy" ); QStringList policies; policies += i18n( "&Keep Cache in Sync" ); + policies += i18n( "&Update cache if expired" ); policies += i18n( "&Use Cache if Possible" ); policies += i18n( "&Offline Browsing Mode" ); sAction->setItems( policies ); @@ -138,22 +139,23 @@ ((KToggleAction*)actionCollection()->action("usecache"))->setChecked(KProtocolManager::useCache()); KIO::CacheControl cc = KProtocolManager::cacheControl(); + switch ( cc ) { - case KIO::CC_Verify: + case KIO::CC_Refresh: ((KSelectAction*)actionCollection()->action("cachepolicy"))->setCurrentItem( 0 ); break; - case KIO::CC_CacheOnly: - ((KSelectAction*)actionCollection()->action("cachepolicy"))->setCurrentItem( 2 ); + case KIO::CC_Verify: + ((KSelectAction*)actionCollection()->action("cachepolicy"))->setCurrentItem( 1 ); break; case KIO::CC_Cache: - ((KSelectAction*)actionCollection()->action("cachepolicy"))->setCurrentItem( 1 ); + ((KSelectAction*)actionCollection()->action("cachepolicy"))->setCurrentItem( 2 ); break; - case KIO::CC_Reload: // nothing for now - case KIO::CC_Refresh: - default: + case KIO::CC_CacheOnly: + ((KSelectAction*)actionCollection()->action("cachepolicy"))->setCurrentItem( 3 ); break; - + default: + break; // Unknown cache strategy, dont check anything } } @@ -292,12 +294,15 @@ switch ( p ) { case 0: - policy = KIO::getCacheControlString( KIO::CC_Verify ); + policy = KIO::getCacheControlString( KIO::CC_Refresh ); break; case 1: - policy = KIO::getCacheControlString( KIO::CC_Cache ); + policy = KIO::getCacheControlString( KIO::CC_Verify ); break; case 2: + policy = KIO::getCacheControlString( KIO::CC_Cache ); + break; + case 3: policy = KIO::getCacheControlString( KIO::CC_CacheOnly ); break; };