зеркало из https://github.com/mozilla/pjs.git
Fix bug 336211, Remove OS X 10.2-only code/checks in NSWorkspace+Utils.m, patch by froodiantherapy <stridey@gmail.com>. r=Wevah, sr=mento
This commit is contained in:
Родитель
8b2a4c3626
Коммит
e43aea3cb0
|
@ -411,17 +411,15 @@ const int kReuseWindowOnAE = 2;
|
|||
- (void)setupRendezvous // aka "Bonjour"
|
||||
{
|
||||
BOOL doingRendezvous = NO;
|
||||
|
||||
|
||||
if ([[PreferenceManager sharedInstance] getBooleanPref:"chimera.enable_rendezvous" withSuccess:NULL]) {
|
||||
if ([NSWorkspace supportsBonjour]) {
|
||||
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;
|
||||
}
|
||||
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) {
|
||||
// remove rendezvous items
|
||||
int itemIndex;
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
- (NSString*)displayNameForFile:(NSURL*)inFileURL;
|
||||
|
||||
// OS feature checks
|
||||
+ (BOOL)supportsBonjour;
|
||||
+ (BOOL)supportsSpotlight;
|
||||
+ (BOOL)supportsUnifiedToolbar;
|
||||
|
||||
|
|
|
@ -164,22 +164,6 @@
|
|||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// +supportsBonjour
|
||||
//
|
||||
// returns YES if we're running on a machine that supports bonjour (formerly rendezvous, 10.2
|
||||
// or higher)
|
||||
//
|
||||
+ (BOOL)supportsBonjour
|
||||
{
|
||||
// The DNS resolution stuff is broken before 10.2.3
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3
|
||||
return YES;
|
||||
#else
|
||||
return [self systemVersion] >= 0x1023;
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// +supportsSpotlight
|
||||
//
|
||||
|
|
Загрузка…
Ссылка в новой задаче