Skip to content

Commit b1165d7

Browse files
author
Joshua Dowell
committed
fix: use BareBonesBrowserLaunch for Privacy Policy link on all platforms
Desktop.getDesktop().browse() throws on some Linux platforms even when Desktop.isDesktopSupported() returns true, causing the Privacy Policy hyperlink in FirstLoginDialog to silently fail. Replace the Desktop if/else with a direct call to BareBonesBrowserLaunch.openURL() which works reliably cross-platform. Fixes #86. Signed-off-by: Joshua Dowell <joshua.dowell@centrallogic.com>
1 parent 7723b34 commit b1165d7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

client/src/com/mirth/connect/client/ui/FirstLoginDialog.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
184184
contentTextPane.setEditable(false);
185185
contentTextPane.addHyperlinkListener(new HyperlinkListener() {
186186
public void hyperlinkUpdate(HyperlinkEvent evt) {
187-
if (evt.getEventType() == EventType.ACTIVATED && Desktop.isDesktopSupported()) {
187+
if (evt.getEventType() == EventType.ACTIVATED) {
188188
try {
189-
if (Desktop.isDesktopSupported()) {
190-
Desktop.getDesktop().browse(evt.getURL().toURI());
191-
} else {
192-
BareBonesBrowserLaunch.openURL(evt.getURL().toString());
193-
}
189+
BareBonesBrowserLaunch.openURL(evt.getURL().toString());
194190
} catch (Exception e) {
195191
e.printStackTrace();
196192
}

0 commit comments

Comments
 (0)