/** * @return If no license is installed a dummy license is returned. * @see #EMPTY_LICENSE */ public static License find() { return find(new DisabledLicenseVerifierCallback()); }
final License key = LicenseFactory.find(); if(!key.verify(new DisabledLicenseVerifierCallback())) { final String lastversion = preferences.getProperty("donate.reminder");
public static void print(final Preferences preferences) { final Console console = new Console(); final License l = LicenseFactory.find(); console.printf("%s %s (%s). %s%n", preferences.getProperty("application.name"), preferences.getProperty("application.version"), preferences.getProperty("application.revision"), l.verify(new DisabledLicenseVerifierCallback()) ? l.toString() : "Not registered. Purchase a donation key to support the development of this software."); } }
footer.append(String.format("Cyberduck is libre software licenced under the GPL. For general help about using Cyberduck, please refer to %s and the wiki at %s. For bug reports or feature requests open a ticket at %s.", preferences.getProperty("website.cli"), preferences.getProperty("website.help"), MessageFormat.format(preferences.getProperty("website.bug"), preferences.getProperty("application.version")))); final License l = LicenseFactory.find(); footer.append(StringUtils.LF); if(l.verify(new DisabledLicenseVerifierCallback())) {
/** * Set name of key in menu item */ protected void updateLicenseMenu() { final License key = LicenseFactory.find(); if(key.isReceipt()) { this.applicationMenu.removeItemAtIndex(new NSInteger(5)); this.applicationMenu.removeItemAtIndex(new NSInteger(4)); } else { this.applicationMenu.itemAtIndex(new NSInteger(5)).setAttributedTitle( NSAttributedString.attributedStringWithAttributes(key.toString(), MENU_HELP_FONT_ATTRIBUTES) ); } }
@Override public void awakeFromNib() { super.awakeFromNib(); // Configure Toolbar this.toolbar = NSToolbar.toolbarWithIdentifier("Cyberduck Toolbar"); this.toolbar.setDelegate((this.id())); this.toolbar.setAllowsUserCustomization(true); this.toolbar.setAutosavesConfiguration(true); this.window.setToolbar(toolbar); this._updateBrowserColumns(browserListView, browserListViewDelegate); this._updateBrowserColumns(browserOutlineView, browserOutlineViewDelegate); if(preferences.getBoolean("browser.transcript.open")) { this.logDrawer.open(); } if(LicenseFactory.find().equals(LicenseFactory.EMPTY_LICENSE)) { this.addDonateWindowTitle(); } this.selectBookmarks(BookmarkSwitchSegement.bookmarks); }