}
});
return;
}
RSSHandler hand = new RSSHandler();
try {
RSSParser.parseXmlFile(new URL(rss), hand, false);
} catch (final Throwable t) {
addLink(I18N.t("Kann {0} nicht laden", rss), "error", new AE() {
@Override
public void run() {
YEx.warn("Can not load rss " + rss, t);
}
});
return;
}
// add the news
for (int i = 0; i < maxItem; i++) {
// break?
if (i >= hand.getRSSChannel().getItems().size()) {
break;
}
// add it
final RSSItem itm = (RSSItem) hand.getRSSChannel().getItems().get(i);
addLink(itm.getTitle(), icon + "_web", new AE() {
@Override
public void run() {
SystemHelper.openUrl(itm.getLink());