summaryrefslogtreecommitdiffstats
path: root/java/com
diff options
context:
space:
mode:
authorBrian Hinz <bphinz@users.sourceforge.net>2013-01-12 01:20:53 +0000
committerBrian Hinz <bphinz@users.sourceforge.net>2013-01-12 01:20:53 +0000
commit6edad6a5ad3909136e2cd9628dffb913e3055d1b (patch)
tree61e552429f9fed86896268145ca670876816a61f /java/com
parentdb6524b92e7c20cfdd7976714ee307a3ffd291d1 (diff)
downloadtigervnc-6edad6a5ad3909136e2cd9628dffb913e3055d1b.tar.gz
tigervnc-6edad6a5ad3909136e2cd9628dffb913e3055d1b.zip
Make the icon used for the titlebar consistent for About... dialog
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5026 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/com')
-rw-r--r--java/com/tigervnc/vncviewer/CConn.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/java/com/tigervnc/vncviewer/CConn.java b/java/com/tigervnc/vncviewer/CConn.java
index 610aef98..63db1ab4 100644
--- a/java/com/tigervnc/vncviewer/CConn.java
+++ b/java/com/tigervnc/vncviewer/CConn.java
@@ -730,12 +730,18 @@ public class CConn extends CConnection
Window fullScreenWindow = Viewport.getFullScreenWindow();
if (fullScreenWindow != null)
Viewport.setFullScreenWindow(null);
- JOptionPane.showMessageDialog((viewport != null ? viewport : null),
+ String msg =
String.format(VncViewer.aboutText, VncViewer.version, VncViewer.build,
- VncViewer.buildDate, VncViewer.buildTime),
- "About TigerVNC Viewer for Java",
- JOptionPane.INFORMATION_MESSAGE,
- logo);
+ VncViewer.buildDate, VncViewer.buildTime);
+ JOptionPane op =
+ new JOptionPane(msg, JOptionPane.INFORMATION_MESSAGE,
+ JOptionPane.DEFAULT_OPTION, logo);
+ JDialog dlg = op.createDialog("About TigerVNC Viewer for Java");
+ ClassLoader cl = this.getClass().getClassLoader();
+ ImageIcon icon =
+ new ImageIcon(cl.getResource("com/tigervnc/vncviewer/tigervnc.ico"));
+ dlg.setIconImage(icon.getImage());
+ dlg.setVisible(true);
if (fullScreenWindow != null)
Viewport.setFullScreenWindow(fullScreenWindow);
}