aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@redhat.com>2004-01-25 18:29:42 +0000
committerThomas Fitzsimmons <fitzsim@gcc.gnu.org>2004-01-25 18:29:42 +0000
commit0058a7d875d6eebaaab9602278d0e44254fe63c7 (patch)
treebc06576c451ff5c78f368f981bbb418554666ae0 /libjava
parentcff555dccdb73f52ab49ccf65e7f23263248ee86 (diff)
downloadgcc-0058a7d875d6eebaaab9602278d0e44254fe63c7.zip
gcc-0058a7d875d6eebaaab9602278d0e44254fe63c7.tar.gz
gcc-0058a7d875d6eebaaab9602278d0e44254fe63c7.tar.bz2
GtkToolkit.java (checkImage): Inform image observer of image loading status.
2004-01-25 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/java/awt/peer/gtk/GtkToolkit.java (checkImage): Inform image observer of image loading status. (getImage (String)): Start image production. (getImage (URL)): Likewise. From-SVN: r76574
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog7
-rw-r--r--libjava/gnu/java/awt/peer/gtk/GtkToolkit.java20
2 files changed, 24 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index a0b607a..9739254 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-25 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * gnu/java/awt/peer/gtk/GtkToolkit.java (checkImage): Inform
+ image observer of image loading status.
+ (getImage (String)): Start image production.
+ (getImage (URL)): Likewise.
+
2004-01-25 Michael Koch <konqueror@gmx.de>
* java/lang/Class.java: Imports reworked, reformated.
diff --git a/libjava/gnu/java/awt/peer/gtk/GtkToolkit.java b/libjava/gnu/java/awt/peer/gtk/GtkToolkit.java
index f3af5e8..844fa68 100644
--- a/libjava/gnu/java/awt/peer/gtk/GtkToolkit.java
+++ b/libjava/gnu/java/awt/peer/gtk/GtkToolkit.java
@@ -115,7 +115,15 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
public int checkImage (Image image, int width, int height,
ImageObserver observer)
{
- return ((GtkImage) image).checkImage ();
+ int status = ((GtkImage) image).checkImage ();
+
+ if (observer != null)
+ observer.imageUpdate (image, status,
+ -1, -1,
+ image.getWidth (observer),
+ image.getHeight (observer));
+
+ return status;
}
public Image createImage (String filename)
@@ -166,12 +174,18 @@ public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
public Image getImage (String filename)
{
- return new GtkImage (new GdkPixbufDecoder (filename), null);
+ GdkPixbufDecoder d = new GdkPixbufDecoder (filename);
+ GtkImage image = new GtkImage (d, null);
+ d.startProduction (image);
+ return image;
}
public Image getImage (URL url)
{
- return new GtkImage (new GdkPixbufDecoder (url), null);
+ GdkPixbufDecoder d = new GdkPixbufDecoder (url);
+ GtkImage image = new GtkImage (d, null);
+ d.startProduction (image);
+ return image;
}
public PrintJob getPrintJob (Frame frame, String jobtitle, Properties props)