Display display = cScrapeInfoView.getDisplay();
String status = manager.getTrackerStatus();
int time = manager.getTrackerTime();
TRTrackerAnnouncer trackerClient = manager.getTrackerClient();
if ( trackerClient != null ){
tracker_status.setText( trackerClient.getStatusString());
time = trackerClient.getTimeUntilNextUpdate();
}else{
tracker_status.setText( status );
}
if (time < 0) {
trackerUpdateIn.setText(MessageText.getString("GeneralView.label.updatein.querying"));
} else {
trackerUpdateIn.setText(TimeFormatter.formatColon(time));
}
boolean update_state;
String trackerURL = null;
if (trackerClient != null) {
URL temp = trackerClient.getTrackerURL();
if (temp != null) {
trackerURL = temp.toString();
}
}
if (trackerURL == null) {
TOTorrent torrent = manager.getTorrent();
if (torrent != null) {
trackerURL = torrent.getAnnounceURL().toString();
}
}
if (trackerURL != null) {
trackerUrlValue.setText(trackerURL);
if ((trackerURL.startsWith("http://") || trackerURL.startsWith("https://"))) {
trackerUrlValue.setForeground(Colors.blue);
trackerUrlValue.setCursor(display.getSystemCursor(SWT.CURSOR_HAND));
Messages.setLanguageText(trackerUrlValue.getWidget(),
"GeneralView.label.trackerurlopen.tooltip", true);
} else {
trackerUrlValue.setForeground(null);
trackerUrlValue.setCursor(null);
Messages.setLanguageText(trackerUrlValue.getWidget(), null);
trackerUrlValue.setToolTipText(null);
}
}
if (trackerClient != null) {
update_state = ((SystemTime.getCurrentTime() / 1000
- trackerClient.getLastUpdateTime() >= TRTrackerAnnouncer.REFRESH_MINIMUM_SECS));
} else {
TRTrackerScraperResponse sr = manager.getTrackerScrapeResponse();
if ( sr == null ){