feat: easier back-cycling shortcut (#420)

fix: correct layout for right-to-left languages
This commit is contained in:
Louis Pontoise authored and lwouis committed 2020-07-21 07:10:54 +09:00
1 parent 7a23046015
commit a31544d092
23 files changed
+214 -43

No files matched your search

+10 -1
View File
@@ -37,6 +37,9 @@
/* No comment provided by engineer. */
"AltTab needs some permissions" = "AltTab needs some permissions";
/* No comment provided by engineer. */
"and press:" = "and press:";
/* No comment provided by engineer. */
"Apparition delay:" = "Apparition delay:";
@@ -88,6 +91,9 @@
/* No comment provided by engineer. */
"Fade out animation:" = "Fade out animation:";
/* No comment provided by engineer. */
"Focus selected window" = "Focus selected window";
/* No comment provided by engineer. */
"Fullscreen" = "Fullscreen";
@@ -157,6 +163,9 @@
/* No comment provided by engineer. */
"Optional: email (if you want a reply)" = "Optional: email (if you want a reply)";
/* No comment provided by engineer. */
"or press:" = "or press:";
/* Menubar option */
"Preferences…" = "Preferences…";
@@ -236,7 +245,7 @@
"Theme:" = "Theme:";
/* No comment provided by engineer. */
"then press:" = "then press:";
"then release:" = "then release:";
/* No comment provided by engineer. */
"This permission is needed to focus windows after you release the shortcut" = "This permission is needed to focus windows after you release the shortcut";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab needs some permissions";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "تأخر الوموض:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Fade out animation:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Fullscreen";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "اختياري: بريد (إذا كنت تريد رد)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "التفضيلات…";
@@ -240,7 +249,7 @@
"Theme:" = "المظهر:";
/*No comment provided by engineer.*/
"then press:" = "واضغط:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "This permission is needed to focus windows after you release the shortcut";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab braucht einige Berechtigungen";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "Verzögertes Einblenden:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Ausblenden animieren:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Vollbild";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "Optional: E-Mail (wenn du benachrichtigt werden willst)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "Einstellungen…";
@@ -240,7 +249,7 @@
"Theme:" = "Thema:";
/*No comment provided by engineer.*/
"then press:" = "und drücke:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "Diese Erlaubnis ist nötig um Fenster nach dem Drücken des Tastenkürzels anzuzeigen";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab needs some permissions";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "Apparition delay:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Fade out animation:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Fullscreen";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "Optional: email (if you want a reply)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "Preferences…";
@@ -240,7 +249,7 @@
"Theme:" = "Theme:";
/*No comment provided by engineer.*/
"then press:" = "then press:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "This permission is needed to focus windows after you release the shortcut";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab needs some permissions";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "Retraso al mostrar:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Fade out animation:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Fullscreen";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "Opcional: correo electrónico (si desea una respuesta)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "Preferencias…";
@@ -240,7 +249,7 @@
"Theme:" = "Tema:";
/*No comment provided by engineer.*/
"then press:" = "y pulsar:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "This permission is needed to focus windows after you release the shortcut";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab needs some permissions";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "Ilmestymisviive:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Fade out animation:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Fullscreen";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "Vapaaehtoinen: sähköposti (jos haluat vastauksen)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "Asetukset…";
@@ -240,7 +249,7 @@
"Theme:" = "Teema:";
/*No comment provided by engineer.*/
"then press:" = "sitten paina:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "This permission is needed to focus windows after you release the shortcut";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab a besoin de permissions";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "Délai d’apparition :";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Animer la disparition :";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Plein écran";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "Optionnel : email (si vous voulez une réponse)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "Préférences…";
@@ -240,7 +249,7 @@
"Theme:" = "Thème :";
/*No comment provided by engineer.*/
"then press:" = "puis presser :";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "Cette permission est nécessaire pour afficher la fenêtre après le relâchement du raccourci clavier";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "Az AltTab-nak néhány jogosultságra van szüksége";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "Megjelenítés késleltetése:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Áttűnési animáció:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Teljes képernyő";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "Opcionális: email (ha választ szeretnél kapni)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "Beállítások…";
@@ -240,7 +249,7 @@
"Theme:" = "Téma:";
/*No comment provided by engineer.*/
"then press:" = "majd nyomjon:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "Ez a jogosultság ahhoz szükséges hogy az ablak fókuszba kerüljön miután a parancsikont elengedte";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab membutuhkan beberapa izin";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "Penundaan penampakan:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Animasi fade out:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Layar penuh";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "Opsional: surel (jika kamu ingin dapatkan balasan)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "Preferensi…";
@@ -240,7 +249,7 @@
"Theme:" = "Tema:";
/*No comment provided by engineer.*/
"then press:" = "lalu tekan:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "Izin ini diperlukan untuk memfokuskan jendela setelah Anda melepaskan pintasan";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab needs some permissions";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "Ritardo di apparizione:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Fade out animation:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Fullscreen";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "Opzionale: email (se desideri una risposta)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "Preferenze…";
@@ -240,7 +249,7 @@
"Theme:" = "Tema:";
/*No comment provided by engineer.*/
"then press:" = "quindi premere:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "This permission is needed to focus windows after you release the shortcut";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab needs some permissions";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "スクリーン表示速度:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "フェードアウトアニメーション";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Fullscreen";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "任意:Eメール(返信を希望する場合)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "環境設定…";
@@ -240,7 +249,7 @@
"Theme:" = "テーマ:";
/*No comment provided by engineer.*/
"then press:" = "を押したまま:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "This permission is needed to focus windows after you release the shortcut";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab이 권한을 필요로 합니다";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "나타나는 지연 시간:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "페이드 아웃 애니메이션:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "전체화면";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "답변을 원하면 이메일 주소를 남겨주세요";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "설정…";
@@ -240,7 +249,7 @@
"Theme:" = "테마:";
/*No comment provided by engineer.*/
"then press:" = "을 누르고 다음을 누르면:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "이 권한은 단축키를 사용했을 때 원하는 윈도우로 이동할 수 있게 해줍니다";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab needs some permissions";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "Apparition delay:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Fade out animation:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Vollbild";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "Fakultativ: Email (wann Dir eng Änwert wënscht)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "Astellung…";
@@ -240,7 +249,7 @@
"Theme:" = "Theme:";
/*No comment provided by engineer.*/
"then press:" = "then press:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "This permission is needed to focus windows after you release the shortcut";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab needs some permissions";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "Tonen met vertraging:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Fade-out animatie:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Volledig scherm";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "Optioneel: e-mail (als je een reactie wilt ontvangen)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "Voorkeuren…";
@@ -240,7 +249,7 @@
"Theme:" = "Thema:";
/*No comment provided by engineer.*/
"then press:" = "ingedrukt, en druk dan op:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "This permission is needed to focus windows after you release the shortcut";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab needs some permissions";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "Intervalo para exibição:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Fade out animation:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Fullscreen";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "Opcional: e-mail (se você desejar uma resposta)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "Preferências";
@@ -240,7 +249,7 @@
"Theme:" = "Tema:";
/*No comment provided by engineer.*/
"then press:" = "então pressione:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "This permission is needed to focus windows after you release the shortcut";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab needs some permissions";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "Задержка появления:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Анимация затухания:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Полноэкранные";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "Опционально: эл.почта (если вы хотите ответа)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "Настройки…";
@@ -240,7 +249,7 @@
"Theme:" = "Тема:";
/*No comment provided by engineer.*/
"then press:" = "затем нажать:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "This permission is needed to focus windows after you release the shortcut";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab needs some permissions";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "Görünüm gecikmesi:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "Fade out animation:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "Fullscreen";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "İsteğe bağlı: e-posta (bir yanıt istiyorsanız)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "Tercihler…";
@@ -240,7 +249,7 @@
"Theme:" = "Tema:";
/*No comment provided by engineer.*/
"then press:" = "ve:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "This permission is needed to focus windows after you release the shortcut";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab 需要获取一些隐私权限";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "切换窗口出现延迟:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "淡出动画:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "全屏";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "电子邮箱地址 (可选,若想接收答复)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "偏好设置…";
@@ -240,7 +249,7 @@
"Theme:" = "主题:";
/*No comment provided by engineer.*/
"then press:" = "并按下:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "需要此权限在释放快捷键后切换鼠标焦点";
+10 -1
View File
@@ -38,6 +38,9 @@
/*No comment provided by engineer.*/
"AltTab needs some permissions" = "AltTab needs some permissions";
/*No comment provided by engineer.*/
"and press:" = "and press:";
/*No comment provided by engineer.*/
"Apparition delay:" = "顯示前的延遲:";
@@ -89,6 +92,9 @@
/*No comment provided by engineer.*/
"Fade out animation:" = "淡出動畫:";
/*No comment provided by engineer.*/
"Focus selected window" = "Focus selected window";
/*No comment provided by engineer.*/
"Fullscreen" = "全螢幕";
@@ -161,6 +167,9 @@
/*No comment provided by engineer.*/
"Optional: email (if you want a reply)" = "電子信箱(選填,如果你想要收到回覆)";
/*No comment provided by engineer.*/
"or press:" = "or press:";
/*No comment provided by engineer.*/
"Preferences…" = "偏好設定…";
@@ -240,7 +249,7 @@
"Theme:" = "主題:";
/*No comment provided by engineer.*/
"then press:" = "並按下:";
"then release:" = "then release:";
/*No comment provided by engineer.*/
"This permission is needed to focus windows after you release the shortcut" = "This permission is needed to focus windows after you release the shortcut";
+1 -1
View File
@@ -11,7 +11,7 @@ class Preferences {
"fontHeight": "15",
"holdShortcut": "⌥",
"nextWindowShortcut": "⇥",
"previousWindowShortcut": "⇧⇥",
"previousWindowShortcut": "⇧",
"cancelShortcut": "⎋",
"closeWindowShortcut": "W",
"minDeminWindowShortcut": "M",
+5 -5
View File
@@ -164,7 +164,7 @@ class App: NSApplication, NSApplicationDelegate {
@objc func showUi() {
appIsBeingUsed = true
DispatchQueue.main.async { () -> () in self.showUiOrCycleSelection(.neutral) }
DispatchQueue.main.async { () -> () in self.showUiOrCycleSelection() }
}
func cycleSelection(_ direction: Direction) {
@@ -215,8 +215,8 @@ class App: NSApplication, NSApplicationDelegate {
}
}
func showUiOrCycleSelection(_ direction: Direction) {
debugPrint("showUiOrCycleSelection", direction)
func showUiOrCycleSelection() {
debugPrint("showUiOrCycleSelection")
if isFirstSummon {
debugPrint("showUiOrCycleSelection: isFirstSummon")
isFirstSummon = false
@@ -234,12 +234,12 @@ class App: NSApplication, NSApplicationDelegate {
Windows.refreshWhichWindowsToShowTheUser(screen)
if (!Windows.list.contains { $0.shouldShowTheUser }) { hideUi(); return }
Windows.updateFocusedWindowIndex(0)
Windows.cycleFocusedWindowIndex(direction.step())
Windows.cycleFocusedWindowIndex(1)
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Preferences.windowDisplayDelay) { () -> () in
self.rebuildUi()
}
} else {
cycleSelection(direction)
cycleSelection(.leading)
}
}
+4 -9
View File
@@ -231,9 +231,8 @@ class FlippedView: NSView {
}
enum Direction {
case neutral
case left
case right
case left
case leading
case trailing
case up
@@ -241,14 +240,10 @@ enum Direction {
func step() -> Int {
if self == .left {
return -1
} else if self == .right {
return 1
} else if self == .leading {
return App.shared.userInterfaceLayoutDirection == .leftToRight ? 1 : -1
} else if self == .trailing {
return App.shared.userInterfaceLayoutDirection == .leftToRight ? -1 : 1
} else if self == .right {
return App.shared.userInterfaceLayoutDirection == .leftToRight ? 1 : -1
}
return 0
return self == .leading ? 1 : -1
}
}
@@ -11,10 +11,10 @@ class GeneralTab: NSViewController, PreferencePane {
static var shortcutsDependentOnHoldShortcut = [NSControl]()
static var shortcutsActionsBlocks = [
"holdShortcut": { App.app.focusTarget() },
"nextWindowShortcut": { App.app.showUiOrCycleSelection(.right) },
"previousWindowShortcut": { App.app.showUiOrCycleSelection(.left) },
"→": { App.app.cycleSelection(.leading) },
"←": { App.app.cycleSelection(.trailing) },
"nextWindowShortcut": { App.app.showUiOrCycleSelection() },
"previousWindowShortcut": { App.app.cycleSelection(.trailing) },
"→": { App.app.cycleSelection(.right) },
"←": { App.app.cycleSelection(.left) },
"↑": { App.app.cycleSelection(.up) },
"↓": { App.app.cycleSelection(.down) },
"cancelShortcut": { App.app.hideUi() },
@@ -28,7 +28,7 @@ class GeneralTab: NSViewController, PreferencePane {
let startAtLogin = LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Start at login:", comment: ""), "startAtLogin", extraAction: startAtLoginCallback)
let hideMenubarIcon = LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Hide menubar icon:", comment: ""), "hideMenubarIcon", extraAction: hideMenubarIconCallback)
var holdShortcut = LabelAndControl.makeLabelWithRecorder(NSLocalizedString("Hold", comment: ""), "holdShortcut", Preferences.holdShortcut, false, labelPosition: .leftWithoutSeparator)
holdShortcut.append(LabelAndControl.makeLabel(NSLocalizedString("then press:", comment: "")))
holdShortcut.append(LabelAndControl.makeLabel(NSLocalizedString("and press:", comment: "")))
let nextWindowShortcut = LabelAndControl.makeLabelWithRecorder(NSLocalizedString("Select next window", comment: ""), "nextWindowShortcut", Preferences.nextWindowShortcut, labelPosition: .right)
let previousWindowShortcut = LabelAndControl.makeLabelWithRecorder(NSLocalizedString("Select previous window", comment: ""), "previousWindowShortcut", Preferences.previousWindowShortcut, labelPosition: .right)
let cancelShortcut = LabelAndControl.makeLabelWithRecorder(NSLocalizedString("Cancel and hide", comment: ""), "cancelShortcut", Preferences.cancelShortcut, labelPosition: .right)
@@ -47,7 +47,10 @@ class GeneralTab: NSViewController, PreferencePane {
let showFullscreenWindows = StackView(LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Fullscreen", comment: ""), "showFullscreenWindows", labelPosition: .right))
let showMinimizedWindows = StackView(LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Minimized", comment: ""), "showMinimizedWindows", labelPosition: .right))
let showHiddenWindows = StackView(LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Hidden", comment: ""), "showHiddenWindows", labelPosition: .right))
let shortcuts = StackView([nextWindowShortcut, previousWindowShortcut, cancelShortcut, closeWindowShortcut, minDeminWindowShortcut, quitAppShortcut, hideShowAppShortcut].map { (view: [NSView]) in StackView(view) }, .vertical)
let shortcuts = StackView([previousWindowShortcut, cancelShortcut, closeWindowShortcut, minDeminWindowShortcut, quitAppShortcut, hideShowAppShortcut].map { (view: [NSView]) in StackView(view) }, .vertical)
let thenRelease = LabelAndControl.makeLabel(NSLocalizedString("then release:", comment: ""))
let orPress = LabelAndControl.makeLabel(NSLocalizedString("or press:", comment: ""))
let focusSelectedWindow = LabelAndControl.makeLabel(NSLocalizedString("Focus selected window", comment: ""))
let toShowDropdowns = StackView([appsToShow, spacesToShow, screensToShow], .vertical)
let toShowCheckboxes = StackView([showMinimizedWindows, showHiddenWindows, showFullscreenWindows], .vertical)
let toShowExplanations = LabelAndControl.makeLabel(NSLocalizedString("Show the following windows:", comment: ""))
@@ -56,12 +59,14 @@ class GeneralTab: NSViewController, PreferencePane {
let grid = GridView([
startAtLogin,
hideMenubarIcon,
[holdAndPress, shortcuts],
[holdAndPress, StackView(nextWindowShortcut)],
[thenRelease, focusSelectedWindow],
[orPress, shortcuts],
[checkboxesExplanations, checkboxes],
[toShowExplanations, toShow],
])
grid.column(at: 0).xPlacement = .trailing
[2, 3, 4].forEach { grid.row(at: $0).topPadding = GridView.interPadding }
[2, 5, 6].forEach { grid.row(at: $0).topPadding = GridView.interPadding }
grid.fit()
GeneralTab.shortcutsDependentOnHoldShortcut.append(contentsOf: [enableArrows[0] as! NSControl] +
@@ -81,7 +86,7 @@ class GeneralTab: NSViewController, PreferencePane {
private static func addShortcut(_ type: KeyEventType, _ shortcut: Shortcut, _ controlId: String) {
removeShortcutIfExists(controlId, type) // remove the previous shortcut
shortcutActions[controlId] = ShortcutAction(shortcut: shortcut, actionHandler: { _ in
let isShortcutInitiatingTheApp = ["previousWindowShortcut", "nextWindowShortcut"].contains(controlId)
let isShortcutInitiatingTheApp = controlId == "nextWindowShortcut"
if isShortcutInitiatingTheApp {
App.app.appIsBeingUsed = true
}