Messages.setLanguageText(label, "TrackerChangerWindow.newtracker");
GridData gridData = new GridData();
gridData.widthHint = 200;
label.setLayoutData(gridData);
final Text url = new Text(shell, SWT.BORDER);
gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.widthHint = 300;
url.setLayoutData(gridData);
Utils.setTextLinkFromClipboard(shell, url, false);
Composite panel = new Composite(shell, SWT.NULL);
layout = new GridLayout();
layout.numColumns = 3;
panel.setLayout(layout);
gridData = new GridData();
gridData.horizontalSpan = 2;
panel.setLayoutData(gridData);
Button ok = new Button(panel, SWT.PUSH);
ok.setText(MessageText.getString("Button.ok"));
gridData = new GridData();
gridData.widthHint = 70;
ok.setLayoutData(gridData);
shell.setDefaultButton(ok);
ok.addListener(SWT.Selection, new Listener() {
/* (non-Javadoc)
* @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
*/
public void handleEvent(Event event) {
try {
for ( DownloadManager dm: dms ){
TOTorrent torrent = dm.getTorrent();
if ( torrent != null ){
TorrentUtils.announceGroupsInsertFirst( torrent, url.getText());
TorrentUtils.writeToFile( torrent );
TRTrackerAnnouncer announcer = dm.getTrackerClient();