diff options
author | Romain Kuntz <rkuntz@java.net> | 2008-05-20 15:00:27 +0000 |
---|---|---|
committer | Romain Kuntz <rkuntz@java.net> | 2008-05-20 15:00:27 +0000 |
commit | 883b08b1825d0746fdadfb00886113c5de9dbc18 (patch) | |
tree | d360f5f577b15a84ed51932f6a5ff350490e28fa /src/net/java/sip/communicator/impl/sparkle/SparkleActivator.java | |
parent | d6911cd9bc788573843354f1019cf6813582a23a (diff) | |
download | jitsi-883b08b1825d0746fdadfb00886113c5de9dbc18.zip jitsi-883b08b1825d0746fdadfb00886113c5de9dbc18.tar.gz jitsi-883b08b1825d0746fdadfb00886113c5de9dbc18.tar.bz2 |
Updated the Sparkle activator, which now can set whether
check for updates must be done at startup and set the
check interval value (statically set for the moment)
Diffstat (limited to 'src/net/java/sip/communicator/impl/sparkle/SparkleActivator.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/sparkle/SparkleActivator.java | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/net/java/sip/communicator/impl/sparkle/SparkleActivator.java b/src/net/java/sip/communicator/impl/sparkle/SparkleActivator.java index 4823be6..cc1a9f9 100644 --- a/src/net/java/sip/communicator/impl/sparkle/SparkleActivator.java +++ b/src/net/java/sip/communicator/impl/sparkle/SparkleActivator.java @@ -19,8 +19,22 @@ public class SparkleActivator { private static Logger logger = Logger.getLogger(SparkleActivator.class); - // Native method declaration - public native static void initSparkle(String pathToSparkleFramework); + /** + * Native method declaration + */ + public native static void initSparkle(String pathToSparkleFramework, + boolean updateAtStartup, + int checkInterval); + + /** + * Whether updates are checked at startup + */ + private boolean updateAtStartup = true; + + /** + * Whether updates are checked at startup + */ + private int checkInterval = 86400; // 1 day /** * Dynamically loads JNI object. Will fail if non-MacOSX @@ -39,7 +53,9 @@ public class SparkleActivator public void start(BundleContext bundleContext) throws Exception { // TODO: better way to get the Sparkle Framework path? - initSparkle(System.getProperty("user.dir") + "/../../Frameworks/Sparkle.framework"); + initSparkle(System.getProperty("user.dir") + + "/../../Frameworks/Sparkle.framework", + updateAtStartup, checkInterval); logger.info("Sparkle Plugin ...[Started]"); } |