This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: remove GTK peer hack


Hi,

I removed from the GTK peers this hack, which turned out to be unnecessary.

Tom

2006-06-09 Thomas Fitzsimmons <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
	(getDefaultScreenDevice): Remove unnecessary GCJ local hack.
	* gnu/java/awt/peer/gtk/GtkToolkit.java (getSystemEventQueueImpl):
	Likewise.
	* gnu/java/awt/peer/gtk/GdkPixbufDecoder.java (registerFormat):
	Likewise.
Index: classpath/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
===================================================================
--- classpath/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java	(revision 114517)
+++ classpath/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java	(working copy)
@@ -247,23 +247,12 @@
   public static ImageFormatSpec registerFormat(String name, boolean writable) 
   {
     ImageFormatSpec ifs = new ImageFormatSpec(name, writable);
-
-    // GCJ LOCAL: workaround a GCJ problem accessing
-    // GdkPixbufDecoder.class
-    try
+    synchronized(GdkPixbufDecoder.class)
       {
-    synchronized(Class.forName ("gnu.java.awt.peer.gtk.GdkPixbufDecoder"))
-      {
         if (imageFormatSpecs == null)
           imageFormatSpecs = new ArrayList();
         imageFormatSpecs.add(ifs);
       }
-      }
-    catch (Exception e)
-      {
-        e.printStackTrace();
-      }
-    
     return ifs;
   }
 
Index: classpath/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
===================================================================
--- classpath/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java	(revision 114517)
+++ classpath/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java	(working copy)
@@ -88,22 +88,13 @@
     if (GraphicsEnvironment.isHeadless ())
       throw new HeadlessException ();
     
-    // GCJ LOCAL: workaround a GCJ problem accessing
-    // GdkGraphicsEnvironment.class
-    try
+    synchronized (GdkGraphicsEnvironment.class)
       {
-    synchronized (Class.forName ("gnu.java.awt.peer.gtk.GdkGraphicsEnvironment"))
-      {
         if (defaultDevice == null)
           {
             defaultDevice = nativeGetDefaultScreenDevice();
           }
       }
-      }
-    catch (Exception e)
-      {
-        e.printStackTrace();
-      }
     
     return defaultDevice;
   }
Index: classpath/gnu/java/awt/peer/gtk/GtkToolkit.java
===================================================================
--- classpath/gnu/java/awt/peer/gtk/GtkToolkit.java	(revision 114517)
+++ classpath/gnu/java/awt/peer/gtk/GtkToolkit.java	(working copy)
@@ -536,23 +536,13 @@
 
   protected EventQueue getSystemEventQueueImpl() 
   {
-    // GCJ LOCAL: workaround a GCJ problem accessing
-    // GtkToolkit.class
-    try
+    synchronized (GtkToolkit.class)
       {
-    synchronized (Class.forName ("gnu.java.awt.peer.gtk.GtkToolkit"))
-      {
         if (q == null)
           {
             q = new EventQueue();
           }
       }    
-      }
-    catch (Exception e)
-      {
-        e.printStackTrace();
-      }
-    
     return q;
   }
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 114519)
+++ ChangeLog	(working copy)
@@ -1,5 +1,14 @@
 2006-06-09  Thomas Fitzsimmons  <fitzsim@redhat.com>
 
+	* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
+	(getDefaultScreenDevice): Remove unnecessary GCJ local hack.
+	* gnu/java/awt/peer/gtk/GtkToolkit.java (getSystemEventQueueImpl):
+	Likewise.
+	* gnu/java/awt/peer/gtk/GdkPixbufDecoder.java (registerFormat):
+	Likewise.
+
+2006-06-09  Thomas Fitzsimmons  <fitzsim@redhat.com>
+
 	* java/lang/String.java, classpath/native/jni/classpath/jcl.h,
 	classpath/native/jni/qt-peer/eventmethods.h,
 	classpath/native/jni/qt-peer/qtmenupeer.cpp,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]