}
if (sel == sel_aboutMenuItemSelected_) {
AboutWindow.show();
} else if (sel == sel_restartMenuSelected_) {
UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
if (uiFunctions != null) {
uiFunctions.dispose(true, false);
}
} else if (sel == sel_wizardMenuSelected_) {
new ConfigureWizard(false,ConfigureWizard.WIZARD_MODE_FULL);
} else if (sel == sel_natMenuSelected_) {
new NatTestWindow();
} else if (sel == sel_speedMenuSelected_) {
new SpeedTestWizard();
} else if (sel == sel_toolbarButtonClicked_) {
try {
Field fldsel_window = osCls.getField("sel_window");
Object windowId = invoke(osCls, "objc_msgSend", new Object[] {
wrapPointer(arg0),
fldsel_window.get(null)
});
final Shell shellAffected = (Shell) invoke(Display.class,
Display.getCurrent(), "findWidget", new Object[] {
windowId
});
Utils.execSWTThread(new AERunnable() {
public void runSupport() {
int type;
Long l = (Long) shellAffected.getData("OSX.ToolBarToggle");
if (l == null || l.longValue() == 0) {
type = SWT.Collapse;
} else {
type = SWT.Expand;
}
Event event = new Event();
event.type = type;
event.display = shellAffected.getDisplay();
event.widget = shellAffected;
shellAffected.notifyListeners(type, event);
shellAffected.setData("OSX.ToolBarToggle", new Long(
type == SWT.Collapse ? 1 : 0));
}
});
} catch (Throwable t) {
Debug.out(t);
}
} else if (sel == sel_preferencesMenuItemSelected_) {
UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
if (uiFunctions != null) {
uiFunctions.openView(UIFunctions.VIEW_CONFIG, null);
}
}
return 0;
}