mirror of
https://github.com/storytold/craft-launcher.git
synced 2026-11-19 09:01:23 +01:00
macOS: Add optional Dock hiding when running in background is enabled. (#368)
* Add optional macOS Dock hiding * Restore Dock visibility when macOS unhides the app * Use Keep launcher in the Dock when tray mode is disabled * Document macOS close and Dock restoration behavior * Document launcher window and Dock lifecycle helpers * Decouple macOS tray and Dock visibility * Restore reopening for hidden macOS startup * Quit on macOS window close when tray mode is off * Added uk translation * Update macOS verification fixtures for new Installed fields
This commit is contained in:
1 parent
6eeee82889
commit
0a02df651f
19 files changed
+219
-15
No files matched your search
@@ -24,3 +24,9 @@ pub fn unhide() {
|
||||
NSApplication::sharedApplication(mtm).unhide(None);
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the app's hidden state on the main thread, or `None` elsewhere.
|
||||
pub fn is_hidden() -> Option<bool> {
|
||||
let mtm = MainThreadMarker::new()?;
|
||||
Some(NSApplication::sharedApplication(mtm).isHidden())
|
||||
}
|
||||
@@ -45,10 +45,6 @@ fn main() -> ExitCode {
|
||||
if let Some(done) = artcraft_launcher_native::self_update::finish(&std::env::args_os().skip(1).collect::<Vec<_>>()) {
|
||||
return if done.is_ok() { ExitCode::SUCCESS } else { ExitCode::FAILURE };
|
||||
}
|
||||
// Detect system language in the background so the first frame can use it.
|
||||
artcraft_launcher_ui_egui::i18n::detect_system_lang_in_background();
|
||||
// Detect Discord protocol handler in the background without blocking startup.
|
||||
artcraft_launcher_native::process::ensure_discord_detection_started();
|
||||
// `std::env::args` panics on an argument that is not UTF-8, and the launcher is started with
|
||||
// whatever the desktop hands it: a login entry, a file manager, a terminal in a Latin-1
|
||||
// locale. It only ever looks for the two flags below, so an argument it cannot read is one it
|
||||
@@ -80,6 +76,20 @@ fn main() -> ExitCode {
|
||||
};
|
||||
}
|
||||
let mut hidden = args.iter().any(|a| a == login::HIDDEN_FLAG);
|
||||
let settings_path = settings_file::path(APP_ID);
|
||||
#[cfg(target_os = "macos")]
|
||||
if hidden
|
||||
&& let Some(settings) = settings_path.as_deref().and_then(|path| settings_file::load::<Settings>(path, SETTINGS_KEY))
|
||||
&& settings.hide_from_dock_when_hidden
|
||||
&& settings.close_to_tray
|
||||
{
|
||||
// Set this before other startup work, or the Dock briefly shows the regular app during login.
|
||||
spaces::set_dock_visibility(false, true, true, true);
|
||||
}
|
||||
// Detect system language in the background so the first frame can use it.
|
||||
artcraft_launcher_ui_egui::i18n::detect_system_lang_in_background();
|
||||
// Detect Discord protocol handler in the background without blocking startup.
|
||||
artcraft_launcher_native::process::ensure_discord_detection_started();
|
||||
|
||||
let wake: Wake = Arc::new(OnceLock::new());
|
||||
let starts = match single_instance::claim(wake.clone()) {
|
||||
@@ -124,7 +134,6 @@ fn main() -> ExitCode {
|
||||
let _ = motion::reduced();
|
||||
|
||||
let backend_waker = waker.clone();
|
||||
let settings_path = settings_file::path(APP_ID);
|
||||
let mut launcher = Launcher::new(Box::new(NativeBackend::new(move || backend_waker.wake())), starts, settings_path.clone());
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
@@ -591,6 +600,7 @@ enum OnClose {
|
||||
Quit,
|
||||
}
|
||||
|
||||
/// Chooses how to handle a window close, keeping the launcher running only when tray mode is enabled.
|
||||
fn on_close(has_tray: bool, close_to_tray: bool, window_hides: bool) -> OnClose {
|
||||
if !(has_tray && close_to_tray) {
|
||||
OnClose::Quit
|
||||
@@ -818,6 +828,16 @@ impl Launcher {
|
||||
self.ui.attach(&cc.egui_ctx);
|
||||
}
|
||||
|
||||
/// Shows or hides the menu-bar icon on macOS, logging platform errors without stopping the app.
|
||||
#[cfg(target_os = "macos")]
|
||||
fn set_tray_visible(&self, visible: bool) {
|
||||
if let Some(tray) = &self.tray
|
||||
&& let Err(e) = tray.set_visible(visible)
|
||||
{
|
||||
log::warn!("couldn't change menu-bar icon visibility: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
/// Saves the settings with no window, where eframe would on a window's behalf.
|
||||
fn save_settings(&self) {
|
||||
let Some(path) = self.settings_path.as_deref() else { return };
|
||||
@@ -918,28 +938,59 @@ impl Launcher {
|
||||
struct Shell<'a> {
|
||||
launcher: &'a mut Launcher,
|
||||
window_hides: bool,
|
||||
/// Whether the launcher last showed its window or put it away. On macOS the Dock, Finder and
|
||||
/// ⌘Tab can bring the window back without the launcher knowing; that only matters for the
|
||||
/// tray's left-click toggle, which macOS never sends, as a left click opens the tray menu.
|
||||
/// Whether the shell considers its window shown or put away. On macOS, `logic` notices when
|
||||
/// the Dock, Finder, or ⌘Tab externally unhides the app and updates this state for tray toggles.
|
||||
visible: bool,
|
||||
quitting: bool,
|
||||
#[cfg(target_os = "macos")]
|
||||
/// Whether this process hid the app and should show its window after a system reopen.
|
||||
app_hidden_by_launcher: bool,
|
||||
#[cfg(target_os = "macos")]
|
||||
applied_tray_visibility: Option<bool>,
|
||||
/// The "show on the current desktop" setting last applied to the window (macOS).
|
||||
#[cfg_attr(not(target_os = "macos"), allow(dead_code))]
|
||||
applied_follow: Option<bool>,
|
||||
}
|
||||
|
||||
impl<'a> Shell<'a> {
|
||||
/// Creates the window shell and applies the startup visibility and Dock policy.
|
||||
fn new(cc: &eframe::CreationContext<'_>, launcher: &'a mut Launcher, hidden: bool) -> Self {
|
||||
let window_hides = window_can_hide(cc.display_handle().ok().map(|d| d.as_raw()));
|
||||
// Started hidden at login but there's no tray to come back from: show the window.
|
||||
let visible = !hidden || launcher.tray.is_none();
|
||||
let mut shell = Self { launcher, window_hides, visible: true, quitting: false, applied_follow: None };
|
||||
#[cfg(target_os = "macos")]
|
||||
spaces::set_dock_visibility(
|
||||
visible,
|
||||
launcher.ui.settings.hide_from_dock_when_hidden,
|
||||
launcher.tray.is_some(),
|
||||
launcher.ui.settings.close_to_tray,
|
||||
);
|
||||
#[cfg(target_os = "macos")]
|
||||
let hidden_start_needs_reopen = should_hide_app_for_hidden_start(hidden, launcher.ui.settings.close_to_tray);
|
||||
let mut shell = Self {
|
||||
launcher,
|
||||
window_hides,
|
||||
visible: true,
|
||||
quitting: false,
|
||||
#[cfg(target_os = "macos")]
|
||||
app_hidden_by_launcher: false,
|
||||
#[cfg(target_os = "macos")]
|
||||
applied_tray_visibility: None,
|
||||
applied_follow: None,
|
||||
};
|
||||
#[cfg(target_os = "macos")]
|
||||
shell.sync_tray_visibility();
|
||||
if !visible && window_hides {
|
||||
// Started in the tray: the window stays out of sight. On macOS this doesn't hide the
|
||||
// app as `put_away` does, since the app is still being activated as it starts, which
|
||||
// would unhide it, window and all.
|
||||
shell.visible = false;
|
||||
cc.egui_ctx.send_viewport_cmd(egui::ViewportCommand::Visible(false));
|
||||
#[cfg(target_os = "macos")]
|
||||
if hidden_start_needs_reopen {
|
||||
hiding::hide();
|
||||
shell.app_hidden_by_launcher = true;
|
||||
}
|
||||
} else if !visible {
|
||||
shell.put_away(&cc.egui_ctx);
|
||||
} else if hidden {
|
||||
@@ -948,12 +999,21 @@ impl<'a> Shell<'a> {
|
||||
shell
|
||||
}
|
||||
|
||||
/// Shows and focuses the window, restoring macOS app and Dock visibility when needed.
|
||||
fn show(&mut self, ctx: &egui::Context) {
|
||||
self.visible = true;
|
||||
// Before the window is ordered front, so it comes to this desktop rather than taking the
|
||||
// user to its own (macOS; the setting doesn't exist elsewhere).
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
self.sync_tray_visibility();
|
||||
self.app_hidden_by_launcher = false;
|
||||
spaces::set_dock_visibility(
|
||||
true,
|
||||
self.launcher.ui.settings.hide_from_dock_when_hidden,
|
||||
self.launcher.tray.is_some(),
|
||||
self.launcher.ui.settings.close_to_tray,
|
||||
);
|
||||
let on = self.launcher.ui.settings.show_on_current_desktop;
|
||||
spaces::follow_current_desktop(on);
|
||||
self.applied_follow = Some(on);
|
||||
@@ -970,13 +1030,32 @@ impl<'a> Shell<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Puts the window away in the tray: hidden where it can hide, closed where it can't. On macOS
|
||||
/// the whole app hides, so its Dock icon brings the window back (`hiding`).
|
||||
/// Keeps the macOS menu-bar icon in sync with the tray setting, independent of window visibility.
|
||||
#[cfg(target_os = "macos")]
|
||||
fn sync_tray_visibility(&mut self) {
|
||||
let visible = self.launcher.ui.settings.close_to_tray;
|
||||
if self.applied_tray_visibility != Some(visible) {
|
||||
self.launcher.set_tray_visible(visible);
|
||||
self.applied_tray_visibility = Some(visible);
|
||||
}
|
||||
}
|
||||
|
||||
/// Puts the window away without quitting where hiding is supported, or closes it to the tray
|
||||
/// otherwise. On macOS, the Dock or an enabled tray icon can bring the hidden app back.
|
||||
fn put_away(&mut self, ctx: &egui::Context) {
|
||||
if self.window_hides {
|
||||
self.visible = false;
|
||||
#[cfg(target_os = "macos")]
|
||||
hiding::hide();
|
||||
{
|
||||
spaces::set_dock_visibility(
|
||||
false,
|
||||
self.launcher.ui.settings.hide_from_dock_when_hidden,
|
||||
self.launcher.tray.is_some(),
|
||||
self.launcher.ui.settings.close_to_tray,
|
||||
);
|
||||
hiding::hide();
|
||||
self.app_hidden_by_launcher = true;
|
||||
}
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
ctx.send_viewport_cmd(egui::ViewportCommand::Visible(false));
|
||||
} else {
|
||||
@@ -993,9 +1072,16 @@ impl<'a> Shell<'a> {
|
||||
}
|
||||
|
||||
impl eframe::App for Shell<'_> {
|
||||
/// Processes launcher requests, close requests, and macOS system-unhide state each frame.
|
||||
fn logic(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
|
||||
let requests = self.launcher.tick(ctx);
|
||||
#[cfg(target_os = "macos")]
|
||||
self.sync_tray_visibility();
|
||||
#[cfg(target_os = "macos")]
|
||||
if should_restore_after_system_unhide(self.app_hidden_by_launcher, hiding::is_hidden()) {
|
||||
self.show(ctx);
|
||||
}
|
||||
#[cfg(target_os = "macos")]
|
||||
if self.applied_follow != Some(self.launcher.ui.settings.show_on_current_desktop) {
|
||||
let on = self.launcher.ui.settings.show_on_current_desktop;
|
||||
spaces::follow_current_desktop(on);
|
||||
@@ -1060,6 +1146,18 @@ impl eframe::App for Shell<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
/// Returns whether macOS has externally unhidden an app this launcher hid for startup or put-away.
|
||||
fn should_restore_after_system_unhide(app_hidden_by_launcher: bool, app_hidden: Option<bool>) -> bool {
|
||||
app_hidden_by_launcher && app_hidden == Some(false)
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
/// Returns whether a hidden startup without tray mode must hide the app for Dock/Finder reopening.
|
||||
fn should_hide_app_for_hidden_start(hidden: bool, close_to_tray: bool) -> bool {
|
||||
hidden && !close_to_tray
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::ptr::NonNull;
|
||||
@@ -1083,6 +1181,40 @@ mod tests {
|
||||
assert_eq!(claim_notification_identity(), first);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[test]
|
||||
fn dock_icon_hides_only_when_hidden_opted_in_and_tray_mode_is_enabled() {
|
||||
use objc2_app_kit::NSApplicationActivationPolicy;
|
||||
|
||||
assert_eq!(spaces::activation_policy(true, true, true, true), NSApplicationActivationPolicy::Regular);
|
||||
assert_eq!(spaces::activation_policy(false, false, true, true), NSApplicationActivationPolicy::Regular);
|
||||
assert_eq!(spaces::activation_policy(false, true, false, true), NSApplicationActivationPolicy::Regular);
|
||||
assert_eq!(spaces::activation_policy(false, true, true, false), NSApplicationActivationPolicy::Regular);
|
||||
assert_eq!(spaces::activation_policy(false, true, true, true), NSApplicationActivationPolicy::Accessory);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[test]
|
||||
fn system_unhide_restores_only_an_app_hidden_by_put_away() {
|
||||
assert!(!should_restore_after_system_unhide(false, Some(false)));
|
||||
assert!(!should_restore_after_system_unhide(true, Some(true)));
|
||||
assert!(!should_restore_after_system_unhide(true, None));
|
||||
assert!(should_restore_after_system_unhide(true, Some(false)));
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[test]
|
||||
fn only_hidden_start_without_tray_mode_hides_the_app_for_reopen() {
|
||||
assert!(should_hide_app_for_hidden_start(true, false));
|
||||
assert!(!should_hide_app_for_hidden_start(true, true));
|
||||
assert!(!should_hide_app_for_hidden_start(false, false));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hiding_from_the_dock_is_disabled_by_default() {
|
||||
assert!(!Settings::default().hide_from_dock_when_hidden);
|
||||
}
|
||||
|
||||
/// What the tests can see of a [`Quiet`] backend, and its clock.
|
||||
#[derive(Default)]
|
||||
struct Seen {
|
||||
@@ -1324,7 +1456,17 @@ mod tests {
|
||||
fn quitting_overrides_a_close_to_the_tray() {
|
||||
let (mut launcher, _show, _) = launcher();
|
||||
let ctx = launcher.windowless.clone();
|
||||
let mut shell = Shell { launcher: &mut launcher, window_hides: false, visible: true, quitting: false, applied_follow: None };
|
||||
let mut shell = Shell {
|
||||
launcher: &mut launcher,
|
||||
window_hides: false,
|
||||
visible: true,
|
||||
quitting: false,
|
||||
#[cfg(target_os = "macos")]
|
||||
app_hidden_by_launcher: false,
|
||||
#[cfg(target_os = "macos")]
|
||||
applied_tray_visibility: None,
|
||||
applied_follow: None,
|
||||
};
|
||||
shell.put_away(&ctx);
|
||||
assert!(shell.launcher.closed_to_tray);
|
||||
shell.quit(&ctx);
|
||||
@@ -1335,7 +1477,17 @@ mod tests {
|
||||
fn a_window_that_hides_is_not_closed_to_the_tray() {
|
||||
let (mut launcher, _show, _) = launcher();
|
||||
let ctx = launcher.windowless.clone();
|
||||
let mut shell = Shell { launcher: &mut launcher, window_hides: true, visible: true, quitting: false, applied_follow: None };
|
||||
let mut shell = Shell {
|
||||
launcher: &mut launcher,
|
||||
window_hides: true,
|
||||
visible: true,
|
||||
quitting: false,
|
||||
#[cfg(target_os = "macos")]
|
||||
app_hidden_by_launcher: false,
|
||||
#[cfg(target_os = "macos")]
|
||||
applied_tray_visibility: None,
|
||||
applied_follow: None,
|
||||
};
|
||||
shell.put_away(&ctx);
|
||||
assert!(!shell.visible);
|
||||
assert!(!shell.launcher.closed_to_tray);
|
||||
|
||||
@@ -6,7 +6,28 @@
|
||||
//! show a hidden window on the current desktop anyway, so this module only exists on macOS.
|
||||
|
||||
use objc2::MainThreadMarker;
|
||||
use objc2_app_kit::{NSApplication, NSWindowCollectionBehavior};
|
||||
use objc2_app_kit::{NSApplication, NSApplicationActivationPolicy, NSWindowCollectionBehavior};
|
||||
|
||||
/// Selects whether the launcher has a Dock icon for the current visibility and tray preferences.
|
||||
pub(super) fn activation_policy(
|
||||
window_visible: bool,
|
||||
hide_when_hidden: bool,
|
||||
tray_visible: bool,
|
||||
keep_in_tray: bool,
|
||||
) -> NSApplicationActivationPolicy {
|
||||
if !window_visible && hide_when_hidden && tray_visible && keep_in_tray {
|
||||
NSApplicationActivationPolicy::Accessory
|
||||
} else {
|
||||
NSApplicationActivationPolicy::Regular
|
||||
}
|
||||
}
|
||||
|
||||
/// Applies the Dock visibility preference. Must run on the main thread.
|
||||
pub fn set_dock_visibility(window_visible: bool, hide_when_hidden: bool, tray_visible: bool, keep_in_tray: bool) {
|
||||
let Some(mtm) = MainThreadMarker::new() else { return };
|
||||
let app = NSApplication::sharedApplication(mtm);
|
||||
app.setActivationPolicy(activation_policy(window_visible, hide_when_hidden, tray_visible, keep_in_tray));
|
||||
}
|
||||
|
||||
/// Makes the launcher's windows follow the current desktop when shown (`true`), or stay on their
|
||||
/// own desktop and switch to it (`false`, macOS's default). Must run on the main thread, as the
|
||||
|
||||
@@ -121,6 +121,12 @@ impl Tray {
|
||||
self.rx.try_iter().collect()
|
||||
}
|
||||
|
||||
/// Shows or hides the menu-bar icon to match the macOS window lifecycle.
|
||||
#[cfg(target_os = "macos")]
|
||||
pub fn set_visible(&self, visible: bool) -> Result<(), String> {
|
||||
self.icon.set_visible(visible).map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
pub fn set_updates(&mut self, count: usize) {
|
||||
let lang = i18n::current();
|
||||
if self.language != lang.code() {
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
Updates always use the format an app was installed with. Aktualizace vždy použijí formát, ve kterém byla aplikace nainstalována.
|
||||
Running in the background Běh na pozadí
|
||||
Keep running in the tray when the window is closed Po zavření okna ponechat spuštěné v oznamovací oblasti
|
||||
Hide ArtCraft Launcher from the Dock while in the background Skrýt ArtCraft Launcher v Docku při běhu na pozadí
|
||||
ArtCraft Launcher is still running ArtCraft Launcher stále běží
|
||||
It's in the tray: open it or quit it from the tray icon, or turn this off in the settings. Je v oznamovací oblasti: otevřete ho nebo ukončete přes ikonu v ní, nebo to vypněte v nastavení.
|
||||
Show the window on the current desktop Zobrazit okno na aktuální ploše
|
||||
|
||||
|
@@ -110,6 +110,7 @@
|
||||
Updates always use the format an app was installed with. Updates verwenden immer das Format, mit dem eine App installiert wurde.
|
||||
Running in the background Im Hintergrund ausführen
|
||||
Keep running in the tray when the window is closed Beim Schließen des Fensters im Infobereich weiterlaufen
|
||||
Hide ArtCraft Launcher from the Dock while in the background ArtCraft Launcher im Hintergrund aus dem Dock ausblenden
|
||||
ArtCraft Launcher is still running ArtCraft Launcher läuft weiter
|
||||
It's in the tray: open it or quit it from the tray icon, or turn this off in the settings. Er ist im Infobereich: dort über das Symbol öffnen oder beenden, oder das in den Einstellungen abschalten.
|
||||
Show the window on the current desktop Fenster auf dem aktuellen Schreibtisch zeigen
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 11 and column 16.
|
@@ -110,6 +110,7 @@
|
||||
Updates always use the format an app was installed with. Las actualizaciones siempre usan el formato con el que se instaló cada aplicación.
|
||||
Running in the background En segundo plano
|
||||
Keep running in the tray when the window is closed Seguir abierto en la bandeja del sistema al cerrar la ventana
|
||||
Hide ArtCraft Launcher from the Dock while in the background Ocultar ArtCraft Launcher del Dock en segundo plano
|
||||
ArtCraft Launcher is still running ArtCraft Launcher sigue abierto
|
||||
It's in the tray: open it or quit it from the tray icon, or turn this off in the settings. Está en la bandeja del sistema: ábrelo o ciérralo desde su icono, o desactiva esto en los ajustes.
|
||||
Show the window on the current desktop Mostrar la ventana en el escritorio actual
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 5 and column 48.
|
@@ -108,6 +108,7 @@
|
||||
Updates always use the format an app was installed with. Les mises à jour utilisent toujours le format avec lequel l'application a été installée.
|
||||
Running in the background Exécution en arrière-plan
|
||||
Keep running in the tray when the window is closed Rester actif dans la zone de notification à la fermeture de la fenêtre
|
||||
Hide ArtCraft Launcher from the Dock while in the background Masquer ArtCraft Launcher du Dock en arrière-plan
|
||||
ArtCraft Launcher is still running ArtCraft Launcher est toujours en cours
|
||||
It's in the tray: open it or quit it from the tray icon, or turn this off in the settings. Il est dans la zone de notification : ouvrez-le ou quittez-le depuis son icône, ou désactivez ceci dans les réglages.
|
||||
Show the window on the current desktop Afficher la fenêtre sur le bureau actuel
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 5 and column 50.
|
@@ -110,6 +110,7 @@
|
||||
Updates always use the format an app was installed with. A frissítések mindig az eredeti telepítés csomagformátumát használják.
|
||||
Running in the background Futtatás a háttérben
|
||||
Keep running in the tray when the window is closed Az ablak bezárásakor kerüljön a tálcára
|
||||
Hide ArtCraft Launcher from the Dock while in the background ArtCraft Launcher elrejtése a Dockból a háttérben
|
||||
ArtCraft Launcher is still running Az ArtCraft Launcher továbbra is fut
|
||||
It's in the tray: open it or quit it from the tray icon, or turn this off in the settings. A tálcára került: az ikonjáról megnyitható vagy bezárható, vagy kapcsolja ki ezt a beállításokban.
|
||||
Show the window on the current desktop Ablak megjelenítése az aktuális asztalon
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 11 and column 16.
|
@@ -112,6 +112,7 @@
|
||||
Updates always use the format an app was installed with. 更新は常に、アプリをインストールしたときの形式で行われます。
|
||||
Running in the background バックグラウンドで実行
|
||||
Keep running in the tray when the window is closed ウィンドウを閉じてもトレイで実行し続ける
|
||||
Hide ArtCraft Launcher from the Dock while in the background バックグラウンド実行中はArtCraft LauncherをDockに表示しない
|
||||
ArtCraft Launcher is still running ArtCraft Launcher は実行中です
|
||||
It's in the tray: open it or quit it from the tray icon, or turn this off in the settings. トレイに入りました。トレイのアイコンから開くか終了できます。設定でこの動作を無効にすることもできます。
|
||||
Show the window on the current desktop 現在のデスクトップにウィンドウを表示
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 14 and column 44.
|
@@ -106,6 +106,7 @@
|
||||
Updates always use the format an app was installed with. განახლება ყოველთვის იმ ფორმატს იყენებს, რომლითაც აპლიკაცია დაინსტალირდა.
|
||||
Running in the background ფონურ რეჟიმში მუშაობა
|
||||
Keep running in the tray when the window is closed ფანჯრის დახურვის შემდეგ მუშაობის გაგრძელება შეტყობინებების არეში
|
||||
Hide ArtCraft Launcher from the Dock while in the background ფონურ რეჟიმში ArtCraft Launcher-ის Dock-იდან დამალვა
|
||||
ArtCraft Launcher is still running ArtCraft Launcher კვლავ მუშაობს
|
||||
It's in the tray: open it or quit it from the tray icon, or turn this off in the settings. ის შეტყობინებების არეშია: გახსენით ან დახურეთ მისი ხატულით, ან გამორთეთ ეს ფუნქცია პარამეტრებში.
|
||||
Show the window on the current desktop ფანჯრის ჩვენება მიმდინარე სამუშაო მაგიდაზე
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 13 and column 18.
|
@@ -111,6 +111,7 @@
|
||||
Updates always use the format an app was installed with. Aktualizacje zawsze używają formatu, w jakim pierwotnie zainstalowano aplikację.
|
||||
Running in the background Działanie w tle
|
||||
Keep running in the tray when the window is closed Po zamknięciu okna działaj w zasobniku systemowym
|
||||
Hide ArtCraft Launcher from the Dock while in the background Ukrywaj ArtCraft Launcher w Docku podczas działania w tle
|
||||
ArtCraft Launcher is still running ArtCraft Launcher nadal działa
|
||||
It's in the tray: open it or quit it from the tray icon, or turn this off in the settings. Jest w zasobniku systemowym: otwórz go lub zamknij z jego ikony, albo wyłącz to w ustawieniach.
|
||||
Show the window on the current desktop Pokaż okno na bieżącym pulpicie
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 11 and column 15.
|
@@ -98,6 +98,7 @@
|
||||
Updates always use the format an app was installed with. As atualizações sempre usam o formato com o qual o aplicativo foi instalado.
|
||||
Running in the background Execução em segundo plano
|
||||
Keep running in the tray when the window is closed Continuar na bandeja do sistema ao fechar a janela
|
||||
Hide ArtCraft Launcher from the Dock while in the background Ocultar o ArtCraft Launcher do Dock em segundo plano
|
||||
ArtCraft Launcher is still running O ArtCraft Launcher continua aberto
|
||||
It's in the tray: open it or quit it from the tray icon, or turn this off in the settings. Ele está na bandeja do sistema: abra-o ou encerre-o pelo ícone, ou desative isso nas configurações.
|
||||
Show the window on the current desktop Mostrar a janela na área de trabalho atual
|
||||
|
||||
|
@@ -108,6 +108,7 @@
|
||||
Updates always use the format an app was installed with. Обновления всегда используют формат, с которым приложение было установлено.
|
||||
Running in the background Работа в фоне
|
||||
Keep running in the tray when the window is closed Оставаться в трее при закрытии окна
|
||||
Hide ArtCraft Launcher from the Dock while in the background Скрывать ArtCraft Launcher из Dock при работе в фоне
|
||||
ArtCraft Launcher is still running ArtCraft Launcher продолжает работать
|
||||
It's in the tray: open it or quit it from the tray icon, or turn this off in the settings. Он в трее: откройте или закройте его через значок в трее, либо отключите это в настройках.
|
||||
Show the window on the current desktop Показывать окно на текущем рабочем столе
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 13 and column 44.
|
@@ -109,6 +109,7 @@
|
||||
Updates always use the format an app was installed with. Оновлення завжди використовують формат, у якому застосунок було встановлено.
|
||||
Running in the background Робота у фоновому режимі
|
||||
Keep running in the tray when the window is closed Продовжувати роботу в треї після закриття вікна
|
||||
Hide ArtCraft Launcher from the Dock while in the background Приховувати ArtCraft Launcher з Dock під час роботи у фоновому режимі
|
||||
ArtCraft Launcher is still running ArtCraft Launcher усе ще працює
|
||||
It's in the tray: open it or quit it from the tray icon, or turn this off in the settings. Він у треї: відкрийте або закрийте його через значок у треї або вимкніть це в налаштуваннях.
|
||||
Show the window on the current desktop Показувати вікно на поточному робочому столі
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 13 and column 44.
|
@@ -92,6 +92,7 @@
|
||||
Updates always use the format an app was installed with. 更新时始终使用应用原来的安装格式。
|
||||
Running in the background 后台运行
|
||||
Keep running in the tray when the window is closed 关闭窗口后继续在系统托盘中运行
|
||||
Hide ArtCraft Launcher from the Dock while in the background 在后台运行时从 Dock 中隐藏 ArtCraft Launcher
|
||||
ArtCraft Launcher is still running ArtCraft Launcher 仍在运行
|
||||
It's in the tray: open it or quit it from the tray icon, or turn this off in the settings. 它已进入系统托盘:可通过托盘图标打开或退出,也可在设置中关闭此行为。
|
||||
Show the window on the current desktop 在当前桌面显示窗口
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 4 and column 3.
|
@@ -86,6 +86,7 @@
|
||||
Updates always use the format an app was installed with. 更新一律沿用應用程式安裝時的格式。
|
||||
Running in the background 在背景執行
|
||||
Keep running in the tray when the window is closed 關閉視窗後仍在系統匣中執行
|
||||
Hide ArtCraft Launcher from the Dock while in the background 在背景執行時從 Dock 隱藏 ArtCraft Launcher
|
||||
ArtCraft Launcher is still running ArtCraft Launcher 仍在執行
|
||||
It's in the tray: open it or quit it from the tray icon, or turn this off in the settings. 它位於系統匣中:請從系統匣圖示開啟或結束,或在設定中關閉此功能。
|
||||
Show the window on the current desktop 在目前的桌面顯示視窗
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 4 and column 3.
|
@@ -101,6 +101,8 @@ pub struct Settings {
|
||||
/// macOS: showing the window brings it to the current desktop (Space) instead of switching to
|
||||
/// the desktop it was on.
|
||||
pub show_on_current_desktop: bool,
|
||||
/// macOS: hide the Dock icon while the launcher is running without a visible window.
|
||||
pub hide_from_dock_when_hidden: bool,
|
||||
pub check_every: CheckEvery,
|
||||
/// Automatically download and install updates when found.
|
||||
#[serde(default)]
|
||||
@@ -265,6 +267,7 @@ impl Default for Settings {
|
||||
language: "auto".to_string(),
|
||||
close_to_tray: true,
|
||||
show_on_current_desktop: true,
|
||||
hide_from_dock_when_hidden: false,
|
||||
check_every: CheckEvery::Hour,
|
||||
auto_update: false,
|
||||
batch_updates: false,
|
||||
|
||||
@@ -343,6 +343,9 @@ impl LauncherUi {
|
||||
ui.checkbox(&mut self.settings.show_on_current_desktop, tl!("Show the window on the current desktop")).on_hover_text(tl!(
|
||||
"When on, opening the launcher from the menu bar brings its window to the desktop you're on. When off, macOS switches you to the desktop the window was on."
|
||||
));
|
||||
ui.add_enabled_ui(host.has_tray() && self.settings.close_to_tray, |ui| {
|
||||
ui.checkbox(&mut self.settings.hide_from_dock_when_hidden, tl!("Hide ArtCraft Launcher from the Dock while in the background"));
|
||||
});
|
||||
}
|
||||
if let Some(mut on) = host.login_item()
|
||||
&& ui.checkbox(&mut on, tl!("Start ArtCraft Launcher when I log in")).changed()
|
||||
|
||||
Reference in new issue
Block a user