// Create the menu
popupMenu = new Menu(shell, SWT.POP_UP);
MenuItem open = new MenuItem(popupMenu, SWT.PUSH);
open.setText(Messages.getString("GUI.menu.openBrowser")); //$NON-NLS-1$
open.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
openBrowser(null);
}
});
// #ifdef DEBUG
MenuItem console = new MenuItem(popupMenu, SWT.PUSH);
console.setText(Messages.getString("GUI.menu.debugConsole")); //$NON-NLS-1$
console.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
getConsole().show();
}
});
// #endif
MenuItem ports = new MenuItem(popupMenu, SWT.PUSH);
ports.setText(Messages.getString("GUI.menu.tunnelMonitor")); //$NON-NLS-1$
ports.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
getPortMonitor().setVisible(!getPortMonitor().isVisible());
}
});
MenuItem about = new MenuItem(popupMenu, SWT.PUSH);
about.setText(Messages.getString("GUI.menu.about")); //$NON-NLS-1$
about.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
about();
}
});
// Create the menu items
new MenuItem(popupMenu, SWT.SEPARATOR);
MenuItem exit = new MenuItem(popupMenu, SWT.PUSH);
exit.setText(Messages.getString("GUI.menu.exit")); //$NON-NLS-1$
exit.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
exit();