Can't hide 'Bonjour' submenu - rename chimera.enable_rendezvous to camino.disable_bonjour and hook it up. r=smorgan sr=pink b=356411

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@214115 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
stridey%gmail.com
2006-10-25 18:46:04 +00:00
parent 6f0f2b107c
commit 3fed2ee2ab
4 changed files with 10 additions and 16 deletions

View File

@@ -78,8 +78,6 @@ pref("browser.download.progressDnldDialog.keepAlive", true);
// Download removing policy
pref("browser.download.downloadRemoveAction", 0);
pref("chimera.enable_rendezvous", true);
// set typeahead find to search all text by default, but not invoke
// unless you type '/'
pref("accessibility.typeaheadfind.linksonly", false);

View File

@@ -71,7 +71,6 @@ typedef enum EBookmarkOpenBehavior
IBOutlet NSMenuItem* mCloseWindowMenuItem;
IBOutlet NSMenuItem* mCloseTabMenuItem;
IBOutlet NSMenu* mGoMenu;
IBOutlet BookmarkMenu* mBookmarksMenu;
IBOutlet BookmarkMenu* mDockMenu;
IBOutlet NSMenu* mServersSubmenu;

View File

@@ -392,22 +392,19 @@ const int kReuseWindowOnAE = 2;
- (void)setupRendezvous // aka "Bonjour"
{
BOOL doingRendezvous = NO;
if ([[PreferenceManager sharedInstance] getBooleanPref:"chimera.enable_rendezvous" withSuccess:NULL]) {
NSNotificationCenter* notificationCenter = [NSNotificationCenter defaultCenter];
[notificationCenter addObserver:self selector:@selector(availableServicesChanged:) name:NetworkServicesAvailableServicesChanged object:nil];
[notificationCenter addObserver:self selector:@selector(serviceResolved:) name:NetworkServicesResolutionSuccess object:nil];
[notificationCenter addObserver:self selector:@selector(serviceResolutionFailed:) name:NetworkServicesResolutionFailure object:nil];
doingRendezvous = YES;
}
if (!doingRendezvous) {
if ([[PreferenceManager sharedInstance] getBooleanPref:"camino.disable_bonjour" withSuccess:NULL]) {
// remove rendezvous items
int itemIndex;
while ((itemIndex = [mGoMenu indexOfItemWithTag:kRendezvousRelatedItemTag]) != -1)
[mGoMenu removeItemAtIndex:itemIndex];
while ((itemIndex = [mBookmarksMenu indexOfItemWithTag:kRendezvousRelatedItemTag]) != -1)
[mBookmarksMenu removeItemAtIndex:itemIndex];
return;
}
NSNotificationCenter* notificationCenter = [NSNotificationCenter defaultCenter];
[notificationCenter addObserver:self selector:@selector(availableServicesChanged:) name:NetworkServicesAvailableServicesChanged object:nil];
[notificationCenter addObserver:self selector:@selector(serviceResolved:) name:NetworkServicesResolutionSuccess object:nil];
[notificationCenter addObserver:self selector:@selector(serviceResolutionFailed:) name:NetworkServicesResolutionFailure object:nil];
}
- (void)checkDefaultBrowser