GtkDialogPeer.java (create): Add width and height arguments to GtkWindowPeer.create method call.

2003-09-02  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkDialogPeer.java (create): Add width
	and height arguments to GtkWindowPeer.create method call.
	* gnu/java/awt/peer/gtk/GtkWindowPeer.java
	(create(int,int,int)): New method.
	(create(int)): Add call to new create method.
	(create()): Add width and height arguments to create method
	call.
	(GtkWindowPeer): Remove call to setBounds.
	* java/awt/Frame.java (Frame(String)): Initialize visible field
	to false.
	(Frame(GraphicsConfiguration)): Likewise.
	(Frame(String,GraphicsConfiguration)): Likewise.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c (create):
	Add width and height parameters.  Call
	gtk_window_set_default_size.
	(connectHooks): Remove unused name variable.
	(static setBounds): Call gtk_window_resize not
	gtk_widget_set_usize.
	(setBounds): Remove unused nchildren variable.

From-SVN: r71007
This commit is contained in:
Thomas Fitzsimmons 2003-09-02 23:04:05 +00:00 committed by Thomas Fitzsimmons
parent f0e9957ac9
commit 48c2d88a10
5 changed files with 47 additions and 24 deletions

View file

@ -53,7 +53,9 @@ public class GtkDialogPeer extends GtkWindowPeer
void create ()
{
create (GTK_WINDOW_POPUP);
create (GTK_WINDOW_POPUP,
awtComponent.getWidth(),
awtComponent.getHeight());
}
public void getArgs (Component component, GtkArgList args)

View file

@ -49,11 +49,18 @@ public class GtkWindowPeer extends GtkContainerPeer
static protected final int GTK_WINDOW_TOPLEVEL = 0;
static protected final int GTK_WINDOW_POPUP = 1;
native void create (int type);
native void create (int type, int width, int height);
void create (int type)
{
create (type, awtComponent.getWidth(), awtComponent.getHeight());
}
void create ()
{
create (GTK_WINDOW_POPUP);
create (GTK_WINDOW_POPUP,
awtComponent.getWidth(),
awtComponent.getHeight());
}
native void connectHooks ();
@ -61,9 +68,6 @@ public class GtkWindowPeer extends GtkContainerPeer
public GtkWindowPeer (Window window)
{
super (window);
Dimension d = window.getSize ();
setBounds (0, 0, d.width, d.height);
}
public void getArgs (Component component, GtkArgList args)