After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 347214 - message dialogs appear behind plug-in dialog
message dialogs appear behind plug-in dialog
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
git master
Other All
: Normal normal
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-07-11 12:23 UTC by Sven Neumann
Modified: 2006-08-08 21:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sven Neumann 2006-07-11 12:23:13 UTC
When a GIMP plug-ins uses g_message(), the log handler installed by libgimp redirects this message to the core where a message dialog is created unless the user has opened the error console or redirected error messages to the console.

In GIMP 2.3, plug-in dialogs are transient to the image window. This causes them to stay on top of the image window and to iconify/deiconify with the image window. That's the desired effect. Unfortunately it has an undesired side-effect: Message dialogs created by the core will appear below the plug-in dialog. As a result they are likely to be not noticed by the user.

We need to find a solution for this problem for the 2.4 release. A possible workaround is to avoid the use of g_message() and use GtkMessageDialog whenever possible. There are however quite a few calls to g_message(). Most of them are probably OK because the plug-in doesn't have a dialog open at that point. It's still quite a bit of work to check all plug-ins so a different is desired.
Comment 1 Sven Neumann 2006-07-14 07:45:28 UTC
I am working on a fix for this. It's almost done and should be ready for commit soon.
Comment 2 Sven Neumann 2006-07-19 07:01:50 UTC
I have committed a change to CVS.  It fixes the problem but further work is needed.  With the change, related messages might appear in different dialogs. We need to review the use of g_message() in the core and use gimp_message() with a pointer to the active GimpProgress whenever possible.

2006-07-19  Sven Neumann  <sven@gimp.org>

        Make message dialogs transient for the progress window. Addresses
        bug #347214.

        * app/core/gimp-gui.[ch]: added a progress parameter to
        gimp_message().  Let gimp_message() deal with optionally
        delegating the message to gimp_progress_message().

        * app/errors.c: changed accordingly.

        * app/core/gimpprogress.[ch] (gimp_progress_message): return a
        boolean indicating whether the message was handled.

        * app/gui/Makefile.am
        * app/gui/gui-message.[ch]
        * app/gui/gui-vtable.c: moved message handling to a new file. Only
        use the global error dialog for messages without a progress.
        Otherwise attach an error dialog to the progress and try to make
        it transient to the progress window.

        * tools/pdbgen/pdb/message.pdb:
        * app/plug-in/gimpplugin-progress.[ch]: don't delegate messages to
        the progress interface, this is handled by gimp_message() now.

        * app/pdb/message_cmds.c: regenerated.
Comment 3 Sven Neumann 2006-08-08 21:07:35 UTC
This should be take care of the remaining issues, closing as FIXED;

2006-08-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimp.[ch]: added new function gimp_message() as a
	replacement for g_message(). Part of the fix for bug #347214.

	* app/actions/data-commands.c
	* app/actions/documents-commands.c
	* app/actions/file-commands.c
	* app/actions/layers-commands.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimagefile.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/dialogs/file-open-dialog.c
	* app/dialogs/file-open-location-dialog.c
	* app/dialogs/file-save-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/pdb/gimppdb.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-private.h
	* app/xcf/xcf-save.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/palette.pdb: use gimp_message() instead of
	gimp_message() whenever we have a GimpProgress.

	* app/pdb/brush_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/palette_cmds.c: regenerated.