GNOME Bugzilla – Bug 645456
Inconsistent window (role) naming scheme
Last modified: 2011-04-08 19:47:59 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
I vote for closing this as WONTFIX, we have more important things to care about.
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?
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(-)
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"
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.
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!
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.
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.
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 ?
Thanks for applying and done. :)