MenuItem mntmOrganize = new MenuItem(menuFavorite, SWT.NONE);
mntmOrganize.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
OrganizeFavoriteDialog dialog = new OrganizeFavoriteDialog(
shell, iconImage);
@SuppressWarnings("unchecked")
List<Favorite> favorites = (List<Favorite>) dialog.open();
if (favorites != null) {
service3.updateList(favorites);
removeFavoriteMenuItem();
addFavoriteMenuItem();
}
}
});
mntmOrganize.setText(i18nFile.getText(I18nFile.ORGANIZE));
addFavoriteMenuItem();
MenuItem mntmHelp = new MenuItem(menu, SWT.CASCADE);
mntmHelp.setText(i18nFile.getText(I18nFile.HELP));
Menu menu_2 = new Menu(mntmHelp);
mntmHelp.setMenu(menu_2);
MenuItem mntmDonation = new MenuItem(menu_2, SWT.NONE);
mntmDonation.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent arg0) {
DonationDialog dialog = new DonationDialog(shell, iconImage,
codeImage);
dialog.open();
}
});
mntmDonation.setText(i18nFile.getText(I18nFile.DONATION));
new MenuItem(menu_2, SWT.SEPARATOR);
MenuItem mntmAbout = new MenuItem(menu_2, SWT.NONE);
mntmAbout.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent arg0) {
AboutDialog dialog = new AboutDialog(shell, iconImage);
dialog.open();
}
});
mntmAbout.setText(i18nFile.getText(I18nFile.ABOUT));
}