On Wed, May 10, 2006 at 05:09:53PM +0200, Francesco Montorsi wrote: > I'm using GtkFileChooserButton and I've found that if I call > gtk_grab_add on the toplevel window containing that button, then the > dialog shown by the button will be un-responsive while the main window > will continue to handle user events (i.e. the dialog created by the > dialog is not modal). > > This can be seen also in gtk-demo\pickers.c adding: > > gtk_grab_add(window); > > before the call to gtk_widget_show_all(). Running the pickers sample and > clicking the dir-selector or the file-selector will show two unusable > dialogs... how can I avoid it (for some long-to-explain reasons, I > cannot remove the gtk_grab_add call on the parent window) ?
You can set up the file chooser dialog yourself and pass it to gtk_file_chooser_button_new_with_dialog() constructor. If the parent window is modal, setting the dialog modal too should suffice. If you for some reason do explicit grab, it does not seem to suffice and you have to g_signal_connect(dialog, "show", G_CALLBACK(gtk_grab_add), NULL); g_signal_connect(dialog, "hide", G_CALLBACK(gtk_grab_remove), NULL); instead (or something like that). Yeti -- Anonyms eat their boogers. _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list