Commits

Tuukka Norri committed 2e25d8e

Made the Bonjour menu work a bit better
- The menu now displays the ”No services found” message. Still uncertain, why services aren't discovered.

  • Participants
  • Parent commits bab6424

Comments (0)

Files changed (2)

BaseTenAssistant/English.lproj/MainMenu.xib

 									</object>
 									<string key="NSFrame">{{1, 1}, {368, 126}}</string>
 									<reference key="NSSuperview" ref="392771615"/>
+									<reference key="NSNextKeyView" ref="71290370"/>
 									<reference key="NSDocView" ref="71290370"/>
 									<object class="NSColor" key="NSBGColor">
 										<int key="NSColorSpace">1</int>
 							</object>
 							<string key="NSFrame">{{20, 60}, {385, 128}}</string>
 							<reference key="NSSuperview" ref="957137145"/>
+							<reference key="NSNextKeyView" ref="45882566"/>
 							<int key="NSsFlags">18</int>
 							<reference key="NSVScroller" ref="744026035"/>
 							<reference key="NSHScroller" ref="1061755770"/>

BaseTenAssistant/Sources/BXAController.m

 	gController = self;
 	mLastSelectedEntityWasView = YES;
 	mBundledSchemaVersionNumber = [[BXPGVersion currentVersionNumber] retain];
+	
+	[mBonjourPopUpButton setAutoenablesItems: NO];
 
 	//Patch by Tim Bedford 2008-08-11
 	[mMainWindow setExcludedFromWindowsMenu:YES];
 	[mServiceBrowser searchForServicesOfType:@"_postgresql._tcp" inDomain:@"local."];	
 	[NSApp beginSheet: mConnectPanel modalForWindow: mMainWindow modalDelegate: self 
 	   didEndSelector: NULL contextInfo: NULL];
+	[self updateBonjourUI];
 }
 
 - (void) hideConnectPanel
 	}
 	else
 	{
-		// Add a disabled menu item indicating that no services were found
-		[menu addItemWithTitle:NSLocalizedString(@"No services found", @"Service popup menu") action:nil keyEquivalent:@""];
+		// Add a disabled menu item indicating that no services were found.
+		NSMenuItem* menuItem = [[NSMenuItem alloc] initWithTitle: NSLocalizedString(@"No services found", @"Service popup menu")
+														  action: NULL keyEquivalent: @""];
+		[menu addItem: menuItem];
+		[menuItem setEnabled: NO];
 	}
 }