67 const char *text,
const char *postinputtest,
71 GtkWidget *
shell, *label, *input;
77 shell = gtk_dialog_new_with_buttons(dialogname,
79 GTK_DIALOG_DESTROY_WITH_PARENT,
80 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
81 GTK_STOCK_OK, GTK_RESPONSE_OK,
83 gtk_dialog_set_default_response(GTK_DIALOG(
shell), GTK_RESPONSE_OK);
87 gtk_window_set_position(GTK_WINDOW(
shell), GTK_WIN_POS_CENTER_ON_PARENT);
89 label = gtk_frame_new(text);
92 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(
shell))), label,
TRUE,
TRUE, 0);
94 input = gtk_entry_new();
95 gtk_container_add(GTK_CONTAINER(label), input);
96 gtk_entry_set_text(GTK_ENTRY(input), postinputtest);
97 gtk_entry_set_activates_default(GTK_ENTRY(input),
TRUE);
98 g_object_set_data(G_OBJECT(
shell),
"iinput", input);
100 gtk_widget_show_all(GTK_WIDGET(
shell));
101 gtk_window_present(GTK_WINDOW(
shell));