summaryrefslogtreecommitdiff
path: root/tests/testsocket.c
diff options
context:
space:
mode:
authorSoeren Sandmann <sandmann@daimi.au.dk>2004-03-02 20:49:15 +0000
committerSøren Sandmann Pedersen <ssp@src.gnome.org>2004-03-02 20:49:15 +0000
commitcddfd994ef4ed9a92444c409dd37d9357acbfacb (patch)
tree046fa434f0e40fa93e33f946756009c925037c36 /tests/testsocket.c
parentf05cb42db9b7c1d8409f4dcfc0f25d32ef62a973 (diff)
downloadgtk+-cddfd994ef4ed9a92444c409dd37d9357acbfacb.tar.gz
Patch from Frederic Crozat, test code from Jean-Philippe Chancelier. Fixes
Tue Mar 2 21:23:30 2004 Soeren Sandmann <sandmann@daimi.au.dk> Patch from Frederic Crozat, test code from Jean-Philippe Chancelier. Fixes bug #120479. * gtk/gtkcombo.c (gtk_combo_popup_list): Make sure popup belongs to the right window group. * gtk/gtkmenu.c (gtk_menu_popup): Same * tests/testsocket.c (main): Pack the plugs into an hbox instead of a vbox. * tests/testsocket_common.c: Add a GtkMenuBar, a GtkCombo and a GtkComboBox to the children.
Diffstat (limited to 'tests/testsocket.c')
-rw-r--r--tests/testsocket.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/testsocket.c b/tests/testsocket.c
index 7168d1d434..85a7192d74 100644
--- a/tests/testsocket.c
+++ b/tests/testsocket.c
@@ -11,7 +11,7 @@ int n_children = 0;
GSList *sockets = NULL;
GtkWidget *window;
-GtkWidget *vbox;
+GtkWidget *box;
typedef struct
{
@@ -129,7 +129,7 @@ steal (GtkWidget *window, GtkEntry *entry)
}
socket = create_socket ();
- gtk_box_pack_start (GTK_BOX (vbox), socket->box, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (box), socket->box, TRUE, TRUE, 0);
gtk_widget_show (socket->box);
gtk_socket_steal (GTK_SOCKET (socket->socket), xid);
@@ -167,7 +167,7 @@ child_read_watch (GIOChannel *channel, GIOCondition cond, gpointer data)
else
{
Socket *socket = create_socket ();
- gtk_box_pack_start (GTK_BOX (vbox), socket->box, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (box), socket->box, TRUE, TRUE, 0);
gtk_widget_show (socket->box);
gtk_socket_add_id (GTK_SOCKET (socket->socket), xid);
@@ -204,7 +204,7 @@ add_child (GtkWidget *window,
if (active)
{
socket = create_socket ();
- gtk_box_pack_start (GTK_BOX (vbox), socket->box, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (box), socket->box, TRUE, TRUE, 0);
gtk_widget_show (socket->box);
sprintf(buffer, "%#lx", (gulong) gtk_socket_get_id (GTK_SOCKET (socket->socket)));
argv[1] = buffer;
@@ -248,7 +248,7 @@ add_local_active_child (GtkWidget *window)
Socket *socket;
socket = create_socket ();
- gtk_box_pack_start (GTK_BOX (vbox), socket->box, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (box), socket->box, TRUE, TRUE, 0);
gtk_widget_show (socket->box);
create_child_plug (gtk_socket_get_id (GTK_SOCKET (socket->socket)), TRUE);
@@ -261,7 +261,7 @@ add_local_passive_child (GtkWidget *window)
GdkNativeWindow xid;
socket = create_socket ();
- gtk_box_pack_start (GTK_BOX (vbox), socket->box, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (box), socket->box, TRUE, TRUE, 0);
gtk_widget_show (socket->box);
xid = create_child_plug (0, TRUE);
@@ -273,6 +273,7 @@ main (int argc, char *argv[])
{
GtkWidget *button;
GtkWidget *hbox;
+ GtkWidget *vbox;
GtkWidget *entry;
GtkAccelGroup *accel_group;
GtkItemFactory *item_factory;
@@ -345,6 +346,11 @@ main (int argc, char *argv[])
G_CALLBACK (steal),
entry);
+ hbox = gtk_hbox_new (FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+
+ box = hbox;
+
gtk_widget_show_all (window);
gtk_main ();