Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
In GNOME Shell currently, if you launch CKAN via the system menu, its icon has a "New Window" option:
Clicking it launches CKAN again, which invariably brings up the locked instance error:
It is a little embarrassing to have a highly visible option that doesn't work well by default.
Noticed while investigating #3423.
Cause
The "New Window" option is added by GNOME Shell automatically (if the
.desktop
file'sActions=
list doesn't includenew-window
), and probably works fine for 90% of apps where running theExec
again successfully opens a new window that works properly.Changes
Now our
.desktop
files setX-GNOME-SingleWindow=true
to suppress the "New Window" option.To find out this option existed, I had to read the GNOME source code:
I looked for a similar option for KDE or other desktops but could not find one, but I'm happy to add it here if it exists.
In addition,
StartupNotify
is removed because we do not "KNOW" that our application will send this message (because who knows what Mono's WinForms will do or not do in any situation):https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys