gtk+ : GtkFileChooserDialog hide some widgets
I have a little problem with the GtkFileChooserDialog.
I Want to hide the favoris panel (widget on the left).
So I start to get the GtkVBox of the GtkFileChooserDialog, and now I Want to retrive it's child and hite it, but I don't find it's children.
Here is my code :
my_dialog = gtk_file_chooser_dialog_new("Hop", NULL, GTK_FILE_CHOOSER_ACTION_OPEN,GTK_STOCK_CANCEL);
button = gtk_file_chooser_button_new_with_dialo开发者_开发技巧g(my_dialog);
children_dial = gtk_container_get_children(GTK_CONTAINER(my_dialog));
v_dial = GTK_VBOX(children_dial->data);
v_children = gtk_container_get_children(GTK_CONTAINER(v_dial));
So if anyone has an idea,
thanks.
The children of the GtkFileChooserDialog
and GtkFileChooserWidget
are "internal" children which means you can't retrieve them like that. You aren't supposed to mess with them, since they may be implemented differently in a future version. However, you can access them with gtk_container_forall()
.
Why do you want to hide the favorites panel? Unless you have a really good reason, it is bad user interface design to change the standard file dialog that users expect, just because you don't like the panel on the left.
精彩评论