Bug 73729 [Workbench] [Mac] Dual preferences menu items
On Mac OS X, the preferences menu item appears in the Eclipse menu. This is correct. However, the same menu item that does the same thing also appears in the Window menu, which is correct on other platforms but not the Mac. It should be removed from the Window menu.
bundles/org.eclipse.ui.carbon/src/org/eclipse/ui/carbon/CarbonUIEnhancer.java
int eventKind = OS.GetEventKind (theEvent);
				if (eventKind != OS.kEventWindowToolbarSwitchMode)
					return OS.eventNotHandledErr;
				
				int [] theWindow = new int [1];
				OS.GetEventParameter (theEvent, OS.kEventParamDirectObject, OS.typeWindowRef, null, 4, null, theWindow);
				
				int [] theRoot = new int [1];
				OS.GetRootControl (theWindow [0], theRoot);
				Widget widget = Display.getCurrent().findWidget(theRoot [0]);
				
				if (!(widget instanceof Shell)) {
					return OS.eventNotHandledErr;
				}
				Shell shell = (Shell) widget;
				IWorkbenchWindow[] windows = PlatformUI.getWorkbench()
						.getWorkbenchWindows();
				for (int i = 0; i < windows.length; i++) {
					if (windows[i].getShell() == shell) {
						WorkbenchWindow castedWindow = (WorkbenchWindow) windows[i];
						
						
						boolean[] switchFlags = (boolean[]) shell
								.getData(TOOLBAR_BUTTON_TOGGLE_FLAGS);
						if (switchFlags == null)
							return OS.eventNotHandledErr;
						boolean coolbarVisible = castedWindow
								.getCoolBarVisible();
						boolean perspectivebarVisible = castedWindow
								.getPerspectiveBarVisible();