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 645456 - Inconsistent window (role) naming scheme
Inconsistent window (role) naming scheme
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.6.11
Other All
: Low minor
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2011-03-21 20:27 UTC by Christoph Kappel
Modified: 2011-04-08 19:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds 'gimp-' prefix to plug-in dialog windows (109.63 KB, patch)
2011-04-02 13:57 UTC, Christoph Kappel
committed Details | Review

Description Christoph Kappel 2011-03-21 20:27:01 UTC
The naming scheme of e.g. window role isn't applied to all windows. It is sometimes really annoying to write rules to place these windows.

For example the image window and the toolbox have following window roles like this: gimp-name

The screenshot or the preferences window just have this: name
Comment 1 Martin Nordholts 2011-03-21 20:43:48 UTC
I vote for closing this as WONTFIX, we have more important things to care about.
Comment 2 Michael Natterer 2011-03-21 20:46:01 UTC
What? This is a true bug, and it's not less of a bug just because we
don't have time for it right now. Also this is really easy to fix.

Christoph, would you mind making a list of dialogs where the
roles are inconsistent?
Comment 3 Michael Natterer 2011-03-21 20:50:00 UTC
Fixed the prefs role:

commit 33dd20750f9eb848af64d0a00bbed08452a3b143
Author: Michael Natterer <mitch@gimp.org>
Date:   Mon Mar 21 21:49:08 2011 +0100

    Bug 645456 - Inconsistent window (role) naming scheme
    
    "preferences" -> "gimp-preferences"

 app/dialogs/preferences-dialog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Comment 4 Christoph Kappel 2011-03-21 21:26:05 UTC
Yep, ofc here is the list of windows I could find and thanks for the fast
reply:

File menu:

WM_WINDOW_ROLE(STRING) = "screenshot"
WM_NAME(STRING) = "Screenshot"

(no window role at all)
WM_NAME(STRING) = "Page Setup"

Edit menu:

WM_WINDOW_ROLE(STRING) = "preferences"
WM_NAME(STRING) = "Preferences"

Colors menu:

WM_WINDOW_ROLE(STRING) = "color-to-aplha"
WM_NAME(STRING) = "Color to Alpha"

WM_WINDOW_ROLE(STRING) = "colorify"
WM_NAME(STRING) = "Colorify"

WM_WINDOW_ROLE(STRING) = "filter-pack"
WM_NAME(STRING) = "Filter Pack Simulation"

WM_WINDOW_ROLE(STRING) = "hot"
WM_NAME(STRING) = "Hot"

WM_WINDOW_ROLE(STRING) = "max-rgb"
WM_NAME(STRING) = "Maximum RGB Value"

WM_WINDOW_ROLE(STRING) = "contrast-retinex"
WM_NAME(STRING) = "Retinex Image Enhancement"

Help menu:

WM_WINDOW_ROLE(STRING) = "plugin-browser"
WM_NAME(STRING) = "Plug-In Browser"

WM_WINDOW_ROLE(STRING) = "procedure-browser"
WM_NAME(STRING) = "Procedure Browser"

WM_WINDOW_ROLE(STRING) = "about-dialog"
WM_NAME(STRING) = "About GIMP"

Probably all filter windows, here the first 15 in the hope that this is just a
generic function:

WM_WINDOW_ROLE(STRING) = "blur-gauss"
WM_NAME(STRING) = "Gaussian Blur"

WM_WINDOW_ROLE(STRING) = "blur-motion"
WM_NAME(STRING) = "Motion Blur"

WM_WINDOW_ROLE(STRING) = "pixelize"
WM_NAME(STRING) = "Pixelize"

WM_WINDOW_ROLE(STRING) = "blur-gauss-selective"
WM_NAME(STRING) = "Selective Gaussian Blur"

WM_WINDOW_ROLE(STRING) = "script-fu"
WM_NAME(STRING) = "Script-Fu: Tileable Blur"

WM_WINDOW_ROLE(STRING) = "deinterlace"
WM_NAME(STRING) = "Deinterlace"

_NET_WM_NAME(UTF8_STRING) = "Deinterlace"
WM_WINDOW_ROLE(STRING) = "despeckle"

WM_NAME(STRING) = "Despeckle"
_NET_WM_NAME(UTF8_STRING) = "Despeckle"

WM_WINDOW_ROLE(STRING) = "destripe"
WM_NAME(STRING) = "Destripe"

WM_WINDOW_ROLE(STRING) = "nl-filter"
WM_NAME(STRING) = "NL Filter"

WM_WINDOW_ROLE(STRING) = "red-eye-removal"
WM_NAME(STRING) = "Red Eye Removal"

WM_WINDOW_ROLE(STRING) = "sharpen"
WM_NAME(STRING) = "Sharpen"

WM_WINDOW_ROLE(STRING) = "unsharp-mask"
WM_NAME(STRING) = "Unsharp Mask"

WM_WINDOW_ROLE(STRING) = "blinds"
WM_NAME(STRING) = "Blinds"

WM_WINDOW_ROLE(STRING) = "curve-bend"
WM_NAME(STRING) = "Curve Bend"
Comment 5 Michael Natterer 2011-03-30 18:22:29 UTC
Thanks, and grep didn't find anything else in app/ apart from about:

commit 92d7c7d8d9d2dc606422d5370c7ad48d244d64af
Author: Michael Natterer <mitch@gimp.org>
Date:   Wed Mar 30 20:20:47 2011 +0200

    app: change about dialog role from "about-dialog" to "gimp-about"

 app/dialogs/about-dialog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

The remaining ones are plug-in dialogs, but I agree they should be
in the gimp namespace.
Comment 6 Christoph Kappel 2011-03-30 19:18:41 UTC
The help browser or the screenshot dialog belong to a plugin as well? Once this is done it will be really easy to match gimp dialogs. Thanks for your work!
Comment 7 Michael Natterer 2011-03-31 18:18:31 UTC
You can easily make this happen by going through all plugins
and adding a "gimp-" prefix to all calls to gimp_dialog_new()
and attaching the patch to this bug.
Comment 8 Christoph Kappel 2011-04-02 13:57:05 UTC
Created attachment 184944 [details] [review]
Adds 'gimp-' prefix to plug-in dialog windows

Patch for GIMP 2.7, wasn't able to checkout the git version and had to apply 
following additional patch: https://bugzilla.gnome.org/attachment.cgi?id=151806&action=edit

Since every (except gfig-grid) plug-in uses PLUG_IN_BINARY for window role I added PLUG_IN_ROLE in case both names vary.
Comment 9 Michael Natterer 2011-04-08 18:35:07 UTC
Thanks, great patch! :) Pushed to master:

commit 8c4d99f883b13a248fd57d414bb130331b4042a3
Author: Michael Natterer <mitch@gimp.org>
Date:   Fri Apr 8 20:31:34 2011 +0200

    Bug 645456 - Inconsistent window (role) naming scheme
    
    Applied patch from Christoph Kappel which adds a "gimp-" prefix to all
    plug-in dialog window roles.


Can you please attach the unrelated png patch to bug #640409 ?
Comment 10 Christoph Kappel 2011-04-08 19:47:59 UTC
Thanks for applying and done. :)