|
|
@ -5,6 +5,7 @@ import java.awt.event.ActionEvent; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.net.URI; |
|
|
|
import java.net.URI; |
|
|
|
import java.net.URISyntaxException; |
|
|
|
import java.net.URISyntaxException; |
|
|
|
|
|
|
|
import java.util.Locale; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
import javax.swing.JOptionPane; |
|
|
|
import javax.swing.KeyStroke; |
|
|
|
import javax.swing.KeyStroke; |
|
|
@ -32,7 +33,12 @@ public class VideoAction extends UpdateAction |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent arg0) |
|
|
|
public void actionPerformed(ActionEvent arg0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.video"); |
|
|
|
String url; |
|
|
|
|
|
|
|
if (FRContext.getLocale().equals(Locale.US)) { |
|
|
|
|
|
|
|
url = SiteCenter.getInstance().acquireUrlByKind("bbs.video.en"); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
url = SiteCenter.getInstance().acquireUrlByKind("bbs.video"); |
|
|
|
|
|
|
|
} |
|
|
|
if (StringUtils.isEmpty(url)) { |
|
|
|
if (StringUtils.isEmpty(url)) { |
|
|
|
FRContext.getLogger().info("The URL is empty!"); |
|
|
|
FRContext.getLogger().info("The URL is empty!"); |
|
|
|
return; |
|
|
|
return; |
|
|
@ -40,7 +46,7 @@ public class VideoAction extends UpdateAction |
|
|
|
try { |
|
|
|
try { |
|
|
|
Desktop.getDesktop().browse(new URI(url)); |
|
|
|
Desktop.getDesktop().browse(new URI(url)); |
|
|
|
} catch (IOException exp) { |
|
|
|
} catch (IOException exp) { |
|
|
|
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); |
|
|
|
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer_Set_default_browser")); |
|
|
|
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
|
|
|
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
|
|
|
} catch (URISyntaxException exp) { |
|
|
|
} catch (URISyntaxException exp) { |
|
|
|
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
|
|
|
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
|
|
|