summaryrefslogtreecommitdiff
path: root/tests/testsocket.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-11-15 17:58:35 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-11-15 17:58:35 +0000
commit701df64d9812f3704a34331325c87a11e7723616 (patch)
tree09bc347317faba65630b5e61db18c12c959df90d /tests/testsocket.c
parentd5ff32d7e0edee906e05e6cc2a60fc90e3b5b4d5 (diff)
downloadgdk-pixbuf-701df64d9812f3704a34331325c87a11e7723616.tar.gz
Patch from Murray Cumming to add "message_type" and "buttons" CONSTRUCT
Thu Nov 15 11:59:35 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkmessagedialog.c: Patch from Murray Cumming to add "message_type" and "buttons" CONSTRUCT properties. (#64069) * tests/testsocket.c: Expand tests to add a "local passive child" (Test case for #64428)
Diffstat (limited to 'tests/testsocket.c')
-rw-r--r--tests/testsocket.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/tests/testsocket.c b/tests/testsocket.c
index 149be0149..c3ad14e24 100644
--- a/tests/testsocket.c
+++ b/tests/testsocket.c
@@ -240,7 +240,7 @@ add_passive_child (GtkWidget *window)
}
void
-add_local_child (GtkWidget *window)
+add_local_active_child (GtkWidget *window)
{
Socket *socket;
@@ -251,6 +251,20 @@ add_local_child (GtkWidget *window)
create_child_plug (gtk_socket_get_id (GTK_SOCKET (socket->socket)), TRUE);
}
+void
+add_local_passive_child (GtkWidget *window)
+{
+ Socket *socket;
+ GdkNativeWindow xid;
+
+ socket = create_socket ();
+ gtk_box_pack_start (GTK_BOX (vbox), socket->box, TRUE, TRUE, 0);
+ gtk_widget_show (socket->box);
+
+ xid = create_child_plug (0, TRUE);
+ gtk_socket_add_id (GTK_SOCKET (socket->socket), xid);
+}
+
int
main (int argc, char *argv[])
{
@@ -299,11 +313,18 @@ main (int argc, char *argv[])
GTK_SIGNAL_FUNC(add_passive_child),
GTK_OBJECT(vbox));
- button = gtk_button_new_with_label ("Add Local Child");
+ button = gtk_button_new_with_label ("Add Local Active Child");
+ gtk_box_pack_start (GTK_BOX(vbox), button, FALSE, FALSE, 0);
+
+ gtk_signal_connect_object (GTK_OBJECT(button), "clicked",
+ GTK_SIGNAL_FUNC(add_local_active_child),
+ GTK_OBJECT(vbox));
+
+ button = gtk_button_new_with_label ("Add Local Passive Child");
gtk_box_pack_start (GTK_BOX(vbox), button, FALSE, FALSE, 0);
gtk_signal_connect_object (GTK_OBJECT(button), "clicked",
- GTK_SIGNAL_FUNC(add_local_child),
+ GTK_SIGNAL_FUNC(add_local_passive_child),
GTK_OBJECT(vbox));
button = gtk_button_new_with_label ("Remove Last Child");