+ private static void startUsageStats(final Desktop desktop)
+ {
+ /**
+ * start a User Config prompt asking if we can log usage statistics.
+ */
+ jalview.gui.PromptUserConfig prompter = new jalview.gui.PromptUserConfig(desktop.desktop,"USAGESTATS", "Jalview Usage Statistics", "Jalview uses Google Analytics to report usage statistics.\nDo you want to enable this ?\n\n(if you press cancel, you will be asked again next time)",
+ new Runnable() {
+ public void run()
+ {
+ Cache.log.info("Initialising googletracker for usage stats.");
+ Cache.initGoogleTracker();
+ Cache.log.debug("Tracking enabled.");
+ }
+ },
+ new Runnable() {
+ public void run() {
+ Cache.log.info("Not enabling Google Tracking.");
+ }
+ }, null, true);
+ SwingUtilities.invokeLater(prompter);
+ }
+