diff --git a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/classes.nib b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/classes.nib index 57351621366..ae005b8655b 100644 --- a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/classes.nib +++ b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/classes.nib @@ -17,6 +17,7 @@ checkboxClicked = id; checkboxStartPageClicked = id; checkboxUseSystemHomePageClicked = id; + clearDiskCache = id; clearGlobalHistory = id; historyDaysModified = id; openSystemInternetPanel = id; diff --git a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib index 0ac65c83f3a..34d0a23a670 100644 --- a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib +++ b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib @@ -3,7 +3,7 @@ IBDocumentLocation - 109 32 522 320 0 0 1152 746 + 1166 344 522 320 1152 -88 1280 1024 IBFramework Version 248.0 IBGroupedObjects @@ -17,7 +17,11 @@ IBLastGroupID 8 + IBOpenObjects + + 5 + IBSystem Version - 5S66 + 5S60 diff --git a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/objects.nib b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/objects.nib index 4a7addc47c7..d97e393b2b0 100644 Binary files a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/objects.nib and b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/objects.nib differ diff --git a/mozilla/camino/PreferencePanes/Navigation/Navigation.h b/mozilla/camino/PreferencePanes/Navigation/Navigation.h index 9596647e636..1a90c5581bc 100644 --- a/mozilla/camino/PreferencePanes/Navigation/Navigation.h +++ b/mozilla/camino/PreferencePanes/Navigation/Navigation.h @@ -51,4 +51,6 @@ - (NSString*)getSystemHomePage; - (NSString*)getCurrentHomePage; +-(IBAction) clearDiskCache:(id)aSender; + @end diff --git a/mozilla/camino/PreferencePanes/Navigation/Navigation.mm b/mozilla/camino/PreferencePanes/Navigation/Navigation.mm index 9df09b91791..f1b026b77be 100644 --- a/mozilla/camino/PreferencePanes/Navigation/Navigation.mm +++ b/mozilla/camino/PreferencePanes/Navigation/Navigation.mm @@ -29,6 +29,7 @@ #include "nsIPrefBranch.h" #include "nsIPref.h" #include "nsIBrowserHistory.h" +#include "nsICacheService.h" const int kDefaultExpireDays = 9; @@ -216,4 +217,16 @@ const int kDefaultExpireDays = 9; } +// +// clearDiskCache: +// +// Clear the user's disk cache +// +-(IBAction) clearDiskCache:(id)aSender +{ + nsCOMPtr cacheServ ( do_GetService("@mozilla.org/network/cache-service;1") ); + if ( cacheServ ) + cacheServ->EvictEntries(nsICache::STORE_ON_DISK); +} + @end diff --git a/mozilla/camino/PreferencePanes/Navigation/Navigation.nib/classes.nib b/mozilla/camino/PreferencePanes/Navigation/Navigation.nib/classes.nib index 57351621366..ae005b8655b 100644 --- a/mozilla/camino/PreferencePanes/Navigation/Navigation.nib/classes.nib +++ b/mozilla/camino/PreferencePanes/Navigation/Navigation.nib/classes.nib @@ -17,6 +17,7 @@ checkboxClicked = id; checkboxStartPageClicked = id; checkboxUseSystemHomePageClicked = id; + clearDiskCache = id; clearGlobalHistory = id; historyDaysModified = id; openSystemInternetPanel = id; diff --git a/mozilla/camino/PreferencePanes/Navigation/Navigation.nib/info.nib b/mozilla/camino/PreferencePanes/Navigation/Navigation.nib/info.nib index 0ac65c83f3a..34d0a23a670 100644 --- a/mozilla/camino/PreferencePanes/Navigation/Navigation.nib/info.nib +++ b/mozilla/camino/PreferencePanes/Navigation/Navigation.nib/info.nib @@ -3,7 +3,7 @@ IBDocumentLocation - 109 32 522 320 0 0 1152 746 + 1166 344 522 320 1152 -88 1280 1024 IBFramework Version 248.0 IBGroupedObjects @@ -17,7 +17,11 @@ IBLastGroupID 8 + IBOpenObjects + + 5 + IBSystem Version - 5S66 + 5S60 diff --git a/mozilla/camino/PreferencePanes/Navigation/Navigation.nib/objects.nib b/mozilla/camino/PreferencePanes/Navigation/Navigation.nib/objects.nib index 4a7addc47c7..d97e393b2b0 100644 Binary files a/mozilla/camino/PreferencePanes/Navigation/Navigation.nib/objects.nib and b/mozilla/camino/PreferencePanes/Navigation/Navigation.nib/objects.nib differ diff --git a/mozilla/camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/classes.nib b/mozilla/camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/classes.nib index d4ea6a38378..1e1774e9942 100644 --- a/mozilla/camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/classes.nib +++ b/mozilla/camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/classes.nib @@ -10,10 +10,12 @@ { ACTIONS = { clearCookies = id; - clearDiskCache = id; clickEnableCookies = id; clickEnableJS = id; clickEnableJava = id; + clickEnableLeaveEncrypted = id; + clickEnableLoadLowGrade = id; + clickEnableViewMixed = id; clickPromptForCookie = id; }; CLASS = OrgMozillaChimeraPreferencePrivacy; @@ -22,7 +24,10 @@ mCookies = id; mEnableJS = NSButton; mEnableJava = NSButton; + mLeaveEncrypted = NSButton; + mLoadLowGrade = NSButton; mPromptForCookie = NSButton; + mViewMixed = NSButton; }; SUPERCLASS = NSPreferencePane; } diff --git a/mozilla/camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/info.nib b/mozilla/camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/info.nib index 725ce2bd851..2681c3cf257 100644 --- a/mozilla/camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/info.nib +++ b/mozilla/camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/info.nib @@ -3,7 +3,7 @@ IBDocumentLocation - 119 80 356 240 0 0 1152 746 + 1218 97 356 240 1152 -88 1280 1024 IBFramework Version 248.0 IBGroupedObjects @@ -16,7 +16,11 @@ IBLastGroupID 4 + IBOpenObjects + + 5 + IBSystem Version - 5S66 + 5S60 diff --git a/mozilla/camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/objects.nib b/mozilla/camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/objects.nib index c07423b9574..be74e2fdc58 100644 Binary files a/mozilla/camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/objects.nib and b/mozilla/camino/PreferencePanes/Privacy/English.lproj/Privacy.nib/objects.nib differ diff --git a/mozilla/camino/PreferencePanes/Privacy/Privacy.nib/classes.nib b/mozilla/camino/PreferencePanes/Privacy/Privacy.nib/classes.nib index d4ea6a38378..1e1774e9942 100644 --- a/mozilla/camino/PreferencePanes/Privacy/Privacy.nib/classes.nib +++ b/mozilla/camino/PreferencePanes/Privacy/Privacy.nib/classes.nib @@ -10,10 +10,12 @@ { ACTIONS = { clearCookies = id; - clearDiskCache = id; clickEnableCookies = id; clickEnableJS = id; clickEnableJava = id; + clickEnableLeaveEncrypted = id; + clickEnableLoadLowGrade = id; + clickEnableViewMixed = id; clickPromptForCookie = id; }; CLASS = OrgMozillaChimeraPreferencePrivacy; @@ -22,7 +24,10 @@ mCookies = id; mEnableJS = NSButton; mEnableJava = NSButton; + mLeaveEncrypted = NSButton; + mLoadLowGrade = NSButton; mPromptForCookie = NSButton; + mViewMixed = NSButton; }; SUPERCLASS = NSPreferencePane; } diff --git a/mozilla/camino/PreferencePanes/Privacy/Privacy.nib/info.nib b/mozilla/camino/PreferencePanes/Privacy/Privacy.nib/info.nib index 725ce2bd851..2681c3cf257 100644 --- a/mozilla/camino/PreferencePanes/Privacy/Privacy.nib/info.nib +++ b/mozilla/camino/PreferencePanes/Privacy/Privacy.nib/info.nib @@ -3,7 +3,7 @@ IBDocumentLocation - 119 80 356 240 0 0 1152 746 + 1218 97 356 240 1152 -88 1280 1024 IBFramework Version 248.0 IBGroupedObjects @@ -16,7 +16,11 @@ IBLastGroupID 4 + IBOpenObjects + + 5 + IBSystem Version - 5S66 + 5S60 diff --git a/mozilla/camino/PreferencePanes/Privacy/Privacy.nib/objects.nib b/mozilla/camino/PreferencePanes/Privacy/Privacy.nib/objects.nib index c07423b9574..be74e2fdc58 100644 Binary files a/mozilla/camino/PreferencePanes/Privacy/Privacy.nib/objects.nib and b/mozilla/camino/PreferencePanes/Privacy/Privacy.nib/objects.nib differ diff --git a/mozilla/camino/PreferencePanes/Privacy/PrivacyPane.h b/mozilla/camino/PreferencePanes/Privacy/PrivacyPane.h index 110a0c670a9..47fac6254d1 100644 --- a/mozilla/camino/PreferencePanes/Privacy/PrivacyPane.h +++ b/mozilla/camino/PreferencePanes/Privacy/PrivacyPane.h @@ -1,9 +1,10 @@ #import #import +#import "PreferencePaneBase.h" class nsIPref; -@interface OrgMozillaChimeraPreferencePrivacy : NSPreferencePane +@interface OrgMozillaChimeraPreferencePrivacy : PreferencePaneBase { IBOutlet id mCookies; IBOutlet NSButton* mPromptForCookie; @@ -11,15 +12,20 @@ class nsIPref; IBOutlet NSButton* mEnableJS; IBOutlet NSButton* mEnableJava; - nsIPref* mPrefService; // strong ref, but can't use comPtr here + IBOutlet NSButton* mLeaveEncrypted; + IBOutlet NSButton* mLoadLowGrade; + IBOutlet NSButton* mViewMixed; } -(IBAction) clearCookies:(id)aSender; --(IBAction) clearDiskCache:(id)aSender; -(IBAction) clickPromptForCookie:(id)sender; -(IBAction) clickEnableCookies:(id)sender; -(IBAction) clickEnableJS:(id)sender; -(IBAction) clickEnableJava:(id)sender; +-(IBAction) clickEnableLeaveEncrypted:(id)sender; +-(IBAction) clickEnableLoadLowGrade:(id)sender; +-(IBAction) clickEnableViewMixed:(id)sender; + @end diff --git a/mozilla/camino/PreferencePanes/Privacy/PrivacyPane.mm b/mozilla/camino/PreferencePanes/Privacy/PrivacyPane.mm index 8d30ba1c839..1b24b39d550 100644 --- a/mozilla/camino/PreferencePanes/Privacy/PrivacyPane.mm +++ b/mozilla/camino/PreferencePanes/Privacy/PrivacyPane.mm @@ -4,7 +4,11 @@ #include "nsIServiceManagerUtils.h" #include "nsIPref.h" #include "nsCCookieManager.h" -#include "nsICacheService.h" + +// prefs for showing security dialogs +#define WEAK_SITE_PREF "security.warn_entering_weak" +#define LEAVE_SITE_PREF "security.warn_leaving_secure" +#define MIXEDCONTENT_PREF "security.warn_viewing_mixed" @implementation OrgMozillaChimeraPreferencePrivacy @@ -14,21 +18,6 @@ [super dealloc]; } -- (id) initWithBundle:(NSBundle *) bundle -{ - self = [super initWithBundle:bundle] ; - - nsCOMPtr prefService ( do_GetService(NS_PREF_CONTRACTID) ); - NS_ASSERTION(prefService, "Could not get pref service, pref panel left uninitialized"); - mPrefService = prefService.get(); - NS_IF_ADDREF(mPrefService); - - return self; -} - -- (void)awakeFromNib -{ -} - (void)mainViewDidLoad { @@ -48,6 +37,8 @@ mPrefService->GetBoolPref("network.cookie.warnAboutCookies", &warnAboutCookies); [mPromptForCookie setState:(warnAboutCookies ? NSOnState : NSOffState)]; + // Set initial value on Java/JavaScript checkboxes + PRBool jsEnabled = PR_TRUE; mPrefService->GetBoolPref("javascript.enabled", &jsEnabled); [mEnableJS setState:(jsEnabled ? NSOnState : NSOffState)]; @@ -55,6 +46,20 @@ PRBool javaEnabled = PR_TRUE; mPrefService->GetBoolPref("security.enable_java", &javaEnabled); [mEnableJava setState:(javaEnabled ? NSOnState : NSOffState)]; + + // Set initial value on Security checkboxes + + PRBool leaveEncrypted = PR_TRUE; + mPrefService->GetBoolPref(LEAVE_SITE_PREF, &leaveEncrypted); + [mLeaveEncrypted setState:(leaveEncrypted ? NSOnState : NSOffState)]; + + PRBool loadLowGrade = PR_TRUE; + mPrefService->GetBoolPref(WEAK_SITE_PREF, &loadLowGrade); + [mLoadLowGrade setState:(loadLowGrade ? NSOnState : NSOffState)]; + + PRBool viewMixed = PR_TRUE; + mPrefService->GetBoolPref(MIXEDCONTENT_PREF, &viewMixed); + [mViewMixed setState:(viewMixed ? NSOnState : NSOffState)]; } // @@ -69,18 +74,6 @@ cookieMonster->RemoveAll(); } -// -// clearDiskCache: -// -// Clear the user's disk cache -// --(IBAction) clearDiskCache:(id)aSender -{ - nsCOMPtr cacheServ ( do_GetService("@mozilla.org/network/cache-service;1") ); - if ( cacheServ ) - cacheServ->EvictEntries(nsICache::STORE_ON_DISK); -} - // // clickPromptForCookie: // @@ -88,10 +81,7 @@ // -(IBAction) clickPromptForCookie:(id)sender { - if ( !mPrefService ) - return; - mPrefService->SetBoolPref("network.cookie.warnAboutCookies", - [mPromptForCookie state] == NSOnState ? PR_TRUE : PR_FALSE); + [self setPref:"network.cookie.warnAboutCookies" toBoolean:[sender state] == NSOnState]; } // @@ -114,10 +104,7 @@ // -(IBAction) clickEnableJS:(id)sender { - if ( !mPrefService ) - return; - mPrefService->SetBoolPref("javascript.enabled", - [mEnableJS state] == NSOnState ? PR_TRUE : PR_FALSE); + [self setPref:"javascript.enabled" toBoolean:[sender state] == NSOnState]; } // @@ -127,10 +114,30 @@ // -(IBAction) clickEnableJava:(id)sender { - if ( !mPrefService ) - return; - mPrefService->SetBoolPref("security.enable_java", - [mEnableJava state] == NSOnState ? PR_TRUE : PR_FALSE); + [self setPref:"security.enable_java" toBoolean:[sender state] == NSOnState]; +} + +// +// clickEnableViewMixed: +// clickEnableLoadLowGrade: +// clickEnableLeaveEncrypted: +// +// Set prefs for warnings/alerts wrt secure sites +// + +-(IBAction) clickEnableViewMixed:(id)sender +{ + [self setPref:MIXEDCONTENT_PREF toBoolean:[sender state] == NSOnState]; +} + +-(IBAction) clickEnableLoadLowGrade:(id)sender +{ + [self setPref:WEAK_SITE_PREF toBoolean:[sender state] == NSOnState]; +} + +-(IBAction) clickEnableLeaveEncrypted:(id)sender +{ + [self setPref:LEAVE_SITE_PREF toBoolean:[sender state] == NSOnState]; } @end diff --git a/mozilla/chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/classes.nib b/mozilla/chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/classes.nib index 57351621366..ae005b8655b 100644 --- a/mozilla/chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/classes.nib +++ b/mozilla/chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/classes.nib @@ -17,6 +17,7 @@ checkboxClicked = id; checkboxStartPageClicked = id; checkboxUseSystemHomePageClicked = id; + clearDiskCache = id; clearGlobalHistory = id; historyDaysModified = id; openSystemInternetPanel = id; diff --git a/mozilla/chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib b/mozilla/chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib index 0ac65c83f3a..34d0a23a670 100644 --- a/mozilla/chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib +++ b/mozilla/chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib @@ -3,7 +3,7 @@ IBDocumentLocation - 109 32 522 320 0 0 1152 746 + 1166 344 522 320 1152 -88 1280 1024 IBFramework Version 248.0 IBGroupedObjects @@ -17,7 +17,11 @@ IBLastGroupID 8 + IBOpenObjects + + 5 + IBSystem Version - 5S66 + 5S60 diff --git a/mozilla/chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/objects.nib b/mozilla/chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/objects.nib index 4a7addc47c7..d97e393b2b0 100644 Binary files a/mozilla/chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/objects.nib and b/mozilla/chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/objects.nib differ diff --git a/mozilla/chimera/PreferencePanes/Navigation/Navigation.h b/mozilla/chimera/PreferencePanes/Navigation/Navigation.h index 9596647e636..1a90c5581bc 100644 --- a/mozilla/chimera/PreferencePanes/Navigation/Navigation.h +++ b/mozilla/chimera/PreferencePanes/Navigation/Navigation.h @@ -51,4 +51,6 @@ - (NSString*)getSystemHomePage; - (NSString*)getCurrentHomePage; +-(IBAction) clearDiskCache:(id)aSender; + @end diff --git a/mozilla/chimera/PreferencePanes/Navigation/Navigation.mm b/mozilla/chimera/PreferencePanes/Navigation/Navigation.mm index 9df09b91791..f1b026b77be 100644 --- a/mozilla/chimera/PreferencePanes/Navigation/Navigation.mm +++ b/mozilla/chimera/PreferencePanes/Navigation/Navigation.mm @@ -29,6 +29,7 @@ #include "nsIPrefBranch.h" #include "nsIPref.h" #include "nsIBrowserHistory.h" +#include "nsICacheService.h" const int kDefaultExpireDays = 9; @@ -216,4 +217,16 @@ const int kDefaultExpireDays = 9; } +// +// clearDiskCache: +// +// Clear the user's disk cache +// +-(IBAction) clearDiskCache:(id)aSender +{ + nsCOMPtr cacheServ ( do_GetService("@mozilla.org/network/cache-service;1") ); + if ( cacheServ ) + cacheServ->EvictEntries(nsICache::STORE_ON_DISK); +} + @end diff --git a/mozilla/chimera/PreferencePanes/Navigation/Navigation.nib/classes.nib b/mozilla/chimera/PreferencePanes/Navigation/Navigation.nib/classes.nib index 57351621366..ae005b8655b 100644 --- a/mozilla/chimera/PreferencePanes/Navigation/Navigation.nib/classes.nib +++ b/mozilla/chimera/PreferencePanes/Navigation/Navigation.nib/classes.nib @@ -17,6 +17,7 @@ checkboxClicked = id; checkboxStartPageClicked = id; checkboxUseSystemHomePageClicked = id; + clearDiskCache = id; clearGlobalHistory = id; historyDaysModified = id; openSystemInternetPanel = id; diff --git a/mozilla/chimera/PreferencePanes/Navigation/Navigation.nib/info.nib b/mozilla/chimera/PreferencePanes/Navigation/Navigation.nib/info.nib index 0ac65c83f3a..34d0a23a670 100644 --- a/mozilla/chimera/PreferencePanes/Navigation/Navigation.nib/info.nib +++ b/mozilla/chimera/PreferencePanes/Navigation/Navigation.nib/info.nib @@ -3,7 +3,7 @@ IBDocumentLocation - 109 32 522 320 0 0 1152 746 + 1166 344 522 320 1152 -88 1280 1024 IBFramework Version 248.0 IBGroupedObjects @@ -17,7 +17,11 @@ IBLastGroupID 8 + IBOpenObjects + + 5 + IBSystem Version - 5S66 + 5S60 diff --git a/mozilla/chimera/PreferencePanes/Navigation/Navigation.nib/objects.nib b/mozilla/chimera/PreferencePanes/Navigation/Navigation.nib/objects.nib index 4a7addc47c7..d97e393b2b0 100644 Binary files a/mozilla/chimera/PreferencePanes/Navigation/Navigation.nib/objects.nib and b/mozilla/chimera/PreferencePanes/Navigation/Navigation.nib/objects.nib differ diff --git a/mozilla/chimera/PreferencePanes/Privacy/English.lproj/Privacy.nib/classes.nib b/mozilla/chimera/PreferencePanes/Privacy/English.lproj/Privacy.nib/classes.nib index d4ea6a38378..1e1774e9942 100644 --- a/mozilla/chimera/PreferencePanes/Privacy/English.lproj/Privacy.nib/classes.nib +++ b/mozilla/chimera/PreferencePanes/Privacy/English.lproj/Privacy.nib/classes.nib @@ -10,10 +10,12 @@ { ACTIONS = { clearCookies = id; - clearDiskCache = id; clickEnableCookies = id; clickEnableJS = id; clickEnableJava = id; + clickEnableLeaveEncrypted = id; + clickEnableLoadLowGrade = id; + clickEnableViewMixed = id; clickPromptForCookie = id; }; CLASS = OrgMozillaChimeraPreferencePrivacy; @@ -22,7 +24,10 @@ mCookies = id; mEnableJS = NSButton; mEnableJava = NSButton; + mLeaveEncrypted = NSButton; + mLoadLowGrade = NSButton; mPromptForCookie = NSButton; + mViewMixed = NSButton; }; SUPERCLASS = NSPreferencePane; } diff --git a/mozilla/chimera/PreferencePanes/Privacy/English.lproj/Privacy.nib/info.nib b/mozilla/chimera/PreferencePanes/Privacy/English.lproj/Privacy.nib/info.nib index 725ce2bd851..2681c3cf257 100644 --- a/mozilla/chimera/PreferencePanes/Privacy/English.lproj/Privacy.nib/info.nib +++ b/mozilla/chimera/PreferencePanes/Privacy/English.lproj/Privacy.nib/info.nib @@ -3,7 +3,7 @@ IBDocumentLocation - 119 80 356 240 0 0 1152 746 + 1218 97 356 240 1152 -88 1280 1024 IBFramework Version 248.0 IBGroupedObjects @@ -16,7 +16,11 @@ IBLastGroupID 4 + IBOpenObjects + + 5 + IBSystem Version - 5S66 + 5S60 diff --git a/mozilla/chimera/PreferencePanes/Privacy/English.lproj/Privacy.nib/objects.nib b/mozilla/chimera/PreferencePanes/Privacy/English.lproj/Privacy.nib/objects.nib index c07423b9574..be74e2fdc58 100644 Binary files a/mozilla/chimera/PreferencePanes/Privacy/English.lproj/Privacy.nib/objects.nib and b/mozilla/chimera/PreferencePanes/Privacy/English.lproj/Privacy.nib/objects.nib differ diff --git a/mozilla/chimera/PreferencePanes/Privacy/Privacy.nib/classes.nib b/mozilla/chimera/PreferencePanes/Privacy/Privacy.nib/classes.nib index d4ea6a38378..1e1774e9942 100644 --- a/mozilla/chimera/PreferencePanes/Privacy/Privacy.nib/classes.nib +++ b/mozilla/chimera/PreferencePanes/Privacy/Privacy.nib/classes.nib @@ -10,10 +10,12 @@ { ACTIONS = { clearCookies = id; - clearDiskCache = id; clickEnableCookies = id; clickEnableJS = id; clickEnableJava = id; + clickEnableLeaveEncrypted = id; + clickEnableLoadLowGrade = id; + clickEnableViewMixed = id; clickPromptForCookie = id; }; CLASS = OrgMozillaChimeraPreferencePrivacy; @@ -22,7 +24,10 @@ mCookies = id; mEnableJS = NSButton; mEnableJava = NSButton; + mLeaveEncrypted = NSButton; + mLoadLowGrade = NSButton; mPromptForCookie = NSButton; + mViewMixed = NSButton; }; SUPERCLASS = NSPreferencePane; } diff --git a/mozilla/chimera/PreferencePanes/Privacy/Privacy.nib/info.nib b/mozilla/chimera/PreferencePanes/Privacy/Privacy.nib/info.nib index 725ce2bd851..2681c3cf257 100644 --- a/mozilla/chimera/PreferencePanes/Privacy/Privacy.nib/info.nib +++ b/mozilla/chimera/PreferencePanes/Privacy/Privacy.nib/info.nib @@ -3,7 +3,7 @@ IBDocumentLocation - 119 80 356 240 0 0 1152 746 + 1218 97 356 240 1152 -88 1280 1024 IBFramework Version 248.0 IBGroupedObjects @@ -16,7 +16,11 @@ IBLastGroupID 4 + IBOpenObjects + + 5 + IBSystem Version - 5S66 + 5S60 diff --git a/mozilla/chimera/PreferencePanes/Privacy/Privacy.nib/objects.nib b/mozilla/chimera/PreferencePanes/Privacy/Privacy.nib/objects.nib index c07423b9574..be74e2fdc58 100644 Binary files a/mozilla/chimera/PreferencePanes/Privacy/Privacy.nib/objects.nib and b/mozilla/chimera/PreferencePanes/Privacy/Privacy.nib/objects.nib differ diff --git a/mozilla/chimera/PreferencePanes/Privacy/PrivacyPane.h b/mozilla/chimera/PreferencePanes/Privacy/PrivacyPane.h index 110a0c670a9..47fac6254d1 100644 --- a/mozilla/chimera/PreferencePanes/Privacy/PrivacyPane.h +++ b/mozilla/chimera/PreferencePanes/Privacy/PrivacyPane.h @@ -1,9 +1,10 @@ #import #import +#import "PreferencePaneBase.h" class nsIPref; -@interface OrgMozillaChimeraPreferencePrivacy : NSPreferencePane +@interface OrgMozillaChimeraPreferencePrivacy : PreferencePaneBase { IBOutlet id mCookies; IBOutlet NSButton* mPromptForCookie; @@ -11,15 +12,20 @@ class nsIPref; IBOutlet NSButton* mEnableJS; IBOutlet NSButton* mEnableJava; - nsIPref* mPrefService; // strong ref, but can't use comPtr here + IBOutlet NSButton* mLeaveEncrypted; + IBOutlet NSButton* mLoadLowGrade; + IBOutlet NSButton* mViewMixed; } -(IBAction) clearCookies:(id)aSender; --(IBAction) clearDiskCache:(id)aSender; -(IBAction) clickPromptForCookie:(id)sender; -(IBAction) clickEnableCookies:(id)sender; -(IBAction) clickEnableJS:(id)sender; -(IBAction) clickEnableJava:(id)sender; +-(IBAction) clickEnableLeaveEncrypted:(id)sender; +-(IBAction) clickEnableLoadLowGrade:(id)sender; +-(IBAction) clickEnableViewMixed:(id)sender; + @end diff --git a/mozilla/chimera/PreferencePanes/Privacy/PrivacyPane.mm b/mozilla/chimera/PreferencePanes/Privacy/PrivacyPane.mm index 8d30ba1c839..1b24b39d550 100644 --- a/mozilla/chimera/PreferencePanes/Privacy/PrivacyPane.mm +++ b/mozilla/chimera/PreferencePanes/Privacy/PrivacyPane.mm @@ -4,7 +4,11 @@ #include "nsIServiceManagerUtils.h" #include "nsIPref.h" #include "nsCCookieManager.h" -#include "nsICacheService.h" + +// prefs for showing security dialogs +#define WEAK_SITE_PREF "security.warn_entering_weak" +#define LEAVE_SITE_PREF "security.warn_leaving_secure" +#define MIXEDCONTENT_PREF "security.warn_viewing_mixed" @implementation OrgMozillaChimeraPreferencePrivacy @@ -14,21 +18,6 @@ [super dealloc]; } -- (id) initWithBundle:(NSBundle *) bundle -{ - self = [super initWithBundle:bundle] ; - - nsCOMPtr prefService ( do_GetService(NS_PREF_CONTRACTID) ); - NS_ASSERTION(prefService, "Could not get pref service, pref panel left uninitialized"); - mPrefService = prefService.get(); - NS_IF_ADDREF(mPrefService); - - return self; -} - -- (void)awakeFromNib -{ -} - (void)mainViewDidLoad { @@ -48,6 +37,8 @@ mPrefService->GetBoolPref("network.cookie.warnAboutCookies", &warnAboutCookies); [mPromptForCookie setState:(warnAboutCookies ? NSOnState : NSOffState)]; + // Set initial value on Java/JavaScript checkboxes + PRBool jsEnabled = PR_TRUE; mPrefService->GetBoolPref("javascript.enabled", &jsEnabled); [mEnableJS setState:(jsEnabled ? NSOnState : NSOffState)]; @@ -55,6 +46,20 @@ PRBool javaEnabled = PR_TRUE; mPrefService->GetBoolPref("security.enable_java", &javaEnabled); [mEnableJava setState:(javaEnabled ? NSOnState : NSOffState)]; + + // Set initial value on Security checkboxes + + PRBool leaveEncrypted = PR_TRUE; + mPrefService->GetBoolPref(LEAVE_SITE_PREF, &leaveEncrypted); + [mLeaveEncrypted setState:(leaveEncrypted ? NSOnState : NSOffState)]; + + PRBool loadLowGrade = PR_TRUE; + mPrefService->GetBoolPref(WEAK_SITE_PREF, &loadLowGrade); + [mLoadLowGrade setState:(loadLowGrade ? NSOnState : NSOffState)]; + + PRBool viewMixed = PR_TRUE; + mPrefService->GetBoolPref(MIXEDCONTENT_PREF, &viewMixed); + [mViewMixed setState:(viewMixed ? NSOnState : NSOffState)]; } // @@ -69,18 +74,6 @@ cookieMonster->RemoveAll(); } -// -// clearDiskCache: -// -// Clear the user's disk cache -// --(IBAction) clearDiskCache:(id)aSender -{ - nsCOMPtr cacheServ ( do_GetService("@mozilla.org/network/cache-service;1") ); - if ( cacheServ ) - cacheServ->EvictEntries(nsICache::STORE_ON_DISK); -} - // // clickPromptForCookie: // @@ -88,10 +81,7 @@ // -(IBAction) clickPromptForCookie:(id)sender { - if ( !mPrefService ) - return; - mPrefService->SetBoolPref("network.cookie.warnAboutCookies", - [mPromptForCookie state] == NSOnState ? PR_TRUE : PR_FALSE); + [self setPref:"network.cookie.warnAboutCookies" toBoolean:[sender state] == NSOnState]; } // @@ -114,10 +104,7 @@ // -(IBAction) clickEnableJS:(id)sender { - if ( !mPrefService ) - return; - mPrefService->SetBoolPref("javascript.enabled", - [mEnableJS state] == NSOnState ? PR_TRUE : PR_FALSE); + [self setPref:"javascript.enabled" toBoolean:[sender state] == NSOnState]; } // @@ -127,10 +114,30 @@ // -(IBAction) clickEnableJava:(id)sender { - if ( !mPrefService ) - return; - mPrefService->SetBoolPref("security.enable_java", - [mEnableJava state] == NSOnState ? PR_TRUE : PR_FALSE); + [self setPref:"security.enable_java" toBoolean:[sender state] == NSOnState]; +} + +// +// clickEnableViewMixed: +// clickEnableLoadLowGrade: +// clickEnableLeaveEncrypted: +// +// Set prefs for warnings/alerts wrt secure sites +// + +-(IBAction) clickEnableViewMixed:(id)sender +{ + [self setPref:MIXEDCONTENT_PREF toBoolean:[sender state] == NSOnState]; +} + +-(IBAction) clickEnableLoadLowGrade:(id)sender +{ + [self setPref:WEAK_SITE_PREF toBoolean:[sender state] == NSOnState]; +} + +-(IBAction) clickEnableLeaveEncrypted:(id)sender +{ + [self setPref:LEAVE_SITE_PREF toBoolean:[sender state] == NSOnState]; } @end