让孩子接受GtkDialog的正确方法是什么?
我试过了:
dlgg = gtk_file_chooser_dialog_new(...)
GList *children = gtk_container_get_children(GTK_CONTAINER(dlgg))
for (GList * it = children; it; it = it->next)
{
if (GTK_IS_BUTTON(it->data))
g_print("button label %s\n", gtk_button_get_label(GTK_BUTTON(it->data)));
}
但没有输出。实际上,我调用gtk_dialog_run(dlgg)并发现它至少有'取消','打开'按钮......
我试过了:
GtkWidget* action_area = gtk_dialog_get_action_area(GTK_DIALOG(dlgg));
GList *children = gtk_container_get_children(GTK_CONTAINER(dlgg));
但是gcc抱怨道:
error: `gtk_dialog_set_action_area' was not declared in this scope
我还包括gtk/gtk.h
,其他方法效果很好,为什么?
提前致谢!