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 744446 - duplicate new window actions
duplicate new window actions
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-02-13 00:52 UTC by Matthias Clasen
Modified: 2015-06-22 21:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
appDisplay: Do not duplicate "New Window" action (1.86 KB, patch)
2015-02-13 10:25 UTC, Florian Müllner
committed Details | Review

Description Matthias Clasen 2015-02-13 00:52:38 UTC
While fixing gedits desktop file to use the proper gaction id new-window for its new window Desktop Action, I noticed that gnome-shell still shows its own 'New Window' action in the context menu, even when the application has app.new-window. That looks a bit silly in the menu. I would suggest to hide 'New Window' if we find the app.new-window action.
Comment 1 Florian Müllner 2015-02-13 10:25:19 UTC
Created attachment 296760 [details] [review]
appDisplay: Do not duplicate "New Window" action

We assume that applications that export a 'new-window' action can open
a new window, so we add an appropriate entry to the context menu.
However this duplicates functionality if the application already
exposes the action via the desktop file - don't add our own entry
in that case.
Comment 2 Rui Matos 2015-02-13 13:05:15 UTC
Review of attachment 296760 [details] [review]:

lgtm
Comment 3 Florian Müllner 2015-02-13 22:28:22 UTC
Attachment 296760 [details] pushed as 12cb023 - appDisplay: Do not duplicate "New Window" action
Comment 4 Ron Yorston 2015-06-22 16:19:30 UTC
The Midori web browser has a 'WindowNew' desktop action with the text 'New Window'.  The fix doesn't work for that case, the context menu still shows 'New Window' twice.
Comment 5 Florian Müllner 2015-06-22 21:02:32 UTC
(In reply to Ron Yorston from comment #4)
> The fix doesn't work for that case

That's because we make no intend to guess if an arbitrary action will open a new window - if we assume that the app can create a new window and doesn't export an action called 'new-window' (not 'NewWindow', 'open-window', 'CreateNewWindow', ...), we add the option ourselves.