-#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;
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,
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,
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);