summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-11-12 19:16:11 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-11-12 19:16:11 +0000
commit2cb2d33b2086617fcb8d968f08bde3e60e09a9f7 (patch)
treecbc6bbde17abfff2378b0feaa305c9dda25a0c1f /tests
parent114d0b6b25d64d70d68997d64d46b561ecfe4e46 (diff)
downloadgdk-pixbuf-2cb2d33b2086617fcb8d968f08bde3e60e09a9f7.tar.gz
Fix problem with using result of g_get_charset() backwards - pointed out
Sun Nov 12 14:10:09 2000 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): Fix problem with using result of g_get_charset() backwards - pointed out by Mikael Hermansson <mikeh@bahnhof.se>. * gtk/gtkwindow.c (gtk_window_compute_hints): Support negative min_width/height and max_width/height to mean "requisition"; this allows setting a window to be user-resizable in only one direction easily. * gtk/testgtk.c (create_main_window): Remove hard-coded usize - set a default size in the vertical direction.
Diffstat (limited to 'tests')
-rw-r--r--tests/testgtk.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/testgtk.c b/tests/testgtk.c
index fd1795f2f..cfcbaf130 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -9151,13 +9151,21 @@ create_main_window (void)
GtkWidget *label;
gchar buffer[64];
GtkWidget *separator;
+ GdkGeometry geometry;
int i;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, FALSE);
gtk_widget_set_name (window, "main window");
- gtk_widget_set_usize (window, 200, 400);
gtk_widget_set_uposition (window, 20, 20);
+ gtk_window_set_default_size (GTK_WINDOW (window), -1, 400);
+
+ geometry.min_width = -1;
+ geometry.min_height = -1;
+ geometry.max_width = -1;
+ geometry.max_height = G_MAXSHORT;
+ gtk_window_set_geometry_hints (GTK_WINDOW (window), NULL,
+ &geometry,
+ GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(gtk_main_quit),
@@ -9187,7 +9195,7 @@ create_main_window (void)
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 10);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
- GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (box1), scrolled_window, TRUE, TRUE, 0);