[Nautilus-list] Need help with bugfix in eel



Bug nr. 67978 bothered me so much I wanted to deal with it. Since I
realized Gnome1 is on it's way out, I'd rather fix it in Gnome2.

PROBLEM:
To summarize, it makes sure that dialogs created from the Nautilus
Desktop, cannot be brought to the top. This means that "empty trash" and
"are you sure you want to delete" will disappear behind all the other
windows on your desktop, leaving you to ponder why nothing happened, and
why you cannot do anything in your Nautilus-windows.

POSSIBLE SOLUTION:
Now.. the solution it seems is just to make the dialogs that are created
with the desktop as parent non-transient.

This can be done in eel-stock-dialogs.c: show_message_dialog, which I've
found is the mother of all dialog-creators in nautilus.

The call below will make the dialog non-transient, I've figured:
gtk_window_set_transient_for (GTK_WINDOW (dialog), NULL);

But how do I distinguish between the desktop and any other Nautilus
window? I figured the desktop is the GDK_WINDOW that has the root window
as it's parent.

The problem is that using gdk_window_get_parent(parent->window) will give
me a GdkWindowType == GDK_WINDOW_ROOT, even if the window I activated the
dialog from was in fact a regular Nautilus window.

Can someone help me with a sure way of finding out if a given GtkWindow is
the desktop? I've been stomping my head against the keyboard for some time
now.

Gaute







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]