Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set SingleMainWindow in .desktop file #7430

Merged
merged 1 commit into from
Jan 29, 2023

Conversation

z3ntu
Copy link
Contributor

@z3ntu z3ntu commented Feb 18, 2022

Add SingleMainWindow (introduced in v1.5 of Desktop Entry Specification)
and the older key X-GNOME-SingleWindow that's more widely supported at
the moment.

This allows desktop environments to determine that the application can
only have one window open and hide options like "Open New Window".

Screenshots

Before:

image

After:

image

Testing strategy

Install modified manually into /usr/share/applications/org.keepassxc.KeePassXC.desktop and observe behavior change on Plasma 5.24.1

@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2022

Codecov Report

Base: 64.41% // Head: 64.42% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (f2296c2) compared to base (8846880).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7430      +/-   ##
===========================================
+ Coverage    64.41%   64.42%   +0.01%     
===========================================
  Files          341      341              
  Lines        44262    44262              
===========================================
+ Hits         28511    28514       +3     
+ Misses       15751    15748       -3     
Impacted Files Coverage Δ
src/autotype/AutoType.cpp 69.67% <ø> (ø)
src/cli/DatabaseCreate.cpp 91.35% <ø> (ø)
src/cli/Import.cpp 87.50% <ø> (ø)
src/cli/Utils.cpp 81.97% <ø> (ø)
src/core/AsyncTask.h 100.00% <ø> (ø)
src/core/Database.cpp 84.34% <ø> (ø)
src/gui/DatabaseTabWidget.cpp 61.83% <ø> (ø)
src/gui/MainWindow.cpp 71.49% <ø> (ø)
src/gui/reports/ReportsWidgetHibp.cpp 7.96% <0.00%> (ø)
src/keeshare/ShareExport.cpp 0.00% <0.00%> (ø)
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@droidmonkey
Copy link
Member

Got some build issues:

[ INFO ] Creating AppImage...
09:18:59 appimagetool, continuous build (commit a2d9cfc), build built on 2021-11-10 17:45:54 UTC
09:18:59 /opt/buildagent/work/c401303cba1b4098/build/KeePassXC.AppDir/org.keepassxc.KeePassXC.desktop: error: value "1.5" for key "Version" in group "Desktop Entry" is not a known version
09:18:59 /opt/buildagent/work/c401303cba1b4098/build/KeePassXC.AppDir/org.keepassxc.KeePassXC.desktop: hint: value item "Security" in key "Categories" in group "Desktop Entry" can be extended with another category among the following categories: Settings, or System
09:18:59 /opt/buildagent/work/c401303cba1b4098/build/KeePassXC.AppDir/org.keepassxc.KeePassXC.desktop: error: file contains key "SingleMainWindow" in group "Desktop Entry", but keys extending the format should start with "X-"

@z3ntu
Copy link
Contributor Author

z3ntu commented Feb 19, 2022

Looks like this is from desktop-file-validate which has only quite recently gained support for the new properties, see https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/commits/master/ - pending upstream release.

@droidmonkey
Copy link
Member

We'll have to sit on this one, may be too new to include and not break a lot of distros

@z3ntu
Copy link
Contributor Author

z3ntu commented Feb 19, 2022

As far as I understand, only desktop-file-validate complains about this, unknown keys get ignored by desktop environments anyways and should be safe to ship to older distros.

@vimpostor
Copy link
Contributor

FYI KDE also respects X-GNOME-SingleWindow=true, so if you care about the CI linter, you can also just add the X-GNOME-SingleWindow=true change now, and maybe add the Version and SingleMainWindow update in a few months.

@droidmonkey droidmonkey added this to the v2.7.5 milestone Jan 29, 2023
Add SingleMainWindow (introduced in v1.5 of Desktop Entry Specification)
and the older key X-GNOME-SingleWindow that's more widely supported at
the moment.

This allows desktop environments to determine that the application can
only have one window open and hide options like "Open New Window".
@droidmonkey droidmonkey merged commit f381e29 into keepassxreboot:develop Jan 29, 2023
dmaslenko pushed a commit to dmaslenko/keepassxc that referenced this pull request Jan 30, 2023
pull bot pushed a commit to tigerwill90/keepassxc that referenced this pull request Jan 30, 2023
pull bot pushed a commit to contropist/keepassxc that referenced this pull request Jan 30, 2023
Perlover added a commit to Perlover/keepassxc that referenced this pull request May 18, 2023
Release 2.7.5

- Add menu option to allow screenshots [keepassxreboot#8841]
- Add support for Botan 3 [keepassxreboot#9388]
- Increase max TOTP step to 24 hours [keepassxreboot#9149]
- Improve HTML export layout [keepassxreboot#8987]
- Turn search reset off by default [keepassxreboot#9153]
- Use QClipboard::clear() instead of setting blank text [keepassxreboot#9148]
- Hide group column header choice when not in search [keepassxreboot#9171]
- Improve look of KeePassXC logo and icons [keepassxreboot#9355]
- Add keyboard shortcuts for app and database settings [keepassxreboot#9007]
- Hide rename button from attachments preview panel [keepassxreboot#8842]
- Linux: Set SingleMainWindow in .desktop file [keepassxreboot#7430]

- Fix crash when search clears while creating new entry [keepassxreboot#9230]
- Fix crash when using Windows Hello in a Remote Desktop session [keepassxreboot#9006]
- Fix crash in Group Edit after enabling Browser Integration [keepassxreboot#8778]
- Fix canceling quick unlock when it is unavailable [keepassxreboot#9034]
- Set password input field font correctly [keepassxreboot#8732]
- Greatly improve performance when rendering entry view [keepassxreboot#9398]
- Fix various accessibility issues [keepassxreboot#9138]
- Fix arrows size when expand/collapse a group [keepassxreboot#9096]
- Select the clone instead of the original after cloning an entry [keepassxreboot#9070]
- Fix bugs with preview widget [keepassxreboot#9170]
- Fix status bar update when switching to other DB [keepassxreboot#9073]
- Fix database settings spin box bug [keepassxreboot#9101]
- Fix Ctrl+Tab shortcut to cycle databases in unlock dialog [keepassxreboot#8839]
- Fix TOTP QR code maintaining square ratio [keepassxreboot#9027]
- Fix Auto-Type configuration page on custom sequence selection [keepassxreboot#8752]
- Fix unexpected behavior of `--lock` when KeePassXC is not running [keepassxreboot#8889]
- Make open folder icon exempt from "Apply group icon to entry" [keepassxreboot#9205]
- Allow setting default file open directory with env var [keepassxreboot#9192]
- SSH Agent: Fix support for AES-256/GCM openssh keys [keepassxreboot#8968]
- Browser: Fix Native Messaging script path with BSD OS's [keepassxreboot#8835]
- MacOS: Fix text selection for Auto-Type clear field [keepassxreboot#9066]
- MacOS: Don't rely on AppleInterfaceStyle for theme switching [keepassxreboot#8615]
- Windows: Remove registry detection of desktop shortcut [keepassxreboot#9380]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants