Ethereal-dev: [Ethereal-dev] Dialog/Window handling problem

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Tue, 25 May 2004 00:47:26 +0200
Hi List!

There's a problem with the current dialog handling.

Several days ago, I fixed a GTK2 behaviour, that it will bring *a* (but not necessarily the Ethereal) window to the top, when a dialog is closed. I've fixed this by automatically bringing the main window to the top, when a dialog is destroyed. This was ok, as all windows were transient to the main window, so bringing up the main window to the top was ok, as it shows also all transient windows on top of it.

In the current situation (after remarks by Guy and changes done by me), we have three kinds of windows:
-main window
-derived windows (e.g. various statistics, not transient to main)
-dialogs (e.g. file open, transient to main)

The problem now is: as the derived windows are no longer transient to the main window, the fix above will do a very ugly thing: When opening e.g. a statistics window, it might show up a progress bar (or some other dialog). But when the progress bar is closed again, the mechanism described above will bring the main window back on top, hiding the statistic window which is much more likely wanted to be seen :-(

The clean solution would be to tell all dialogs which parents they belong to (e.g. using an additional parameter at dlg_window_new call), so the dialog will bring the appropriate parent window back to the top. As there are a lot of places, where this parent info is just unknown (e.g. the progressbar calls in file.c), this is hard to get.

Any solutions welcome!

Regards, ULFL