+ // and finally, turn off batch mode indicator - if the desktop still exists
+ if (desktop != null)
+ {
+ if (progress != -1)
+ {
+ desktop.setProgressBar(null, progress);
+ }
+ desktop.setInBatchMode(false);
+ }
+ }
+
+
+ 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",
+ "Do you want to help make Jalview better by enabling "
+ + "the collection of usage statistics with Google Analytics ?"
+ + "\n\n(you can enable or disable usage tracking in the preferences)",
+ 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);
+ desktop.addDialogThread(prompter);