}
});
itemEdit.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
final TOTorrent torrent = manager.getTorrent();
if (torrent == null) {
return;
}
List group = TorrentUtils.announceGroupsToList(torrent);
new MultiTrackerEditor(null, group, new TrackerEditorListener() {
public void trackersChanged(String str, String str2, List _group) {
TorrentUtils.listToAnnounceGroups(_group, torrent);
try {
TorrentUtils.writeToFile(torrent);
} catch (Throwable e2) {
Debug.printStackTrace(e2);
}
TRTrackerAnnouncer tc = manager.getTrackerClient();
if (tc != null) {
tc.resetTrackerUrl(true);
}
}
}, true);
}
});
final Listener menuListener = new Listener() {
public void handleEvent(Event e) {
if (e.widget instanceof MenuItem) {
String text = ((MenuItem) e.widget).getText();
TOTorrent torrent = manager.getTorrent();
TorrentUtils.announceGroupsSetFirst(torrent, text);
try {
TorrentUtils.writeToFile(torrent);