From 6a451aa7ebf76df590247b90065a4cac6bb7cf3e Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Wed, 10 Nov 2010 16:07:06 -0500 Subject: integrate desktop shortcut creation with configuration 2010-11-05 Omair Majid * netx/net/sourceforge/jnlp/ShortcutDesc.java: Change prefixes from SHORTCUT_ to CREATE_. * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java (addMenuAndDesktopEntries): Call shouldCreateShortcut to find out if shortcut should be created. Remove call to checkAccess which does nothing as the entire stack contains trusted classes. (shouldCreateShortcut): New method. Use the configuration to find out if a shorcut should be created, and possibly prompt the user. * netx/net/sourceforge/jnlp/runtime/DeploymentConfiguration.java: Add KEY_CREATE_DESKTOP_SHORTCUT. (loadDefaultProperties): Use KEY_CREATE_DESKTOP_SHORTCUT. --- netx/net/sourceforge/jnlp/ShortcutDesc.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'netx/net/sourceforge/jnlp/ShortcutDesc.java') diff --git a/netx/net/sourceforge/jnlp/ShortcutDesc.java b/netx/net/sourceforge/jnlp/ShortcutDesc.java index 66367bb..c64fbee 100644 --- a/netx/net/sourceforge/jnlp/ShortcutDesc.java +++ b/netx/net/sourceforge/jnlp/ShortcutDesc.java @@ -19,16 +19,15 @@ package net.sourceforge.jnlp; public final class ShortcutDesc { /** Never create a shortcut */ - public static final String SHORTCUT_NEVER = "NEVER"; + public static final String CREATE_NEVER = "NEVER"; /** Always create a shortcut */ - public static final String SHORTCUT_ALWAYS = "ALWAYS"; + public static final String CREATE_ALWAYS = "ALWAYS"; /** Always ask user whether to create a shortcut */ - public static final String SHORTCUT_ASK_USER = "ASK_USER"; + public static final String CREATE_ASK_USER = "ASK_USER"; /** Ask user whether to create a shortcut but only if jnlp file asks for it */ - public static final String SHORTCUT_ASK_USER_IF_HINTED = "ASK_IF_HINTED"; + public static final String CREATE_ASK_USER_IF_HINTED = "ASK_IF_HINTED"; /** Create a desktop shortcut without prompting if the jnlp asks for it */ - public static final String SHORTCUT_ALWAYS_IF_HINTED = "ALWAYS_IF_HINTED"; - public static final String SHORTCUT_DEFAULT = SHORTCUT_ASK_USER_IF_HINTED; + public static final String CREATE_ALWAYS_IF_HINTED = "ALWAYS_IF_HINTED"; /** the application wants to be placed on the desktop */ private boolean onDesktop = false; -- cgit v1.2.3