Tie the Zed application ID to the release channel (#11335)

Since we do want to have different versions of Zed running on the same
Linux install, we need to give them different application IDs so they're
not grouped together as the same application.

This changes the app_id depending on the releaes channel and, crucially,
it also matches them up with the bundle identifiers that we use on
macOS.

Release Notes:

- N/A
This commit is contained in:
Thorsten Ball 2024-05-03 10:48:35 +02:00 committed by GitHub
parent 4024b9ac4d
commit 61a60d37a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 38 additions and 14 deletions

View file

@ -136,6 +136,18 @@ impl ReleaseChannel {
}
}
/// Returns the application ID that's used by Wayland as application ID
/// and WM_CLASS on X11.
/// This also has to match the bundle identifier for Zed on macOS.
pub fn app_id(&self) -> &'static str {
match self {
ReleaseChannel::Dev => "dev.zed.Zed-Dev",
ReleaseChannel::Nightly => "dev.zed.Zed-Nightly",
ReleaseChannel::Preview => "dev.zed.Zed-Preview",
ReleaseChannel::Stable => "dev.zed.Zed",
}
}
/// Returns the query parameter for this [`ReleaseChannel`].
pub fn release_query_param(&self) -> Option<&'static str> {
match self {