El miÃ, 25 de 02 de 2004 a las 20:33, Grace Yeung escribiÃ:
The problem is the child window is created internally by the gnome_file_entry widget (yes, it is a dialog), and so I am not sure how to access it in order to make it modal and "transient" (i.e. the parent window won't cover the child window). The gnome_file_entry widget is a dialog box allowing one to browse directories etc., and the dialog box contains a button called "Create Dir" for creating new directories. When this button is clicked, a child window is supposed to come up for the user to enter the directory name, but this child window does not show up on top of the parent window.
Ok now I understand it :)
I suppose the code for generating this child window needs to use gtk_window_set_transient_for() in order to make it show up on top, but since it does not do that,
You're right.
I was wondering if there's another solution to the problem... Any tips/help? Thanks!
Well, check here: http://cvs.gnome.org/bonsai/cvsblame.cgi?file=libgnomeui%2Flibgnomeui/gnome-file-entry.c and here: http://cvs.gnome.org/bonsai/cvsblame.cgi?file=libgnomeui%2Flibgnomeui/gnome-file-entry.h A quick look tell me that gnome_file_entry have a gtk_file_selection into. The file selection is the owner of the button ( I think ) So try to grab the file selection and override (disconnect) the "clicked" signal of the button with your own callback, so you can construct the dialog and make it transient for your window. Just a 10 seconds view .... may be, there are better solutions. The file selector is at gnome_file_entry->fsw (it's not private). Hope this helps.
Grace Iago Rubio wrote:El lun, 23 de 02 de 2004 a las 21:26, Grace Yeung escribiÃÂ:I am using a gnome_file_entry widget for the capability of browsing directories. With this widget, the user can create a new directory by clicking on the built-in Create Dir button which brings up another window. However, this window that is created internally does not stay on top of the parent window. Is there a way to access this window so I can do a gtk_window_set_transient_for()? Or is there another way of fixing this problem? Thanks.I've never used gnome_file_entry, but it seems to be a dialog, isn't it? As a dialog owns a top level window, and all widgets into it are children of the top level, I suposse that gtk_widget_get_top_level() in any children will make the job and return the dialog's window. regards
-- Iago Rubio http://www.iagorubio.com GPGkey pgp.rediris.es id 0x909BD4DD fingerprint = D18A B950 5F03 BB9A DD89 AA75 FEDF 1978 909B D4DD ********** iago.rubio(AT)hispalinux.es ********** --------------------------------------------------
Attachment:
signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente