Revision: 15037
          http://gate.svn.sourceforge.net/gate/?rev=15037&view=rev
Author:   valyt
Date:     2012-01-13 18:59:20 +0000 (Fri, 13 Jan 2012)
Log Message:
-----------
Set the WM class for the main window.

Next: find a way to add the same value to the .desktop file on Linux.

Modified Paths:
--------------
    gate/trunk/src/gate/gui/MainFrame.java

Modified: gate/trunk/src/gate/gui/MainFrame.java
===================================================================
--- gate/trunk/src/gate/gui/MainFrame.java      2012-01-13 17:55:40 UTC (rev 
15036)
+++ gate/trunk/src/gate/gui/MainFrame.java      2012-01-13 18:59:20 UTC (rev 
15037)
@@ -317,6 +317,18 @@
   public MainFrame(boolean isShellSlacGIU, GraphicsConfiguration gc) {
     super(gc);
     instance = this;
+    // set the WM class
+    try {
+      Toolkit xToolkit = Toolkit.getDefaultToolkit();
+      java.lang.reflect.Field awtAppClassNameField =
+      xToolkit.getClass().getDeclaredField("awtAppClassName");
+      awtAppClassNameField.setAccessible(true);
+      awtAppClassNameField.set(xToolkit, "GATE Developer");
+    } catch(Exception e) {
+      // ignore
+      log.warn("Could not set WM Class", e);
+    }
+    
     guiRoots.add(this);
     if(fileChooser == null) {
       fileChooser = new XJFileChooser();

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to