public void actionPerformed(ActionEvent e) { if (UpdateMediator.instance().isUpdateDownloaded()) { UpdateMediator.instance().startUpdate(); } else { UpdateMediator.instance().checkForUpdate(); } }
public void refresh() { String text; boolean enabled = true; if (UpdateMediator.instance().isUpdated()) { text = I18n.tr("You are up to date with FrostWire") + " v." + UpdateMediator.instance().getLatestVersion(); } else if (UpdateMediator.instance().isUpdateDownloading()) { text = I18n.tr("Downloading update..."); enabled = false; } else if (UpdateMediator.instance().isUpdateDownloaded()) { text = I18n.tr("Install update") + " v." + UpdateMediator.instance().getLatestVersion(); } else { text = I18n.tr("Check for update"); } putValue(NAME, text); putValue(LONG_DESCRIPTION, text); setEnabled(enabled); }