forked from AuroraMiddleware/gtk
Don't use gtk_socket_steal in the socket test
This commit is contained in:
parent
6f5b7bad3a
commit
014b05e6bd
@ -134,29 +134,6 @@ create_socket (void)
|
|||||||
return socket;
|
return socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
steal (GtkWidget *window, GtkEntry *entry)
|
|
||||||
{
|
|
||||||
guint32 xid;
|
|
||||||
const gchar *text;
|
|
||||||
Socket *socket;
|
|
||||||
|
|
||||||
text = gtk_entry_get_text (entry);
|
|
||||||
|
|
||||||
xid = strtol (text, NULL, 0);
|
|
||||||
if (xid == 0)
|
|
||||||
{
|
|
||||||
g_warning ("Invalid window id '%s'\n", text);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
socket = create_socket ();
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
remove_child (GtkWidget *window)
|
remove_child (GtkWidget *window)
|
||||||
{
|
{
|
||||||
@ -408,13 +385,6 @@ main (int argc, char *argv[])
|
|||||||
entry = gtk_entry_new ();
|
entry = gtk_entry_new ();
|
||||||
gtk_box_pack_start (GTK_BOX(hbox), entry, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX(hbox), entry, FALSE, FALSE, 0);
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("Steal");
|
|
||||||
gtk_box_pack_start (GTK_BOX(hbox), button, FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
g_signal_connect (button, "clicked",
|
|
||||||
G_CALLBACK (steal),
|
|
||||||
entry);
|
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_hbox_new (FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user