]> source.dussan.org Git - tigervnc.git/commitdiff
Make the icon used for the titlebar consistent for About... dialog
authorBrian Hinz <bphinz@users.sourceforge.net>
Sat, 12 Jan 2013 01:20:53 +0000 (01:20 +0000)
committerBrian Hinz <bphinz@users.sourceforge.net>
Sat, 12 Jan 2013 01:20:53 +0000 (01:20 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5026 3789f03b-4d11-0410-bbf8-ca57d06f2519

java/com/tigervnc/vncviewer/CConn.java

index 610aef984bf9f515818d5b82ab9a9816b8e7e742..63db1ab49dc78cc2108f90ada4353748262281bb 100644 (file)
@@ -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);
   }