]> Pileus Git - ~andy/gtk/blobdiff - tests/testmultiscreen.c
gtk: remove "gboolean homogeneous" from gtk_box_new()
[~andy/gtk] / tests / testmultiscreen.c
index ba7170e17fe392a0d8ff5d1640f4e36aa4134240..19e206130e35af091e86015653d850e6c0434019 100644 (file)
@@ -1,4 +1,24 @@
-#include <config.h>
+/* testmultidisplay.c
+ * Copyright (C) 2001 Sun Microsystems Inc.
+ * Author: Erwann Chenede <erwann.chenede@sun.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
 #include <gtk/gtk.h>
 
 static GtkWidget **images;
@@ -91,22 +111,22 @@ main (int argc, char *argv[])
       
       screen_list[i] = gdk_display_get_screen (dpy, i);
 
-      window[i] = gtk_widget_new (GTK_TYPE_WINDOW,
+      window[i] = g_object_new (GTK_TYPE_WINDOW,
                                  "screen", screen_list[i],
                                  "user_data", NULL,
                                  "type", GTK_WINDOW_TOPLEVEL,
                                  "title", label,
-                                 "allow_grow", FALSE,
-                                 "allow_shrink", FALSE,
+                                  "resizable", FALSE,
                                  "border_width", 10, NULL,
                                  NULL);
       g_signal_connect (window[i], "destroy",
                        G_CALLBACK (gtk_main_quit), NULL);
 
-      vbox[i] = gtk_vbox_new (TRUE, 0);
+      vbox[i] = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+      gtk_box_set_homogeneous (GTK_BOX (vbox[i]), TRUE);
       gtk_container_add (GTK_CONTAINER (window[i]), vbox[i]);
 
-      button = gtk_widget_new (GTK_TYPE_BUTTON,
+      button = g_object_new (GTK_TYPE_BUTTON,
                               "label", label,
                               "parent", vbox[i],
                               "visible", TRUE, NULL,
@@ -119,7 +139,7 @@ main (int argc, char *argv[])
       
       gtk_container_add (GTK_CONTAINER (vbox[i]), images[i]);
 
-      button = gtk_widget_new (GTK_TYPE_BUTTON,
+      button = g_object_new (GTK_TYPE_BUTTON,
                               "label", "Hide Icon",
                               "parent", vbox[i],
                               "visible", TRUE, NULL,
@@ -132,10 +152,11 @@ main (int argc, char *argv[])
     gtk_widget_show_all (window[i]);
   
   moving_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  moving_vbox = gtk_vbox_new (TRUE, 0);
-  
+  moving_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+  gtk_box_set_homogeneous (GTK_BOX (moving_vbox), TRUE);
+
   gtk_container_add (GTK_CONTAINER (moving_window), moving_vbox);
-  moving_button = gtk_widget_new (GTK_TYPE_BUTTON,
+  moving_button = g_object_new (GTK_TYPE_BUTTON,
                                  "label", "Move to Next Screen",
                                  "visible", TRUE,
                                  NULL);