GNOME Bugzilla – Bug 105974
Some of the dialog boxes go behind the nautilus window.
Last modified: 2004-12-22 21:47:04 UTC
There are many functions like real_file_limit_reached, open_scripts_folder_callback, delete_callback, etc which call fm_directory_view_get_containing_window to get the parent window for their respective dialog boxes. All these dialog boxes are found to go behind the nautilus window when the nautilus window is clicked. This indicates that fm_directory_view_get_containing_window is not returning the correct parent window. In the function fm_directory_view_get_containing_window, it is found that window = gtk_widget_get_ancestor (GTK_WIDGET (view), GTK_TYPE_WINDOW) is not returning the correct window i.e. the nautilus window. It can be changed to window = gtk_widget_get_toplevel (GTK_WIDGET (view)); which returns the correct window. Attaching the patch.
I am not able to create the attachment. An error comes, No file was provided, or it was empty. Please hit Back and try again. Anyways, its just a one line patch so it can be tried easily. - window = gtk_widget_get_ancestor (GTK_WIDGET (view), GTK_TYPE_WINDOW); + window = gtk_widget_get_toplevel (GTK_WIDGET (view));
Index: nautilus/ChangeLog =================================================================== RCS file: /export/cvs/gnome-2.0/nautilus/ChangeLog,v retrieving revision 1.5696 diff -p -u -5 -r1.5696 ChangeLog --- nautilus/ChangeLog 2003/02/13 09:52:13 1.5696 +++ nautilus/ChangeLog 2003/02/13 11:25:58 @@ -1,5 +1,10 @@ +2003-02-13 Kaushal Kumar <kaushal.kumar@wipro.com> + + * src/file-manager/fm-directory-view.c (fm_directory_view_get_containing_window): + Parent window returning function changed. + 2003-02-13 Alexander Larsson <alexl@redhat.com> * src/nautilus-server-connect.c: Include locale.h. (#105756) Index: nautilus/src/file-manager/fm-directory-view.c =================================================================== RCS file: /export/cvs/gnome-2.0/nautilus/src/file-manager/fm-directory-view.c,v retrieving revision 1.561 diff -p -u -5 -r1.561 fm-directory-view.c --- nautilus/src/file-manager/fm-directory-view.c 2003/01/20 17:29:21 1.561 +++ nautilus/src/file-manager/fm-directory-view.c 2003/02/13 11:25:58 @@ -461,11 +461,11 @@ fm_directory_view_get_containing_window { GtkWidget *window; g_assert (FM_IS_DIRECTORY_VIEW (view)); - window = gtk_widget_get_ancestor (GTK_WIDGET (view), GTK_TYPE_WINDOW); + window = gtk_widget_get_toplevel (GTK_WIDGET (view)); if (window == NULL) { return NULL; } return GTK_WINDOW (window);
So this is fixed? Closing as such.