]> Pileus Git - ~andy/gtk/blobdiff - tests/testmultiscreen.c
reftests: Add a reftest for the empty iconview
[~andy/gtk] / tests / testmultiscreen.c
index 04a83157efa6e77141da5d9ab2c62c838357c20f..0c20f19600b627c52ebfcc4e193d58585aac7f48 100644 (file)
@@ -1,3 +1,22 @@
+/* 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
 #include <gtk/gtk.h>
 
 static GtkWidget **images;
@@ -30,7 +49,7 @@ show_hide (GtkWidget * button, gpointer data)
 }
 
 static void
-move (GtkWidget *button, GtkVBox *vbox)
+move (GtkWidget *button, GtkBox *vbox)
 {
   GdkScreen *screen = gtk_widget_get_screen (button);
   GtkWidget *toplevel = gtk_widget_get_toplevel (button);
@@ -90,22 +109,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,
@@ -118,7 +137,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,
@@ -131,10 +150,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);