From 4fea9431cdd111793ee202729b18ecc67b7d2ac4 Mon Sep 17 00:00:00 2001 From: Louis Pontoise Date: Mon, 7 Sep 2020 22:58:36 +0900 Subject: [PATCH] feat: show minimized/hidden windows last in the list (closes #289) --- resources/l10n/Localizable.strings | 29 ++- resources/l10n/ar.lproj/Localizable.strings | 33 +++ resources/l10n/de.lproj/Localizable.strings | 33 +++ resources/l10n/en.lproj/Localizable.strings | 33 +++ resources/l10n/es.lproj/Localizable.strings | 33 +++ resources/l10n/fi.lproj/Localizable.strings | 33 +++ resources/l10n/fr.lproj/Localizable.strings | 33 +++ resources/l10n/hu.lproj/Localizable.strings | 33 +++ resources/l10n/id.lproj/Localizable.strings | 33 +++ resources/l10n/it.lproj/Localizable.strings | 33 +++ resources/l10n/ja.lproj/Localizable.strings | 33 +++ resources/l10n/ko.lproj/Localizable.strings | 33 +++ resources/l10n/lb.lproj/Localizable.strings | 33 +++ resources/l10n/nl.lproj/Localizable.strings | 33 +++ resources/l10n/no.lproj/Localizable.strings | 33 +++ resources/l10n/pl.lproj/Localizable.strings | 33 +++ .../l10n/pt-BR.lproj/Localizable.strings | 33 +++ resources/l10n/pt.lproj/Localizable.strings | 33 +++ resources/l10n/ru.lproj/Localizable.strings | 33 +++ resources/l10n/tr.lproj/Localizable.strings | 33 +++ .../l10n/zh-CN.lproj/Localizable.strings | 33 +++ .../l10n/zh-TW.lproj/Localizable.strings | 33 +++ src/api-wrappers/HelperExtensions.swift | 20 -- src/logic/Application.swift | 16 +- src/logic/Applications.swift | 4 +- src/logic/Preferences.swift | 201 +++++++++++------- src/logic/Window.swift | 7 + src/logic/Windows.swift | 82 ++++++- src/logic/events/AccessibilityEvents.swift | 92 ++++---- src/logic/events/KeyboardEvents.swift | 2 +- src/ui/App.swift | 2 + .../tabs/AppearanceTab.swift | 1 - .../preferences-window/tabs/ControlsTab.swift | 20 +- 33 files changed, 988 insertions(+), 181 deletions(-) diff --git a/resources/l10n/Localizable.strings b/resources/l10n/Localizable.strings index e26715b34..0429728fa 100644 --- a/resources/l10n/Localizable.strings +++ b/resources/l10n/Localizable.strings @@ -122,13 +122,16 @@ "Focus selected window" = "Focus selected window"; /* No comment provided by engineer. */ -"Fullscreen" = "Fullscreen"; +"Fullscreen windows:" = "Fullscreen windows:"; /* No comment provided by engineer. */ "General" = "General"; /* No comment provided by engineer. */ -"Hidden" = "Hidden"; +"Hidden windows:" = "Hidden windows:"; + +/* No comment provided by engineer. */ +"Hide" = "Hide"; /* No comment provided by engineer. */ "Hide app badges:" = "Hide app badges:"; @@ -167,10 +170,10 @@ "Left" = "Left"; /* No comment provided by engineer. */ -"Max size on screen:" = "Max size on screen:"; +"Max height on screen:" = "Max height on screen:"; /* No comment provided by engineer. */ -"Max windows per row:" = "Max windows per row:"; +"Max width on screen:" = "Max width on screen:"; /* No comment provided by engineer. */ "Menubar icon:" = "Menubar icon:"; @@ -178,14 +181,11 @@ /* No comment provided by engineer. */ "Middle" = "Middle"; -/* No comment provided by engineer. */ -"Min windows per row:" = "Min windows per row:"; - /* No comment provided by engineer. */ "Minimize/Deminimize window" = "Minimize/Deminimize window"; /* No comment provided by engineer. */ -"Minimized" = "Minimized"; +"Minimized windows:" = "Minimized windows:"; /* No comment provided by engineer. */ "Mouse hover" = "Mouse hover"; @@ -227,7 +227,7 @@ "Remember my choice" = "Remember my choice"; /* No comment provided by engineer. */ -"Rows of windows:" = "Rows of windows:"; +"Rows of thumbnails:" = "Rows of thumbnails:"; /* No comment provided by engineer. */ "Screen including menu bar" = "Screen including menu bar"; @@ -277,6 +277,9 @@ /* Menubar option */ "Show" = "Show"; +/* No comment provided by engineer. */ +"Show at the end" = "Show at the end"; + /* No comment provided by engineer. */ "Show on:" = "Show on:"; @@ -284,7 +287,7 @@ "Show standard tabs as windows:" = "Show standard tabs as windows:"; /* No comment provided by engineer. */ -"Show the following windows:" = "Show the following windows:"; +"Show windows from:" = "Show windows from:"; /* No comment provided by engineer. */ "Source code repository" = "Source code repository"; @@ -322,6 +325,12 @@ /* No comment provided by engineer. */ "Window app icon size:" = "Window app icon size:"; +/* No comment provided by engineer. */ +"Window max width in row:" = "Window max width in row:"; + +/* No comment provided by engineer. */ +"Window min width in row:" = "Window min width in row:"; + /* No comment provided by engineer. */ "Window title font size:" = "Window title font size:"; diff --git a/resources/l10n/ar.lproj/Localizable.strings b/resources/l10n/ar.lproj/Localizable.strings index e1bcb4754..54fd1ee4e 100644 --- a/resources/l10n/ar.lproj/Localizable.strings +++ b/resources/l10n/ar.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Fullscreen"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "عام"; /*No comment provided by engineer.*/ "Hidden" = "مخفي"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Hide app badges:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "يسار"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "أكبر حجم على الشاشة:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "الحد الأعلى للنوافذ للصف:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "مصغّر"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "تمرير المؤشر"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Remember my choice"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "صفوف النوافذ:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "إظهار"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "أظهر على:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "حدد النوافذ التالية:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "مخزن شفرة المصدر"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "حجم أيقونة النافذة:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "حجم خط عنوان النافذة:"; diff --git a/resources/l10n/de.lproj/Localizable.strings b/resources/l10n/de.lproj/Localizable.strings index ee43382f5..3191e7bce 100644 --- a/resources/l10n/de.lproj/Localizable.strings +++ b/resources/l10n/de.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Vollbild"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Allgemein"; /*No comment provided by engineer.*/ "Hidden" = "Versteckt"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Hide app badges:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Links"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Maximale Größe auf dem Bildschirm:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Maximale Anzahl von Fenstern pro Reihe:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Minimiert"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Maus hover"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Auswahl merken"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Fenster Reihen:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Anzeigen"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Anzeigen auf:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Folgende Fenster anzeigen:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Code Repository"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Fenster Icon Größe:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Fenster Titel Größe:"; diff --git a/resources/l10n/en.lproj/Localizable.strings b/resources/l10n/en.lproj/Localizable.strings index 040b0cdb6..2f9378d36 100644 --- a/resources/l10n/en.lproj/Localizable.strings +++ b/resources/l10n/en.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Fullscreen"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "General"; /*No comment provided by engineer.*/ "Hidden" = "Hidden"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Hide app badges:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Left"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Max size on screen:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Max windows per row:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Minimized"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Mouse hover"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Remember my choice"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Rows of windows:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Show"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Show on:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Show the following windows:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Source code repository"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Window app icon size:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Window title font size:"; diff --git a/resources/l10n/es.lproj/Localizable.strings b/resources/l10n/es.lproj/Localizable.strings index 1aa7e74a9..7438ce7e1 100644 --- a/resources/l10n/es.lproj/Localizable.strings +++ b/resources/l10n/es.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Pantalla completa"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "General"; /*No comment provided by engineer.*/ "Hidden" = "Ocultas"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Ocultar emblemas de aplicación:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Izquierda"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Tamaño máximo en pantalla:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Ventanas máximas por fila:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Minimizadas"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Al pasar el ratón"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Recordar mi elección"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Filas de ventanas:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Mostrar"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Mostrar en:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Mostrar las siguiente ventanas:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Repositorio de código fuente"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Tamaño del icono de la ventana de aplicación:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Tamaño de fuente del título de la ventana:"; diff --git a/resources/l10n/fi.lproj/Localizable.strings b/resources/l10n/fi.lproj/Localizable.strings index 6b433126f..19a38a9b9 100644 --- a/resources/l10n/fi.lproj/Localizable.strings +++ b/resources/l10n/fi.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Koko näyttö"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Yleinen"; /*No comment provided by engineer.*/ "Hidden" = "Piilossa"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Piilota lätkät:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Vasen"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Enimmäiskoko ruudulla:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Enimmäismäärä ikkunoita rivillä:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Pienennetty"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Hiiren liike"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Muista valintani"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Ikkunarivejä:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Näytä"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Näytä:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Show the following windows:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Lähdekoodi"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Ohjelmaikonin koko:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Otsikkotekstin koko:"; diff --git a/resources/l10n/fr.lproj/Localizable.strings b/resources/l10n/fr.lproj/Localizable.strings index a29d660ed..16a1ffdde 100644 --- a/resources/l10n/fr.lproj/Localizable.strings +++ b/resources/l10n/fr.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Plein écran"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Général"; /*No comment provided by engineer.*/ "Hidden" = "Cachées"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Masquer les badges des Apps :"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "À gauche"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Taille max à l’écran :"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Max de fenêtres par ligne :"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Minimisées"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Survol de la souris"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Se souvenir de mon choix"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Rangées de fenêtres :"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Afficher"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Afficher sur :"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Afficher les fenêtres suivantes :"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Archive du code source"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Taille des icones des Apps :"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Taille du titres des fenêtres :"; diff --git a/resources/l10n/hu.lproj/Localizable.strings b/resources/l10n/hu.lproj/Localizable.strings index 44f9223ea..17db8d837 100644 --- a/resources/l10n/hu.lproj/Localizable.strings +++ b/resources/l10n/hu.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Teljes képernyő"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Általános"; /*No comment provided by engineer.*/ "Hidden" = "Rejtett"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Alkalmazás jelek eltüntetése:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Bal"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Legnagyobb méret a képernyőn:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Legtöbb ablak soronként:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Kicsinyít"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Egér főlé vitele"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Emlékezzen a választásomra"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Ablak sorok száma:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Mutat"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Megjelenítés:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Megjelenítendő ablakok kiválasztása:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Forrás kód tárhely"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Ablak alkalmazásikonméret:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Ablak címsor font méret:"; diff --git a/resources/l10n/id.lproj/Localizable.strings b/resources/l10n/id.lproj/Localizable.strings index 678ecafef..fe74afbab 100644 --- a/resources/l10n/id.lproj/Localizable.strings +++ b/resources/l10n/id.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Layar penuh"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Umum"; /*No comment provided by engineer.*/ "Hidden" = "Tersembunyi"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Sembunyikan lencana app:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Kiri"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Ukuran maks di layar:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Jendela maks per baris:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Diminimalkan"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Arahkan mouse"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Ingat pilihan saya"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Barisan jendela:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Tampilkan"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Tunjukkan:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Perlihatkan jendela berikut:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Repositori kode sumber"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Ukuran ikon aplikasi jendela:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Ukuran font judul jendela:"; diff --git a/resources/l10n/it.lproj/Localizable.strings b/resources/l10n/it.lproj/Localizable.strings index 01b387083..bcfeda6a1 100644 --- a/resources/l10n/it.lproj/Localizable.strings +++ b/resources/l10n/it.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Fullscreen"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Generale"; /*No comment provided by engineer.*/ "Hidden" = "Nascosto"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Hide app badges:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Sinistra"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Massima dimensione a schermo:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Massimo numero di finestre per riga:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "ridotti al minimo"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Passa il mouse"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Remember my choice"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "File di finestre:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Mostra"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Mostra su:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Mostra le seguenti finestre:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Archivio codice sorgente"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Dimensione dell’icona della finestra dell’applicazione:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Dimensione del carattere del titolo della finestra:"; diff --git a/resources/l10n/ja.lproj/Localizable.strings b/resources/l10n/ja.lproj/Localizable.strings index 9e555cd1d..03b1ed6f9 100644 --- a/resources/l10n/ja.lproj/Localizable.strings +++ b/resources/l10n/ja.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "フルスクリーン"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "一般設定"; /*No comment provided by engineer.*/ "Hidden" = "ウィンドウをしまう"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "アプリのバッジを隠す:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "左"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "スクリーン表示サイズ:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "一列に最大表示可能な個数:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "ウィンドウを非表示"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "マウスホバー"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "設定を記憶する"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "ウィンドウ列:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "アプリを表示"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "表示場所:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "ウィンドウを表示:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "ソースコードレポジトリ"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "ウィンドウに表示されるアイコンサイズ:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "ウィンドウに表示されるタイトルフォントサイズ:"; diff --git a/resources/l10n/ko.lproj/Localizable.strings b/resources/l10n/ko.lproj/Localizable.strings index a406e7146..e77940fa0 100644 --- a/resources/l10n/ko.lproj/Localizable.strings +++ b/resources/l10n/ko.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "전체화면"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "일반"; /*No comment provided by engineer.*/ "Hidden" = "숨겨진 화면"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "앱 뱃지 숨기기:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "왼쪽"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "화면 최대 크기:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "한 줄당 최대 윈도우 개수:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "최소화된 화면"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "마우스 올려놓기"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "내 선택 기억하기"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "윈도우 줄 개수:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "보기"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "보여질 곳:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "다음 윈도우들이 보여집니다:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "소스 코드"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "윈도우 앱 아이콘 크기:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "윈도우 제목 글꼴 크기:"; diff --git a/resources/l10n/lb.lproj/Localizable.strings b/resources/l10n/lb.lproj/Localizable.strings index 6808a45cf..5fbb0c713 100644 --- a/resources/l10n/lb.lproj/Localizable.strings +++ b/resources/l10n/lb.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Vollbild"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Allgemeng"; /*No comment provided by engineer.*/ "Hidden" = "Verstoppen"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Hide app badges:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Lénks"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Max size on screen:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Max windows per row:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Minimized"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Mouse hover"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Remember my choice"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Rows of windows:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Opbréngen"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Opbréngen op:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Show the following windows:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Source code repository"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Window app icon size:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Window title font size:"; diff --git a/resources/l10n/nl.lproj/Localizable.strings b/resources/l10n/nl.lproj/Localizable.strings index acd6c056f..adafa9833 100644 --- a/resources/l10n/nl.lproj/Localizable.strings +++ b/resources/l10n/nl.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Volledig scherm"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Algemeen"; /*No comment provided by engineer.*/ "Hidden" = "Verborgen"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Verberg app-badges:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Links"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Maximale grootte op beeldscherm:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Maximaal aantal vensters per rij:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Geminimaliseerd"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Muisbeweging"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Onthoud mijn keuze"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Aantal vensterrijen:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Toon"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Toon op:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Toon de volgende vensters:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Broncode-repository"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Icoongrootte vensterapplicatie:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Tekstgrootte venstertitel:"; diff --git a/resources/l10n/no.lproj/Localizable.strings b/resources/l10n/no.lproj/Localizable.strings index 6794fa5eb..7596b4233 100644 --- a/resources/l10n/no.lproj/Localizable.strings +++ b/resources/l10n/no.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Fullskjerm"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Generelt"; /*No comment provided by engineer.*/ "Hidden" = "Skjult"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Skjul app-badges:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Venstre"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Maks størrelse på skjerm:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Maks vinduer per rad:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Minimert"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Holde musa over"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Husk valget mitt"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Rader med vinduer:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Vis"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Vis på:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Vis følgende vindu:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Kildekodearkiv"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Størrelse på vinduappikon:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Skriftstørrelse på vindutittel:"; diff --git a/resources/l10n/pl.lproj/Localizable.strings b/resources/l10n/pl.lproj/Localizable.strings index e5fce3691..c067e1428 100644 --- a/resources/l10n/pl.lproj/Localizable.strings +++ b/resources/l10n/pl.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Pełny ekran"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Ogólne"; /*No comment provided by engineer.*/ "Hidden" = "Ukryte"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Hide app badges:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Lewo"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Maksymalna wielkość na ekranie:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Maksymalna ilość okien w rzędzie:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Zminimalizowane"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Najechanie myszką"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Pamiętaj mój wybór"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Rzędy okien:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Pokaż"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Pokaż na:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Show the following windows:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Repozytorium kodu źródłowego"; @@ -327,6 +354,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Rozmiar ikony aplikacji w oknie:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Rozmiar czcionki tytułu okna:"; diff --git a/resources/l10n/pt-BR.lproj/Localizable.strings b/resources/l10n/pt-BR.lproj/Localizable.strings index e8febab53..1d7ab3696 100644 --- a/resources/l10n/pt-BR.lproj/Localizable.strings +++ b/resources/l10n/pt-BR.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Em tela cheia"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Geral"; /*No comment provided by engineer.*/ "Hidden" = "Ocultas"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Ocultar emblemas de aplicativos:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "À Esquerda"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Tamanho máximo na tela:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Máximo de janelas por linha:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Minimizadas"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Mouse"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Lembrar minha escolha"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Linhas de janelas:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Exibir"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Exibir:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Exibir as seguintes janelas:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Repositório do Código Fonte"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Tamanho do ícone da aplicação:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Tamanho da fonte do título da aplicação:"; diff --git a/resources/l10n/pt.lproj/Localizable.strings b/resources/l10n/pt.lproj/Localizable.strings index 0e503cae4..a98b835d5 100644 --- a/resources/l10n/pt.lproj/Localizable.strings +++ b/resources/l10n/pt.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Ecrã Completo"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Geral"; /*No comment provided by engineer.*/ "Hidden" = "Escondido"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Esconder emblemas:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Esquerda"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Tamanho máximo no ecrã:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Máximo de janelas por linha:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Minimizado"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Ao passar o rato"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Lembrar a minha escolha"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Linhas de janelas:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Mostrar"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Mostrar em:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Mostrar as seguintes janelas:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Repositório do Código Fonte"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Tamanho do ícone da aplicação:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Tamanho da fonte do título da aplicação:"; diff --git a/resources/l10n/ru.lproj/Localizable.strings b/resources/l10n/ru.lproj/Localizable.strings index bb0668455..5bf25f626 100644 --- a/resources/l10n/ru.lproj/Localizable.strings +++ b/resources/l10n/ru.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Полноэкранные"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Основное"; /*No comment provided by engineer.*/ "Hidden" = "Скрытые"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Скрыть значки приложений:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Слева"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Макс. размер на экране:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Макс. количество окон в ряду:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Свернутые"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Наведение мышью"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Запомнить мой выбор"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Количество рядов окон:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Показать"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Показать на:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Показывать следующие окна:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Репозиторий исходного кода"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Размер иконки окна:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Размер заголовка:"; diff --git a/resources/l10n/tr.lproj/Localizable.strings b/resources/l10n/tr.lproj/Localizable.strings index c41e48437..dc1340d07 100644 --- a/resources/l10n/tr.lproj/Localizable.strings +++ b/resources/l10n/tr.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "Fullscreen"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "Genel"; /*No comment provided by engineer.*/ "Hidden" = "Gizli"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "Hide app badges:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "Sol"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "Ekrandaki maksimum boyut:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "Satır başına maksimum pencere sayısı:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "Gizlenmiş"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "Fare "; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "Remember my choice"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "Pencere satırları:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "Göster"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "Göstermek:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "Takipeden pencereleri göster:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "Kaynak kodu deposu"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "Pencere simge boyutu:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "Pencere başlığı yazı tipi boyutu:"; diff --git a/resources/l10n/zh-CN.lproj/Localizable.strings b/resources/l10n/zh-CN.lproj/Localizable.strings index 880a73fd1..9a1ede150 100644 --- a/resources/l10n/zh-CN.lproj/Localizable.strings +++ b/resources/l10n/zh-CN.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "全屏"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "通用"; /*No comment provided by engineer.*/ "Hidden" = "隐藏"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "隐藏应用通知标志:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "居左"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "最大屏幕占用尺寸:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "每行最多窗口数:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "最小化"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "鼠标悬停"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "记住我的选择"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "窗口行数:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "显示"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "显示在:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "显示以下窗口:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "源代码仓库"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "窗口图标大小:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "窗口标题字号:"; diff --git a/resources/l10n/zh-TW.lproj/Localizable.strings b/resources/l10n/zh-TW.lproj/Localizable.strings index 53655adbb..8a6c67574 100644 --- a/resources/l10n/zh-TW.lproj/Localizable.strings +++ b/resources/l10n/zh-TW.lproj/Localizable.strings @@ -125,12 +125,21 @@ /*No comment provided by engineer.*/ "Fullscreen" = "全螢幕"; +/*No comment provided by engineer.*/ +"Fullscreen windows:" = "Fullscreen windows:"; + /*No comment provided by engineer.*/ "General" = "一般"; /*No comment provided by engineer.*/ "Hidden" = "隱藏"; +/*No comment provided by engineer.*/ +"Hidden windows:" = "Hidden windows:"; + +/*No comment provided by engineer.*/ +"Hide" = "Hide"; + /*No comment provided by engineer.*/ "Hide app badges:" = "隱藏程式的通知標記:"; @@ -167,9 +176,15 @@ /*No comment provided by engineer.*/ "Left" = "靠左"; +/*No comment provided by engineer.*/ +"Max height on screen:" = "Max height on screen:"; + /*No comment provided by engineer.*/ "Max size on screen:" = "在螢幕上最大的大小:"; +/*No comment provided by engineer.*/ +"Max width on screen:" = "Max width on screen:"; + /*No comment provided by engineer.*/ "Max windows per row:" = "每列最多顯示的視窗數:"; @@ -188,6 +203,9 @@ /*No comment provided by engineer.*/ "Minimized" = "最小化"; +/*No comment provided by engineer.*/ +"Minimized windows:" = "Minimized windows:"; + /*No comment provided by engineer.*/ "Mouse hover" = "滑鼠懸停"; @@ -230,6 +248,9 @@ /*No comment provided by engineer.*/ "Remember my choice" = "記住我的選擇"; +/*No comment provided by engineer.*/ +"Rows of thumbnails:" = "Rows of thumbnails:"; + /*No comment provided by engineer.*/ "Rows of windows:" = "每列視窗數:"; @@ -281,6 +302,9 @@ /*No comment provided by engineer.*/ "Show" = "顯示"; +/*No comment provided by engineer.*/ +"Show at the end" = "Show at the end"; + /*No comment provided by engineer.*/ "Show on:" = "顯示在:"; @@ -290,6 +314,9 @@ /*No comment provided by engineer.*/ "Show the following windows:" = "顯示以下的視窗:"; +/*No comment provided by engineer.*/ +"Show windows from:" = "Show windows from:"; + /*No comment provided by engineer.*/ "Source code repository" = "原始碼儲存庫"; @@ -326,6 +353,12 @@ /*No comment provided by engineer.*/ "Window app icon size:" = "視窗圖示的大小:"; +/*No comment provided by engineer.*/ +"Window max width in row:" = "Window max width in row:"; + +/*No comment provided by engineer.*/ +"Window min width in row:" = "Window min width in row:"; + /*No comment provided by engineer.*/ "Window title font size:" = "視窗標題的字體大小:"; diff --git a/src/api-wrappers/HelperExtensions.swift b/src/api-wrappers/HelperExtensions.swift index 8c4f81b8c..cc683decf 100644 --- a/src/api-wrappers/HelperExtensions.swift +++ b/src/api-wrappers/HelperExtensions.swift @@ -8,26 +8,6 @@ extension Collection { } } -extension Array where Element == Window { - func firstIndexThatMatches(_ element: AXUIElement, _ wid: CGWindowID?) -> Self.Index? { - // the window can be deallocated by the OS, in which case its `CGWindowID` will be `-1` - // we check for equality both on the AXUIElement, and the CGWindowID, in order to catch all scenarios - return firstIndex { $0.axUiElement == element || ($0.cgWindowId != -1 && $0.cgWindowId == wid) } - } - - mutating func insertAndScaleRecycledPool(_ elements: [Element], at i: Int) { - insert(contentsOf: elements, at: i) - let neededRecycledViews = count - ThumbnailsView.recycledViews.count - if neededRecycledViews > 0 { - (1...neededRecycledViews).forEach { _ in ThumbnailsView.recycledViews.append(ThumbnailView()) } - } - } - - mutating func insertAndScaleRecycledPool(_ element: Element, at i: Int) { - insertAndScaleRecycledPool([element], at: i) - } -} - extension NSView { // constrain size to fittingSize func fit() { diff --git a/src/logic/Application.swift b/src/logic/Application.swift index 09a6f3726..3a69666ef 100644 --- a/src/logic/Application.swift +++ b/src/logic/Application.swift @@ -56,7 +56,7 @@ class Application: NSObject { } func removeWindowslessAppWindow() { - if let windowlessAppWindow = Windows.list.firstIndex { $0.isWindowlessApp == true && $0.application.pid == pid } { + if let windowlessAppWindow = (Windows.list.firstIndex { $0.isWindowlessApp == true && $0.application.pid == pid }) { Windows.list.remove(at: windowlessAppWindow) App.app.refreshOpenUi() } @@ -83,6 +83,7 @@ class Application: NSObject { let subrole = try $0.subrole() let role = try $0.role() let isOnNormalLevel = $0.isOnNormalLevel(wid) + debugPrint(self.runningApplication.bundleIdentifier, wid, isOnNormalLevel, title, subrole, role) if $0.isActualWindow(self.runningApplication, wid, isOnNormalLevel, title, subrole, role) { return ($0, wid, title, try $0.isFullscreen(), try $0.isMinimized(), try $0.position()) } @@ -110,12 +111,13 @@ class Application: NSObject { private func addWindows(_ axWindows: [(AXUIElement, CGWindowID, String?, Bool, Bool, CGPoint?)]) -> [Window] { let windows: [Window] = axWindows.compactMap { (axUiElement, wid, axTitle, isFullscreen, isMinimized, position) in - if Windows.list.firstIndexThatMatches(axUiElement, wid) == nil { - return Window(axUiElement, self, wid, axTitle, isFullscreen, isMinimized, position) + if (Windows.list.firstIndex { $0.isEqualRobust(axUiElement, wid) }) == nil { + let window = Window(axUiElement, self, wid, axTitle, isFullscreen, isMinimized, position) + Windows.appendAndUpdateFocus(window) + return window } return nil } - Windows.list.insertAndScaleRecycledPool(windows, at: 0) if App.app.appIsBeingUsed { Windows.cycleFocusedWindowIndex(windows.count) } @@ -127,9 +129,9 @@ class Application: NSObject { runningApplication.activationPolicy == .regular && !runningApplication.isTerminated && (Windows.list.firstIndex { $0.application.pid == pid }) == nil { - let window = [Window(self)] - Windows.list.insertAndScaleRecycledPool(window, at: Windows.list.count) - return window + let window = Window(self) + Windows.appendAndUpdateFocus(window) + return [window] } return nil } diff --git a/src/logic/Applications.swift b/src/logic/Applications.swift index 5569a40ec..8328db25f 100644 --- a/src/logic/Applications.swift +++ b/src/logic/Applications.swift @@ -50,13 +50,13 @@ class Applications { var windowsOnTheLeftOfFocusedWindow = 0 for runningApp in runningApps { // comparing pid here can fail here, as it can be already nil; we use isEqual here to avoid the issue - Applications.list.removeAll(where: { $0.runningApplication.isEqual(runningApp) }) + Applications.list.removeAll { $0.runningApplication.isEqual(runningApp) } Windows.list.enumerated().forEach { (index, window) in if window.application.runningApplication.isEqual(runningApp) && index < Windows.focusedWindowIndex { windowsOnTheLeftOfFocusedWindow += 1 } } - Windows.list.removeAll(where: { $0.application.runningApplication.isEqual(runningApp) }) + Windows.list.removeAll { $0.application.runningApplication.isEqual(runningApp) } } guard Windows.list.count > 0 else { App.app.hideUi(); return } if windowsOnTheLeftOfFocusedWindow > 0 { diff --git a/src/logic/Preferences.swift b/src/logic/Preferences.swift index acf1e5846..b1cdc2b66 100644 --- a/src/logic/Preferences.swift +++ b/src/logic/Preferences.swift @@ -24,40 +24,40 @@ class Preferences { "hideShowAppShortcut": "H", "arrowKeysEnabled": "true", "mouseHoverEnabled": "true", - "showFullscreenWindows": "true", - "showFullscreenWindows2": "true", - "showMinimizedWindows": "true", - "showMinimizedWindows2": "true", - "showHiddenWindows": "true", - "showHiddenWindows2": "true", + "showMinimizedWindows": ShowHowPreference.show.rawValue, + "showMinimizedWindows2": ShowHowPreference.show.rawValue, + "showHiddenWindows": ShowHowPreference.show.rawValue, + "showHiddenWindows2": ShowHowPreference.show.rawValue, + "showFullscreenWindows": ShowHowPreference.show.rawValue, + "showFullscreenWindows2": ShowHowPreference.show.rawValue, "showTabsAsWindows": "false", "hideColoredCircles": "false", "windowDisplayDelay": "0", - "theme": "0", - "showOnScreen": "0", - "titleTruncation": "0", - "alignThumbnails": "0", - "appsToShow": "0", - "appsToShow2": "1", - "spacesToShow": "0", - "spacesToShow2": "0", - "screensToShow": "0", - "screensToShow2": "0", + "theme": ThemePreference.macOs.rawValue, + "showOnScreen": ShowOnScreenPreference.active.rawValue, + "titleTruncation": TitleTruncationPreference.end.rawValue, + "alignThumbnails": AlignThumbnailsPreference.left.rawValue, + "appsToShow": AppsToShowPreference.all.rawValue, + "appsToShow2": AppsToShowPreference.active.rawValue, + "spacesToShow": SpacesToShowPreference.all.rawValue, + "spacesToShow2": SpacesToShowPreference.all.rawValue, + "screensToShow": ScreensToShowPreference.all.rawValue, + "screensToShow2": ScreensToShowPreference.all.rawValue, "fadeOutAnimation": "false", "hideSpaceNumberLabels": "false", "hideStatusIcons": "false", "startAtLogin": "true", - "menubarIcon": "0", + "menubarIcon": MenubarIconPreference.outlined.rawValue, "dontShowBlacklist": ["com.McAfee.McAfeeSafariHost"].joined(separator: "\n"), "disableShortcutsBlacklist": ["com.realvnc.vncviewer", "com.microsoft.rdc.macos", "com.teamviewer.TeamViewer", "org.virtualbox.app.VirtualBoxVM", "com.parallels.", "com.citrix.XenAppViewer"].joined(separator: "\n"), "disableShortcutsBlacklistOnlyFullscreen": "true", - "updatePolicy": "1", - "crashPolicy": "1", - "rowsCount": defaultsDependingOnScreenRatio_["rowsCount"]!, - "minCellsPerRow": defaultsDependingOnScreenRatio_["minCellsPerRow"]!, - "maxCellsPerRow": defaultsDependingOnScreenRatio_["maxCellsPerRow"]!, - "shortcutStyle": "0", - "shortcutStyle2": "0", + "updatePolicy": UpdatePolicyPreference.autoCheck.rawValue, + "crashPolicy": CrashPolicyPreference.ask.rawValue, + "rowsCount": rowCountDependingOnScreenRatio(), + "windowMinWidthInRow": "15", + "windowMaxWidthInRow": "30", + "shortcutStyle": ShortcutStylePreference.focusOnRelease.rawValue, + "shortcutStyle2": ShortcutStylePreference.focusOnRelease.rawValue, "hideAppBadges": "false", "hideWindowlessApps": "false", "hideThumbnails": "false", @@ -90,9 +90,6 @@ class Preferences { static var hideShowAppShortcut: String { defaults.string("hideShowAppShortcut") } static var arrowKeysEnabled: Bool { defaults.bool("arrowKeysEnabled") } static var mouseHoverEnabled: Bool { defaults.bool("mouseHoverEnabled") } - static var showFullscreenWindows: [Bool] { ["showFullscreenWindows", "showFullscreenWindows2"].map { defaults.bool($0) } } - static var showMinimizedWindows: [Bool] { ["showMinimizedWindows", "showMinimizedWindows2"].map { defaults.bool($0) } } - static var showHiddenWindows: [Bool] { ["showHiddenWindows", "showHiddenWindows2"].map { defaults.bool($0) } } static var showTabsAsWindows: Bool { defaults.bool("showTabsAsWindows") } static var hideColoredCircles: Bool { defaults.bool("hideColoredCircles") } static var windowDisplayDelay: DispatchTimeInterval { DispatchTimeInterval.milliseconds(defaults.int("windowDisplayDelay")) } @@ -117,6 +114,9 @@ class Preferences { static var appsToShow: [AppsToShowPreference] { ["appsToShow", "appsToShow2"].map { defaults.macroPref($0, AppsToShowPreference.allCases) } } static var spacesToShow: [SpacesToShowPreference] { ["spacesToShow", "spacesToShow2"].map { defaults.macroPref($0, SpacesToShowPreference.allCases) } } static var screensToShow: [ScreensToShowPreference] { ["screensToShow", "screensToShow2"].map { defaults.macroPref($0, ScreensToShowPreference.allCases) } } + static var showMinimizedWindows: [ShowHowPreference] { ["showMinimizedWindows", "showMinimizedWindows2"].map { defaults.macroPref($0, ShowHowPreference.allCases) } } + static var showHiddenWindows: [ShowHowPreference] { ["showHiddenWindows", "showHiddenWindows2"].map { defaults.macroPref($0, ShowHowPreference.allCases) } } + static var showFullscreenWindows: [ShowHowPreference] { ["showFullscreenWindows", "showFullscreenWindows2"].map { defaults.macroPref($0, ShowHowPreference.allCases) } } static var shortcutStyle: [ShortcutStylePreference] { ["shortcutStyle", "shortcutStyle2"].map { defaults.macroPref($0, ShortcutStylePreference.allCases) } } static var menubarIcon: MenubarIconPreference { defaults.macroPref("menubarIcon", MenubarIconPreference.allCases) } @@ -171,20 +171,14 @@ class Preferences { } private static func updateToNewPreferences(_ preferencesVersion: String) { - migrateDropdownMenuPreference("theme", [" macOS": "0", "❖ Windows 10": "1"]) - // "Main screen" was renamed to "Active screen" - migrateDropdownMenuPreference("showOnScreen", ["Main screen": "0", "Active screen": "0", "Screen including mouse": "1"]) - migrateDropdownMenuPreference("alignThumbnails", ["Left": "0", "Center": "1"]) - migrateDropdownMenuPreference("appsToShow", ["All apps": "0", "Active app": "1"]) - migrateDropdownMenuPreference("spacesToShow", ["All spaces": "0", "Active space": "1"]) - migrateDropdownMenuPreference("screensToShow", ["All screens": "0", "Screen showing AltTab": "1"]) + // dropdowns preferences used to store English text; now they store indexes + migrateDropdownsFromTextToIndexes() // the "Hide menubar icon" checkbox was replaced with a dropdown of: icon1, icon2, hidden - if let old = defaults.string(forKey: "hideMenubarIcon") { - if old == "true" { - defaults.set("3", forKey: "menubarIcon") - } - defaults.removeObject(forKey: "hideMenubarIcon") - } + migrateMenubarIconFromCheckboxToDropdown() + // "Show minimized/hidden/fullscreen windows" checkboxes were replaced with dropdowns + migrateShowWindowsCheckboxToDropdown() + // "Max size on screen" was split into max width and max height + migrateMaxSizeOnScreenToWidthAndHeight() defaults.set(App.version, forKey: preferencesVersion) } @@ -195,8 +189,39 @@ class Preferences { } } - // dropdowns preferences used to store English text; now they store indexes - static func migrateDropdownMenuPreference(_ preference: String, _ oldAndNew: [String: String]) { + private static func migrateShowWindowsCheckboxToDropdown() { + ["showMinimizedWindows", "showHiddenWindows", "showFullscreenWindows"] + .flatMap { [$0, $0 + "2"] } + .forEach { + if let old = defaults.string(forKey: $0) { + if old == "true" { + defaults.set(ShowHowPreference.show.rawValue, forKey: $0) + } else if old == "false" { + defaults.set(ShowHowPreference.hide.rawValue, forKey: $0) + } + } + } + } + + private static func migrateDropdownsFromTextToIndexes() { + migratePreferenceValue("theme", [" macOS": "0", "❖ Windows 10": "1"]) + // "Main screen" was renamed to "Active screen" + migratePreferenceValue("showOnScreen", ["Main screen": "0", "Active screen": "0", "Screen including mouse": "1"]) + migratePreferenceValue("alignThumbnails", ["Left": "0", "Center": "1"]) + migratePreferenceValue("appsToShow", ["All apps": "0", "Active app": "1"]) + migratePreferenceValue("spacesToShow", ["All spaces": "0", "Active space": "1"]) + migratePreferenceValue("screensToShow", ["All screens": "0", "Screen showing AltTab": "1"]) + } + + private static func migrateMenubarIconFromCheckboxToDropdown() { + if let old = defaults.string(forKey: "hideMenubarIcon") { + if old == "true" { + defaults.set("3", forKey: "menubarIcon") + } + } + } + + static func migratePreferenceValue(_ preference: String, _ oldAndNew: [String: String]) { if let old = defaults.string(forKey: preference), let new = oldAndNew[old] { defaults.set(new, forKey: preference) @@ -244,11 +269,11 @@ struct ThemeParameters { typealias LocalizedString = String -enum MenubarIconPreference: CaseIterable, MacroPreference { - case outlined - case filled - case colored - case hidden +enum MenubarIconPreference: String, CaseIterable, MacroPreference { + case outlined = "0" + case filled = "1" + case colored = "2" + case hidden = "3" var localizedString: LocalizedString { switch self { @@ -261,9 +286,9 @@ enum MenubarIconPreference: CaseIterable, MacroPreference { } } -enum ShortcutStylePreference: CaseIterable, MacroPreference { - case focusOnRelease - case doNothingOnRelease +enum ShortcutStylePreference: String, CaseIterable, MacroPreference { + case focusOnRelease = "0" + case doNothingOnRelease = "1" var localizedString: LocalizedString { switch self { @@ -273,9 +298,23 @@ enum ShortcutStylePreference: CaseIterable, MacroPreference { } } -enum AppsToShowPreference: CaseIterable, MacroPreference { - case all - case active +enum ShowHowPreference: String, CaseIterable, MacroPreference { + case show = "0" + case hide = "1" + case showAtTheEnd = "2" + + var localizedString: LocalizedString { + switch self { + case .show: return NSLocalizedString("Show", comment: "") + case .showAtTheEnd: return NSLocalizedString("Show at the end", comment: "") + case .hide: return NSLocalizedString("Hide", comment: "") + } + } +} + +enum AppsToShowPreference: String, CaseIterable, MacroPreference { + case all = "0" + case active = "1" var localizedString: LocalizedString { switch self { @@ -285,9 +324,9 @@ enum AppsToShowPreference: CaseIterable, MacroPreference { } } -enum SpacesToShowPreference: CaseIterable, MacroPreference { - case all - case active +enum SpacesToShowPreference: String, CaseIterable, MacroPreference { + case all = "0" + case active = "1" var localizedString: LocalizedString { switch self { @@ -297,9 +336,9 @@ enum SpacesToShowPreference: CaseIterable, MacroPreference { } } -enum ScreensToShowPreference: CaseIterable, MacroPreference { - case all - case showingAltTab +enum ScreensToShowPreference: String, CaseIterable, MacroPreference { + case all = "0" + case showingAltTab = "1" var localizedString: LocalizedString { switch self { @@ -309,10 +348,10 @@ enum ScreensToShowPreference: CaseIterable, MacroPreference { } } -enum ShowOnScreenPreference: CaseIterable, MacroPreference { - case active - case includingMouse - case includingMenubar +enum ShowOnScreenPreference: String, CaseIterable, MacroPreference { + case active = "0" + case includingMouse = "1" + case includingMenubar = "2" var localizedString: LocalizedString { switch self { @@ -323,10 +362,10 @@ enum ShowOnScreenPreference: CaseIterable, MacroPreference { } } -enum TitleTruncationPreference: CaseIterable, MacroPreference { - case end - case middle - case start +enum TitleTruncationPreference: String, CaseIterable, MacroPreference { + case end = "0" + case middle = "1" + case start = "2" var localizedString: LocalizedString { switch self { @@ -337,9 +376,9 @@ enum TitleTruncationPreference: CaseIterable, MacroPreference { } } -enum AlignThumbnailsPreference: CaseIterable, MacroPreference { - case left - case center +enum AlignThumbnailsPreference: String, CaseIterable, MacroPreference { + case left = "0" + case center = "1" var localizedString: LocalizedString { switch self { @@ -349,9 +388,9 @@ enum AlignThumbnailsPreference: CaseIterable, MacroPreference { } } -enum ThemePreference: CaseIterable, MacroPreference { - case macOs - case windows10 +enum ThemePreference: String, CaseIterable, MacroPreference { + case macOs = "0" + case windows10 = "1" var localizedString: LocalizedString { switch self { @@ -368,10 +407,10 @@ enum ThemePreference: CaseIterable, MacroPreference { } } -enum UpdatePolicyPreference: CaseIterable, MacroPreference { - case manual - case autoCheck - case autoInstall +enum UpdatePolicyPreference: String, CaseIterable, MacroPreference { + case manual = "0" + case autoCheck = "1" + case autoInstall = "2" var localizedString: LocalizedString { switch self { @@ -382,10 +421,10 @@ enum UpdatePolicyPreference: CaseIterable, MacroPreference { } } -enum CrashPolicyPreference: CaseIterable, MacroPreference { - case never - case ask - case always +enum CrashPolicyPreference: String, CaseIterable, MacroPreference { + case never = "0" + case ask = "1" + case always = "2" var localizedString: LocalizedString { switch self { diff --git a/src/logic/Window.swift b/src/logic/Window.swift index 03a2c3877..0bbd7ffeb 100644 --- a/src/logic/Window.swift +++ b/src/logic/Window.swift @@ -2,6 +2,7 @@ import Cocoa class Window { var cgWindowId = CGWindowID.max + var lastFocusOrder = Int.zero var title: String! var thumbnail: NSImage? var thumbnailFullSize: NSSize? @@ -61,6 +62,12 @@ class Window { debugPrint("Deinit window", title ?? "nil", application.runningApplication.bundleIdentifier ?? "nil") } + func isEqualRobust(_ otherWindowAxUiElement: AXUIElement, _ otherWindowWid: CGWindowID?) -> Bool { + // the window can be deallocated by the OS, in which case its `CGWindowID` will be `-1` + // we check for equality both on the AXUIElement, and the CGWindowID, in order to catch all scenarios + return otherWindowAxUiElement == axUiElement || (cgWindowId != -1 && otherWindowWid == cgWindowId) + } + private func observeEvents() { AXObserverCreate(application.pid, axObserverCallback, &axObserver) guard let axObserver = axObserver else { return } diff --git a/src/logic/Windows.swift b/src/logic/Windows.swift index 4196b1b7b..af1f125b1 100644 --- a/src/logic/Windows.swift +++ b/src/logic/Windows.swift @@ -1,18 +1,75 @@ import Cocoa class Windows { - // order in the array is important: most-recently-used elements are first static var list = [Window]() - static var previousFocusedWindowIndex = Int(0) static var focusedWindowIndex = Int(0) // the first few thumbnails are the most commonly looked at; we pay special attention to them static let criticalFirstThumbnails = 3 + // reordered list based on preferences, keeping the original index + static func reorderList() { + list.sort { + if let bool = sortByBooleanAttribute($0.isWindowlessApp, $1.isWindowlessApp) { + return bool + } + if Preferences.showHiddenWindows[App.app.shortcutIndex] == .showAtTheEnd, + let bool = sortByBooleanAttribute($0.isHidden, $1.isHidden) { + return bool + } + if Preferences.showMinimizedWindows[App.app.shortcutIndex] == .showAtTheEnd, + let bool = sortByBooleanAttribute($0.isMinimized, $1.isMinimized) { + return bool + } + return $0.lastFocusOrder < $1.lastFocusOrder + } + } + + static func appendAndUpdateFocus(_ window: Window) { + list.forEach { + $0.lastFocusOrder += 1 + } + list.append(window) + if list.count > ThumbnailsView.recycledViews.count { + ThumbnailsView.recycledViews.append(ThumbnailView()) + } + } + + static func removeAndUpdateFocus(_ window: Window) { + let removedWindowOldFocusOrder = window.lastFocusOrder + list.removeAll { + if $0.lastFocusOrder == removedWindowOldFocusOrder { + return true + } + if $0.lastFocusOrder > removedWindowOldFocusOrder { + $0.lastFocusOrder -= 1 + } + return false + } + } + + static func updateLastFocus(_ otherWindowAxUiElement: AXUIElement, _ otherWindowWid: CGWindowID) -> [Window]? { + if let focusedWindow = (list.first { $0.isEqualRobust(otherWindowAxUiElement, otherWindowWid) }) { + let focusedWindowOldFocusOrder = focusedWindow.lastFocusOrder + var windowsToRefresh = [focusedWindow] + list.forEach { + if $0.lastFocusOrder == focusedWindowOldFocusOrder { + $0.lastFocusOrder = 0 + } else if $0.lastFocusOrder < focusedWindowOldFocusOrder { + $0.lastFocusOrder += 1 + } + if $0.lastFocusOrder == 0 { + windowsToRefresh.append($0) + } + } + return windowsToRefresh + } + return nil + } + static func updateFocusedWindowIndex(_ newIndex: Int) { - previousFocusedWindowIndex = focusedWindowIndex + ThumbnailsView.recycledViews[focusedWindowIndex].highlight(false) focusedWindowIndex = newIndex let focusedView = ThumbnailsView.recycledViews[focusedWindowIndex] - ThumbnailsView.recycledViews[previousFocusedWindowIndex].highlight(false) focusedView.highlight(true) App.app.thumbnailsPanel.thumbnailsView.scrollView.contentView.scrollToVisible(focusedView.frame) } @@ -128,11 +185,11 @@ class Windows { window.shouldShowTheUser = !(window.application.runningApplication.bundleIdentifier.flatMap { id in Preferences.dontShowBlacklist.contains { id.hasPrefix($0) } } ?? false) && !(Preferences.appsToShow[App.app.shortcutIndex] == .active && window.application.runningApplication != NSWorkspace.shared.frontmostApplication) && - !(!Preferences.showHiddenWindows[App.app.shortcutIndex] && window.isHidden) && + !(!(Preferences.showHiddenWindows[App.app.shortcutIndex] != .hide) && window.isHidden) && ((!Preferences.hideWindowlessApps && window.isWindowlessApp) || !window.isWindowlessApp && - !(!Preferences.showFullscreenWindows[App.app.shortcutIndex] && window.isFullscreen) && - !(!Preferences.showMinimizedWindows[App.app.shortcutIndex] && window.isMinimized) && + !(!(Preferences.showFullscreenWindows[App.app.shortcutIndex] != .hide) && window.isFullscreen) && + !(!(Preferences.showMinimizedWindows[App.app.shortcutIndex] != .hide) && window.isMinimized) && !(Preferences.spacesToShow[App.app.shortcutIndex] == .active && window.spaceId != Spaces.currentSpaceId) && !(Preferences.screensToShow[App.app.shortcutIndex] == .showingAltTab && !isOnScreen(window, screen)) && (Preferences.showTabsAsWindows || !window.isTabbed)) @@ -162,3 +219,14 @@ class Windows { } } } + +func sortByBooleanAttribute(_ b1: Bool, _ b2: Bool) -> Bool? { + if b1 && !b2 { + return false + } + if !b1 && b2 { + return true + } + return nil +} + diff --git a/src/logic/events/AccessibilityEvents.swift b/src/logic/events/AccessibilityEvents.swift index ab8ac9afe..203f87e6b 100644 --- a/src/logic/events/AccessibilityEvents.swift +++ b/src/logic/events/AccessibilityEvents.swift @@ -52,20 +52,18 @@ func handleEvent(_ type: String, _ element: AXUIElement) throws { } private func focusedUiElementChanged(_ element: AXUIElement, _ pid: pid_t) throws { - if let app = NSRunningApplication(processIdentifier: pid) { - let currentWindows = try AXUIElementCreateApplication(pid).windows() + let currentWindows = try AXUIElementCreateApplication(pid).windows() + DispatchQueue.main.async { let windows = Windows.list.filter { w in if w.application.pid == pid && pid != ProcessInfo.processInfo.processIdentifier && w.spaceId == Spaces.currentSpaceId { let oldIsTabbed = w.isTabbed - w.isTabbed = (currentWindows?.first { $0 == w.axUiElement } == nil) ?? true + w.isTabbed = (currentWindows?.first { $0 == w.axUiElement } == nil) return oldIsTabbed != w.isTabbed } return false } - DispatchQueue.main.async { - App.app.refreshOpenUi(windows) - } + App.app.refreshOpenUi(windows) } } @@ -75,9 +73,9 @@ private func applicationActivated(_ element: AXUIElement) throws { DispatchQueue.main.async { // ensure alt-tab window remains key, so local shortcuts work if App.app.appIsBeingUsed { App.app.thumbnailsPanel.makeKeyAndOrderFront(nil) } - guard let existingIndex = Windows.list.firstIndexThatMatches(appFocusedWindow, wid) else { return } - Windows.list.insertAndScaleRecycledPool(Windows.list.remove(at: existingIndex), at: 0) - App.app.refreshOpenUi([Windows.list[0], Windows.list[existingIndex]]) + if let windows = Windows.updateLastFocus(appFocusedWindow, wid) { + App.app.refreshOpenUi(windows) + } Windows.checkIfShortcutsShouldBeDisabled() } } @@ -87,12 +85,12 @@ private func applicationHiddenOrShown(_ element: AXUIElement, _ pid: pid_t, _ ty DispatchQueue.main.async { if let app = (Applications.list.first { $0.pid == pid }) { app.isHidden = type == kAXApplicationHiddenNotification + let windows = Windows.list.filter { + // for AXUIElement of apps, CFEqual or == don't work; looks like a Cocoa bug + return $0.application.pid == pid + } + App.app.refreshOpenUi(windows) } - let windows = Windows.list.filter { - // for AXUIElement of apps, CFEqual or == don't work; looks like a Cocoa bug - return $0.application.pid == pid - } - App.app.refreshOpenUi(windows) } } @@ -106,13 +104,12 @@ private func windowCreated(_ element: AXUIElement, _ pid: pid_t) throws { let isOnNormalLevel = element.isOnNormalLevel(wid) let position = try element.position() DispatchQueue.main.async { - // a window being un-minimized can trigger kAXWindowCreatedNotification - if Windows.list.firstIndexThatMatches(element, wid) == nil, + if (Windows.list.firstIndex { $0.isEqualRobust(element, wid) }) == nil, let runningApp = NSRunningApplication(processIdentifier: pid), element.isActualWindow(runningApp, wid, isOnNormalLevel, axTitle, subrole, role), let app = (Applications.list.first { $0.pid == pid }) { let window = Window(element, app, wid, axTitle, isFullscreen, isMinimized, position) - Windows.list.insertAndScaleRecycledPool(window, at: 0) + Windows.appendAndUpdateFocus(window) Windows.cycleFocusedWindowIndex(1) App.app.refreshOpenUi([window]) } @@ -134,15 +131,13 @@ private func focusedWindowChanged(_ element: AXUIElement, _ pid: pid_t) throws { let isOnNormalLevel = element.isOnNormalLevel(wid) let position = try element.position() DispatchQueue.main.async { - if let existingIndex = Windows.list.firstIndexThatMatches(element, wid) { - if existingIndex != 0 { - Windows.list.insertAndScaleRecycledPool(Windows.list.remove(at: existingIndex), at: 0) - App.app.refreshOpenUi([Windows.list[0], Windows.list[existingIndex]]) - } + if let windows = Windows.updateLastFocus(element, wid) { + App.app.refreshOpenUi(windows) } else if element.isActualWindow(runningApp, wid, isOnNormalLevel, axTitle, subrole, role), let app = (Applications.list.first { $0.pid == pid }) { - Windows.list.insertAndScaleRecycledPool(Window(element, app, wid, axTitle, isFullscreen, isMinimized, position), at: 0) - App.app.refreshOpenUi([Windows.list[0]]) + let window = Window(element, app, wid, axTitle, isFullscreen, isMinimized, position) + Windows.appendAndUpdateFocus(window) + App.app.refreshOpenUi([window]) } Windows.checkIfShortcutsShouldBeDisabled() } @@ -152,23 +147,26 @@ private func focusedWindowChanged(_ element: AXUIElement, _ pid: pid_t) throws { private func windowDestroyed(_ element: AXUIElement) throws { let wid = try element.cgWindowId() DispatchQueue.main.async { - guard let existingIndex = Windows.list.firstIndexThatMatches(element, wid) else { return } - let window = Windows.list[existingIndex] - Windows.list.remove(at: existingIndex) - let window_ = window.application.addWindowslessAppsIfNeeded() - guard Windows.list.count > 0 else { App.app.hideUi(); return } - Windows.moveFocusedWindowIndexAfterWindowDestroyedInBackground(existingIndex) - App.app.refreshOpenUi(window_) + if let window = (Windows.list.first { $0.isEqualRobust(element, wid) }) { + Windows.removeAndUpdateFocus(window) + let windowlessApp = window.application.addWindowslessAppsIfNeeded() + if Windows.list.count > 0 { + Windows.moveFocusedWindowIndexAfterWindowDestroyedInBackground(window.lastFocusOrder) + App.app.refreshOpenUi(windowlessApp) + } else { + App.app.hideUi() + } + } } } private func windowMiniaturizedOrDeminiaturized(_ element: AXUIElement, _ type: String) throws { if let wid = try element.cgWindowId() { DispatchQueue.main.async { - guard let index = Windows.list.firstIndexThatMatches(element, wid) else { return } - let window = Windows.list[index] + if let window = (Windows.list.first { $0.isEqualRobust(element, wid) }) { window.isMinimized = type == kAXWindowMiniaturizedNotification - App.app.refreshOpenUi([window]) + App.app.refreshOpenUi([window]) + } } } } @@ -177,11 +175,11 @@ private func windowTitleChanged(_ element: AXUIElement) throws { if let wid = try element.cgWindowId() { let newTitle = try element.title() DispatchQueue.main.async { - guard let index = Windows.list.firstIndexThatMatches(element, wid) else { return } - let window = Windows.list[index] - guard newTitle != nil && newTitle != window.title else { return } - window.title = newTitle! - App.app.refreshOpenUi([window]) + if let window = (Windows.list.first { $0.isEqualRobust(element, wid) }), + newTitle != nil && newTitle != window.title { + window.title = newTitle! + App.app.refreshOpenUi([window]) + } } } } @@ -192,10 +190,10 @@ private func windowResized(_ element: AXUIElement) throws { if let wid = try element.cgWindowId() { let isFullscreen = try element.isFullscreen() DispatchQueue.main.async { - guard let index = Windows.list.firstIndexThatMatches(element, wid) else { return } - let window = Windows.list[index] - window.isFullscreen = isFullscreen - App.app.refreshOpenUi([window]) + if let window = (Windows.list.first { $0.isEqualRobust(element, wid) }) { + window.isFullscreen = isFullscreen + App.app.refreshOpenUi([window]) + } Windows.checkIfShortcutsShouldBeDisabled() } } @@ -205,10 +203,10 @@ private func windowMoved(_ element: AXUIElement) throws { if let wid = try element.cgWindowId() { let position = try element.position() DispatchQueue.main.async { - guard let index = Windows.list.firstIndexThatMatches(element, wid) else { return } - let window = Windows.list[index] - window.position = position - App.app.refreshOpenUi([window]) + if let window = (Windows.list.first { $0.isEqualRobust(element, wid) }) { + window.position = position + App.app.refreshOpenUi([window]) + } } } } diff --git a/src/logic/events/KeyboardEvents.swift b/src/logic/events/KeyboardEvents.swift index 63ab6d124..3d0732824 100644 --- a/src/logic/events/KeyboardEvents.swift +++ b/src/logic/events/KeyboardEvents.swift @@ -116,7 +116,7 @@ fileprivate func handleHotModifier(_ modifiers: UInt32) -> Bool { KeyboardEvents.holdShortcutWasDown[key] = false if ControlsTab.globalShortcuts["holdShortcut"]!.carbonModifierFlags == ControlsTab.globalShortcuts["holdShortcut"]!.carbonModifierFlags { let otherKey = key == "holdShortcut" ? "holdShortcut2" : "holdShortcut" - KeyboardEvents.holdShortcutWasDown[key] = false + KeyboardEvents.holdShortcutWasDown[otherKey] = false } if Preferences.shortcutStyle[App.app.shortcutIndex] == .focusOnRelease && handleHotAny(key, shortcutIndex) { return true diff --git a/src/ui/App.swift b/src/ui/App.swift index 9d6e6fbee..7d62aa3c4 100644 --- a/src/ui/App.swift +++ b/src/ui/App.swift @@ -196,6 +196,7 @@ class App: AppCenterApplication, NSApplicationDelegate { // workaround: when Preferences > Mission Control > "Displays have separate Spaces" is unchecked, // switching between displays doesn't trigger .activeSpaceDidChangeNotification; we get the latest manually Spaces.refreshCurrentSpaceId() + Windows.reorderList() refreshSpecificWindows(windowsToUpdate, currentScreen) guard appIsBeingUsed else { return } thumbnailsPanel.thumbnailsView.updateItemsAndLayout(currentScreen) @@ -238,6 +239,7 @@ class App: AppCenterApplication, NSApplicationDelegate { let screen = Screen.preferred() self.shortcutIndex = shortcutIndex Windows.refreshWhichWindowsToShowTheUser(screen) + Windows.reorderList() if (!Windows.list.contains { $0.shouldShowTheUser }) { hideUi(); return } Windows.updateFocusedWindowIndex(0) Windows.cycleFocusedWindowIndex(1) diff --git a/src/ui/preferences-window/tabs/AppearanceTab.swift b/src/ui/preferences-window/tabs/AppearanceTab.swift index 25d4f54e1..d59b68478 100644 --- a/src/ui/preferences-window/tabs/AppearanceTab.swift +++ b/src/ui/preferences-window/tabs/AppearanceTab.swift @@ -46,7 +46,6 @@ class AppearanceTab { let minSlider = minWidthInRow[1] as! NSSlider let maxSlider = maxWidthInRow[1] as! NSSlider maxSlider.minValue = minSlider.doubleValue - debugPrint(maxSlider.minValue, maxSlider.doubleValue) LabelAndControl.controlWasChanged(maxSlider, "windowMaxWidthInRow") } diff --git a/src/ui/preferences-window/tabs/ControlsTab.swift b/src/ui/preferences-window/tabs/ControlsTab.swift index 1d05edb5b..29d97e77d 100644 --- a/src/ui/preferences-window/tabs/ControlsTab.swift +++ b/src/ui/preferences-window/tabs/ControlsTab.swift @@ -68,27 +68,37 @@ class ControlsTab { } private static func toShowSection(_ postfix: String) -> ([NSView], GridView) { - let toShowExplanations = LabelAndControl.makeLabel(NSLocalizedString("Show the following windows:", comment: "")) + let toShowExplanations = LabelAndControl.makeLabel(NSLocalizedString("Show windows from:", comment: "")) + let toShowExplanations2 = LabelAndControl.makeLabel(NSLocalizedString("Minimized windows:", comment: "")) + let toShowExplanations3 = LabelAndControl.makeLabel(NSLocalizedString("Hidden windows:", comment: "")) + let toShowExplanations4 = LabelAndControl.makeLabel(NSLocalizedString("Fullscreen windows:", comment: "")) var holdShortcut = LabelAndControl.makeLabelWithRecorder(NSLocalizedString("Hold", comment: ""), "holdShortcut" + postfix, Preferences.holdShortcut[postfix == "" ? 0 : 1], false, labelPosition: .leftWithoutSeparator) holdShortcut.append(LabelAndControl.makeLabel(NSLocalizedString("and press:", comment: ""))) let holdAndPress = StackView(holdShortcut) let appsToShow = LabelAndControl.makeDropdown("appsToShow" + postfix, AppsToShowPreference.allCases) let spacesToShow = LabelAndControl.makeDropdown("spacesToShow" + postfix, SpacesToShowPreference.allCases) let screensToShow = LabelAndControl.makeDropdown("screensToShow" + postfix, ScreensToShowPreference.allCases) - let showMinimizedWindows = StackView(LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Minimized", comment: ""), "showMinimizedWindows" + postfix, labelPosition: .right)) - let showHiddenWindows = StackView(LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Hidden", comment: ""), "showHiddenWindows" + postfix, labelPosition: .right)) - let showFullscreenWindows = StackView(LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Fullscreen", comment: ""), "showFullscreenWindows" + postfix, labelPosition: .right)) + let showMinimizedWindows = LabelAndControl.makeDropdown("showMinimizedWindows" + postfix, ShowHowPreference.allCases) + let showHiddenWindows = LabelAndControl.makeDropdown("showHiddenWindows" + postfix, ShowHowPreference.allCases) + let showFullscreenWindows = LabelAndControl.makeDropdown("showFullscreenWindows" + postfix, ShowHowPreference.allCases.filter { $0 != .showAtTheEnd }) + let separator = NSBox() + separator.boxType = .separator let nextWindowShortcut = LabelAndControl.makeLabelWithRecorder(NSLocalizedString("Select next window", comment: ""), "nextWindowShortcut" + postfix, Preferences.nextWindowShortcut[postfix == "" ? 0 : 1], labelPosition: .right) let shortcutStyle = LabelAndControl.makeLabelWithDropdown(NSLocalizedString("Then release:", comment: ""), "shortcutStyle" + postfix, ShortcutStylePreference.allCases) - let toShowDropdowns = StackView([appsToShow, spacesToShow, screensToShow, showMinimizedWindows, showHiddenWindows, showFullscreenWindows], .vertical, false) + let toShowDropdowns = StackView([appsToShow, spacesToShow, screensToShow], .vertical, false) toShowDropdowns.spacing = TabView.padding toShowDropdowns.fit() let tab = GridView([ [toShowExplanations, toShowDropdowns], + [toShowExplanations2, showMinimizedWindows], + [toShowExplanations3, showHiddenWindows], + [toShowExplanations4, showFullscreenWindows], + [separator], [holdAndPress, StackView(nextWindowShortcut)], shortcutStyle, ], TabView.padding) tab.column(at: 0).xPlacement = .trailing + tab.mergeCells(inHorizontalRange: NSRange(location: 0, length: 2), verticalRange: NSRange(location: 4, length: 1)) tab.fit() return (nextWindowShortcut, tab) }