This commit is contained in:
pinkerton%netscape.com 2002-05-23 00:24:08 +00:00
Родитель 07ef4c3888
Коммит b84ccc498f
20 изменённых файлов: 316 добавлений и 16 удалений

Просмотреть файл

@ -49,7 +49,19 @@
OUTLETS = {_firstKeyView = id; _initialKeyView = id; _lastKeyView = id; _window = id; }; OUTLETS = {_firstKeyView = id; _initialKeyView = id; _lastKeyView = id; _window = id; };
SUPERCLASS = NSObject; SUPERCLASS = NSObject;
}, },
{CLASS = PersonalPane; LANGUAGE = ObjC; SUPERCLASS = NSPreferencePane; } {CLASS = PersonalPane; LANGUAGE = ObjC; SUPERCLASS = NSPreferencePane; },
{
ACTIONS = {clearCookies = id; clearDiskCache = id; };
CLASS = PrivacyPane;
LANGUAGE = ObjC;
OUTLETS = {
mCookies = id;
mEnableJS = NSButton;
mEnableJava = NSButton;
mPromptForCookie = NSButton;
};
SUPERCLASS = NSPreferencePane;
}
); );
IBVersion = 1; IBVersion = 1;
} }

Просмотреть файл

@ -3,15 +3,15 @@
<plist version="0.9"> <plist version="0.9">
<dict> <dict>
<key>IBDocumentLocation</key> <key>IBDocumentLocation</key>
<string>372 4 356 240 0 0 1152 746 </string> <string>377 51 356 240 0 0 1024 746 </string>
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>248.0</string> <string>248.0</string>
<key>IBGroupedObjects</key> <key>IBGroupedObjects</key>
<dict> <dict>
<key>3</key> <key>3</key>
<array> <array>
<string>153</string> <string>0</string>
<string>155</string> <string>0</string>
</array> </array>
</dict> </dict>
<key>IBLastGroupID</key> <key>IBLastGroupID</key>

Двоичные данные
camino/PreferencePanes/Personal/English.lproj/Personal.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -49,7 +49,19 @@
OUTLETS = {_firstKeyView = id; _initialKeyView = id; _lastKeyView = id; _window = id; }; OUTLETS = {_firstKeyView = id; _initialKeyView = id; _lastKeyView = id; _window = id; };
SUPERCLASS = NSObject; SUPERCLASS = NSObject;
}, },
{CLASS = PersonalPane; LANGUAGE = ObjC; SUPERCLASS = NSPreferencePane; } {CLASS = PersonalPane; LANGUAGE = ObjC; SUPERCLASS = NSPreferencePane; },
{
ACTIONS = {clearCookies = id; clearDiskCache = id; };
CLASS = PrivacyPane;
LANGUAGE = ObjC;
OUTLETS = {
mCookies = id;
mEnableJS = NSButton;
mEnableJava = NSButton;
mPromptForCookie = NSButton;
};
SUPERCLASS = NSPreferencePane;
}
); );
IBVersion = 1; IBVersion = 1;
} }

Просмотреть файл

@ -3,15 +3,15 @@
<plist version="0.9"> <plist version="0.9">
<dict> <dict>
<key>IBDocumentLocation</key> <key>IBDocumentLocation</key>
<string>372 4 356 240 0 0 1152 746 </string> <string>377 51 356 240 0 0 1024 746 </string>
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>248.0</string> <string>248.0</string>
<key>IBGroupedObjects</key> <key>IBGroupedObjects</key>
<dict> <dict>
<key>3</key> <key>3</key>
<array> <array>
<string>153</string> <string>0</string>
<string>155</string> <string>0</string>
</array> </array>
</dict> </dict>
<key>IBLastGroupID</key> <key>IBLastGroupID</key>

Двоичные данные
camino/PreferencePanes/Personal/Personal.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -10,10 +10,12 @@
- (void)awakeFromNib - (void)awakeFromNib
{ {
NSLog(@"Personal Pane awoke from nib");
} }
- (void)mainViewDidLoad - (void)mainViewDidLoad
{ {
NSLog(@"Personal Pane did load main view");
} }
@end @end

Двоичные данные
camino/PreferencePanes/Privacy/Privacy.tiff Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,16 @@
#import <Cocoa/Cocoa.h>
#import <PreferencePanes/NSPreferencePane.h>
@interface PrivacyPane : NSPreferencePane
{
IBOutlet id mCookies;
IBOutlet NSButton* mPromptForCookie;
IBOutlet NSButton* mEnableJS;
IBOutlet NSButton* mEnableJava;
}
-(IBAction) clearCookies:(id)aSender;
-(IBAction) clearDiskCache:(id)aSender;
@end

Просмотреть файл

@ -0,0 +1,108 @@
#import "PrivacyPane.h"
#include "nsCOMPtr.h"
#include "nsIServiceManagerUtils.h"
#include "nsIPref.h"
#include "nsCCookieManager.h"
#include "nsICacheService.h"
@implementation PrivacyPane
- (void) dealloc
{
NSLog(@"Going away from Privacy Panel!!!!");
}
- (id) initWithBundle:(NSBundle *) bundle {
self = [super initWithBundle:bundle] ;
return self;
}
- (void)awakeFromNib
{
NSLog(@"PrivacyPane awoke from nib");
}
- (void)mainViewDidLoad
{
nsCOMPtr<nsIPref> prefService ( do_GetService(NS_PREF_CONTRACTID) );
NS_ASSERTION(prefService, "Could not get pref service, pref panel left uninitialized");
if ( !prefService )
return;
// Hookup cookie prefs. Relies on the tags of the radio buttons in the matrix being
// set such that "enable all" is 0 and "disable all" is 2.
PRInt32 acceptCookies = 0;
prefService->GetIntPref("network.accept_cookies", &acceptCookies);
if ( acceptCookies == 1 ) // be safe in case of importing a mozilla profile
acceptCookies = 2;
if ( [mCookies selectCellWithTag:acceptCookies] != YES )
NS_WARNING("Bad value for network.accept_cookies");
PRBool warnAboutCookies = PR_TRUE;
prefService->GetBoolPref("network.cookie.warnAboutCookies", &warnAboutCookies);
[mPromptForCookie setState:(warnAboutCookies ? NSOnState : NSOffState)];
PRBool jsEnabled = PR_TRUE;
prefService->GetBoolPref("javascript.enabled", &jsEnabled);
[mEnableJS setState:(jsEnabled ? NSOnState : NSOffState)];
PRBool javaEnabled = PR_TRUE;
prefService->GetBoolPref("security.enable_java", &javaEnabled);
[mEnableJava setState:(javaEnabled ? NSOnState : NSOffState)];
}
//
// didUnselect
//
// Called when our panel is no longer the current panel, or when the window is going
// away. Use this as an opportunity to save the current values.
//
- (void)didUnselect
{
nsCOMPtr<nsIPref> prefService ( do_GetService(NS_PREF_CONTRACTID) );
NS_ASSERTION(prefService, "Could not get pref service, pref panel values not saved");
if ( !prefService )
return;
// Save cookie prefs. Relies on the tags of the radio buttons in the matrix being
// set such that "enable all" is 0 and "disable all" is 2.
prefService->SetIntPref("network.accept_cookies", [[mCookies selectedCell] tag]);
prefService->SetBoolPref("network.cookie.warnAboutCookies",
[mPromptForCookie state] == NSOnState ? PR_TRUE : PR_FALSE);
prefService->SetBoolPref("javascript.enabled",
[mEnableJS state] == NSOnState ? PR_TRUE : PR_FALSE);
prefService->SetBoolPref("security.enable_java",
[mEnableJava state] == NSOnState ? PR_TRUE : PR_FALSE);
}
//
// clearCookies:
//
// Clear all the user's cookies.
//
-(IBAction) clearCookies:(id)aSender
{
nsCOMPtr<nsICookieManager> cookieMonster ( do_GetService(NS_COOKIEMANAGER_CONTRACTID) );
if ( cookieMonster )
cookieMonster->RemoveAll();
}
//
// clearDiskCache:
//
// Clear the user's disk cache
//
-(IBAction) clearDiskCache:(id)aSender
{
nsCOMPtr<nsICacheService> cacheServ ( do_GetService("@mozilla.org/network/cache-service;1") );
if ( cacheServ )
cacheServ->EvictEntries(nsICache::STORE_ON_DISK);
}
@end

Просмотреть файл

@ -49,7 +49,19 @@
OUTLETS = {_firstKeyView = id; _initialKeyView = id; _lastKeyView = id; _window = id; }; OUTLETS = {_firstKeyView = id; _initialKeyView = id; _lastKeyView = id; _window = id; };
SUPERCLASS = NSObject; SUPERCLASS = NSObject;
}, },
{CLASS = PersonalPane; LANGUAGE = ObjC; SUPERCLASS = NSPreferencePane; } {CLASS = PersonalPane; LANGUAGE = ObjC; SUPERCLASS = NSPreferencePane; },
{
ACTIONS = {clearCookies = id; clearDiskCache = id; };
CLASS = PrivacyPane;
LANGUAGE = ObjC;
OUTLETS = {
mCookies = id;
mEnableJS = NSButton;
mEnableJava = NSButton;
mPromptForCookie = NSButton;
};
SUPERCLASS = NSPreferencePane;
}
); );
IBVersion = 1; IBVersion = 1;
} }

Просмотреть файл

@ -3,15 +3,15 @@
<plist version="0.9"> <plist version="0.9">
<dict> <dict>
<key>IBDocumentLocation</key> <key>IBDocumentLocation</key>
<string>372 4 356 240 0 0 1152 746 </string> <string>377 51 356 240 0 0 1024 746 </string>
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>248.0</string> <string>248.0</string>
<key>IBGroupedObjects</key> <key>IBGroupedObjects</key>
<dict> <dict>
<key>3</key> <key>3</key>
<array> <array>
<string>153</string> <string>0</string>
<string>155</string> <string>0</string>
</array> </array>
</dict> </dict>
<key>IBLastGroupID</key> <key>IBLastGroupID</key>

Двоичные данные
chimera/PreferencePanes/Personal/English.lproj/Personal.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -49,7 +49,19 @@
OUTLETS = {_firstKeyView = id; _initialKeyView = id; _lastKeyView = id; _window = id; }; OUTLETS = {_firstKeyView = id; _initialKeyView = id; _lastKeyView = id; _window = id; };
SUPERCLASS = NSObject; SUPERCLASS = NSObject;
}, },
{CLASS = PersonalPane; LANGUAGE = ObjC; SUPERCLASS = NSPreferencePane; } {CLASS = PersonalPane; LANGUAGE = ObjC; SUPERCLASS = NSPreferencePane; },
{
ACTIONS = {clearCookies = id; clearDiskCache = id; };
CLASS = PrivacyPane;
LANGUAGE = ObjC;
OUTLETS = {
mCookies = id;
mEnableJS = NSButton;
mEnableJava = NSButton;
mPromptForCookie = NSButton;
};
SUPERCLASS = NSPreferencePane;
}
); );
IBVersion = 1; IBVersion = 1;
} }

Просмотреть файл

@ -3,15 +3,15 @@
<plist version="0.9"> <plist version="0.9">
<dict> <dict>
<key>IBDocumentLocation</key> <key>IBDocumentLocation</key>
<string>372 4 356 240 0 0 1152 746 </string> <string>377 51 356 240 0 0 1024 746 </string>
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>248.0</string> <string>248.0</string>
<key>IBGroupedObjects</key> <key>IBGroupedObjects</key>
<dict> <dict>
<key>3</key> <key>3</key>
<array> <array>
<string>153</string> <string>0</string>
<string>155</string> <string>0</string>
</array> </array>
</dict> </dict>
<key>IBLastGroupID</key> <key>IBLastGroupID</key>

Двоичные данные
chimera/PreferencePanes/Personal/Personal.nib/objects.nib сгенерированный

Двоичный файл не отображается.

Просмотреть файл

@ -10,10 +10,12 @@
- (void)awakeFromNib - (void)awakeFromNib
{ {
NSLog(@"Personal Pane awoke from nib");
} }
- (void)mainViewDidLoad - (void)mainViewDidLoad
{ {
NSLog(@"Personal Pane did load main view");
} }
@end @end

Двоичные данные
chimera/PreferencePanes/Privacy/Privacy.tiff Executable file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,16 @@
#import <Cocoa/Cocoa.h>
#import <PreferencePanes/NSPreferencePane.h>
@interface PrivacyPane : NSPreferencePane
{
IBOutlet id mCookies;
IBOutlet NSButton* mPromptForCookie;
IBOutlet NSButton* mEnableJS;
IBOutlet NSButton* mEnableJava;
}
-(IBAction) clearCookies:(id)aSender;
-(IBAction) clearDiskCache:(id)aSender;
@end

Просмотреть файл

@ -0,0 +1,108 @@
#import "PrivacyPane.h"
#include "nsCOMPtr.h"
#include "nsIServiceManagerUtils.h"
#include "nsIPref.h"
#include "nsCCookieManager.h"
#include "nsICacheService.h"
@implementation PrivacyPane
- (void) dealloc
{
NSLog(@"Going away from Privacy Panel!!!!");
}
- (id) initWithBundle:(NSBundle *) bundle {
self = [super initWithBundle:bundle] ;
return self;
}
- (void)awakeFromNib
{
NSLog(@"PrivacyPane awoke from nib");
}
- (void)mainViewDidLoad
{
nsCOMPtr<nsIPref> prefService ( do_GetService(NS_PREF_CONTRACTID) );
NS_ASSERTION(prefService, "Could not get pref service, pref panel left uninitialized");
if ( !prefService )
return;
// Hookup cookie prefs. Relies on the tags of the radio buttons in the matrix being
// set such that "enable all" is 0 and "disable all" is 2.
PRInt32 acceptCookies = 0;
prefService->GetIntPref("network.accept_cookies", &acceptCookies);
if ( acceptCookies == 1 ) // be safe in case of importing a mozilla profile
acceptCookies = 2;
if ( [mCookies selectCellWithTag:acceptCookies] != YES )
NS_WARNING("Bad value for network.accept_cookies");
PRBool warnAboutCookies = PR_TRUE;
prefService->GetBoolPref("network.cookie.warnAboutCookies", &warnAboutCookies);
[mPromptForCookie setState:(warnAboutCookies ? NSOnState : NSOffState)];
PRBool jsEnabled = PR_TRUE;
prefService->GetBoolPref("javascript.enabled", &jsEnabled);
[mEnableJS setState:(jsEnabled ? NSOnState : NSOffState)];
PRBool javaEnabled = PR_TRUE;
prefService->GetBoolPref("security.enable_java", &javaEnabled);
[mEnableJava setState:(javaEnabled ? NSOnState : NSOffState)];
}
//
// didUnselect
//
// Called when our panel is no longer the current panel, or when the window is going
// away. Use this as an opportunity to save the current values.
//
- (void)didUnselect
{
nsCOMPtr<nsIPref> prefService ( do_GetService(NS_PREF_CONTRACTID) );
NS_ASSERTION(prefService, "Could not get pref service, pref panel values not saved");
if ( !prefService )
return;
// Save cookie prefs. Relies on the tags of the radio buttons in the matrix being
// set such that "enable all" is 0 and "disable all" is 2.
prefService->SetIntPref("network.accept_cookies", [[mCookies selectedCell] tag]);
prefService->SetBoolPref("network.cookie.warnAboutCookies",
[mPromptForCookie state] == NSOnState ? PR_TRUE : PR_FALSE);
prefService->SetBoolPref("javascript.enabled",
[mEnableJS state] == NSOnState ? PR_TRUE : PR_FALSE);
prefService->SetBoolPref("security.enable_java",
[mEnableJava state] == NSOnState ? PR_TRUE : PR_FALSE);
}
//
// clearCookies:
//
// Clear all the user's cookies.
//
-(IBAction) clearCookies:(id)aSender
{
nsCOMPtr<nsICookieManager> cookieMonster ( do_GetService(NS_COOKIEMANAGER_CONTRACTID) );
if ( cookieMonster )
cookieMonster->RemoveAll();
}
//
// clearDiskCache:
//
// Clear the user's disk cache
//
-(IBAction) clearDiskCache:(id)aSender
{
nsCOMPtr<nsICacheService> cacheServ ( do_GetService("@mozilla.org/network/cache-service;1") );
if ( cacheServ )
cacheServ->EvictEntries(nsICache::STORE_ON_DISK);
}
@end