From 395db4b53f4437e9d0e3151ca5001efdc753a807 Mon Sep 17 00:00:00 2001 From: wheaney <42350981+wheaney@users.noreply.github.com> Date: Thu, 27 Feb 2025 18:29:04 -0800 Subject: [PATCH] Add check for ScreenCast portal --- ui/po/breezydesktop.pot | 24 +++++++++++++++--------- ui/po/de.po | 24 +++++++++++++++--------- ui/po/es.po | 24 +++++++++++++++--------- ui/po/fr.po | 24 +++++++++++++++--------- ui/po/it.po | 24 +++++++++++++++--------- ui/po/ja.po | 24 +++++++++++++++--------- ui/po/pl.po | 24 +++++++++++++++--------- ui/po/pt_BR.po | 24 +++++++++++++++--------- ui/po/ru.po | 24 +++++++++++++++--------- ui/po/sv.po | 24 +++++++++++++++--------- ui/po/uk_UA.po | 24 +++++++++++++++--------- ui/po/zh_CN.po | 24 +++++++++++++++--------- ui/src/connecteddevice.py | 8 ++++++++ ui/src/gtk/connected-device.ui | 2 +- ui/src/virtualdisplay.py | 10 ++++++++++ 15 files changed, 199 insertions(+), 109 deletions(-) diff --git a/ui/po/breezydesktop.pot b/ui/po/breezydesktop.pot index cec57f8..52e9834 100644 --- a/ui/po/breezydesktop.pot +++ b/ui/po/breezydesktop.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-23 16:29-0800\n" +"POT-Creation-Date: 2025-02-27 18:29-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,37 +17,43 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/connecteddevice.py:22 +#: src/connecteddevice.py:23 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "" -#: src/connecteddevice.py:23 +#: src/connecteddevice.py:24 msgid "This feature is not currently supported for your device." msgstr "" -#: src/connecteddevice.py:126 +#: src/connecteddevice.py:128 msgid "Set Focused Display Distance" msgstr "" -#: src/connecteddevice.py:127 +#: src/connecteddevice.py:129 msgid "Use a closer value so the display zooms in when you look at it." msgstr "" -#: src/connecteddevice.py:134 +#: src/connecteddevice.py:136 msgid "Set All Displays Distance" msgstr "" -#: src/connecteddevice.py:135 +#: src/connecteddevice.py:137 msgid "Use a farther value so the displays are zoomed out when you look away." msgstr "" -#: src/connecteddevice.py:264 +#: src/connecteddevice.py:237 +msgid "" +"Unable to add virtual displays on this machine. xdg-desktop-portal is " +"required." +msgstr "" + +#: src/connecteddevice.py:272 msgid "Focused display" msgstr "" -#: src/connecteddevice.py:270 +#: src/connecteddevice.py:278 msgid "All displays" msgstr "" diff --git a/ui/po/de.po b/ui/po/de.po index 48080d9..86624f9 100644 --- a/ui/po/de.po +++ b/ui/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-23 16:29-0800\n" +"POT-Creation-Date: 2025-02-27 18:29-0800\n" "PO-Revision-Date: 2024-08-02 20:54-0700\n" "Last-Translator: \n" "Language-Team: German \n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/connecteddevice.py:22 +#: src/connecteddevice.py:23 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." @@ -25,34 +25,40 @@ msgstr "" "Schaltet Ihre Brille in den Side-by-Side-Modus und verdoppelt die Breite des " "Displays." -#: src/connecteddevice.py:23 +#: src/connecteddevice.py:24 msgid "This feature is not currently supported for your device." msgstr "Diese Funktion wird von Ihrem Gerät derzeit nicht unterstützt." -#: src/connecteddevice.py:126 +#: src/connecteddevice.py:128 #, fuzzy msgid "Set Focused Display Distance" msgstr "Display-Entfernung" -#: src/connecteddevice.py:127 +#: src/connecteddevice.py:129 msgid "Use a closer value so the display zooms in when you look at it." msgstr "" -#: src/connecteddevice.py:134 +#: src/connecteddevice.py:136 #, fuzzy msgid "Set All Displays Distance" msgstr "Display-Entfernung" -#: src/connecteddevice.py:135 +#: src/connecteddevice.py:137 msgid "Use a farther value so the displays are zoomed out when you look away." msgstr "" -#: src/connecteddevice.py:264 +#: src/connecteddevice.py:237 +msgid "" +"Unable to add virtual displays on this machine. xdg-desktop-portal is " +"required." +msgstr "" + +#: src/connecteddevice.py:272 #, fuzzy msgid "Focused display" msgstr "Display-Entfernung" -#: src/connecteddevice.py:270 +#: src/connecteddevice.py:278 #, fuzzy msgid "All displays" msgstr "Gebogenes Display" diff --git a/ui/po/es.po b/ui/po/es.po index 2ed1495..23309e1 100644 --- a/ui/po/es.po +++ b/ui/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-23 16:29-0800\n" +"POT-Creation-Date: 2025-02-27 18:29-0800\n" "PO-Revision-Date: 2024-08-02 20:55-0700\n" "Last-Translator: \n" "Language-Team: Spanish \n" @@ -17,41 +17,47 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/connecteddevice.py:22 +#: src/connecteddevice.py:23 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "" "Cambia tus gafas al modo lado a lado y duplica el ancho de la pantalla." -#: src/connecteddevice.py:23 +#: src/connecteddevice.py:24 msgid "This feature is not currently supported for your device." msgstr "Esta función no es compatible con tu dispositivo en este momento." -#: src/connecteddevice.py:126 +#: src/connecteddevice.py:128 #, fuzzy msgid "Set Focused Display Distance" msgstr "Distancia de la pantalla" -#: src/connecteddevice.py:127 +#: src/connecteddevice.py:129 msgid "Use a closer value so the display zooms in when you look at it." msgstr "" -#: src/connecteddevice.py:134 +#: src/connecteddevice.py:136 #, fuzzy msgid "Set All Displays Distance" msgstr "Distancia de la pantalla" -#: src/connecteddevice.py:135 +#: src/connecteddevice.py:137 msgid "Use a farther value so the displays are zoomed out when you look away." msgstr "" -#: src/connecteddevice.py:264 +#: src/connecteddevice.py:237 +msgid "" +"Unable to add virtual displays on this machine. xdg-desktop-portal is " +"required." +msgstr "" + +#: src/connecteddevice.py:272 #, fuzzy msgid "Focused display" msgstr "Distancia de la pantalla" -#: src/connecteddevice.py:270 +#: src/connecteddevice.py:278 #, fuzzy msgid "All displays" msgstr "Pantalla curvada" diff --git a/ui/po/fr.po b/ui/po/fr.po index aa6260d..7427321 100644 --- a/ui/po/fr.po +++ b/ui/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-23 16:29-0800\n" +"POT-Creation-Date: 2025-02-27 18:29-0800\n" "PO-Revision-Date: 2024-08-02 20:54-0700\n" "Last-Translator: \n" "Language-Team: French \n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: src/connecteddevice.py:22 +#: src/connecteddevice.py:23 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." @@ -25,36 +25,42 @@ msgstr "" "Basculez vos lunettes en mode Side-By-Side (Côte-à-Côte) et doublez la " "largeur de l'écran." -#: src/connecteddevice.py:23 +#: src/connecteddevice.py:24 msgid "This feature is not currently supported for your device." msgstr "" "Cette fonctionnalité n'est actuellement pas prise en charge par votre " "appareil." -#: src/connecteddevice.py:126 +#: src/connecteddevice.py:128 #, fuzzy msgid "Set Focused Display Distance" msgstr "Distance d'affichage" -#: src/connecteddevice.py:127 +#: src/connecteddevice.py:129 msgid "Use a closer value so the display zooms in when you look at it." msgstr "" -#: src/connecteddevice.py:134 +#: src/connecteddevice.py:136 #, fuzzy msgid "Set All Displays Distance" msgstr "Distance d'affichage" -#: src/connecteddevice.py:135 +#: src/connecteddevice.py:137 msgid "Use a farther value so the displays are zoomed out when you look away." msgstr "" -#: src/connecteddevice.py:264 +#: src/connecteddevice.py:237 +msgid "" +"Unable to add virtual displays on this machine. xdg-desktop-portal is " +"required." +msgstr "" + +#: src/connecteddevice.py:272 #, fuzzy msgid "Focused display" msgstr "Distance d'affichage" -#: src/connecteddevice.py:270 +#: src/connecteddevice.py:278 #, fuzzy msgid "All displays" msgstr "Affichage incurvé" diff --git a/ui/po/it.po b/ui/po/it.po index 2a34289..52b30ed 100644 --- a/ui/po/it.po +++ b/ui/po/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-23 16:29-0800\n" +"POT-Creation-Date: 2025-02-27 18:29-0800\n" "PO-Revision-Date: 2024-08-02 21:14-0700\n" "Last-Translator: \n" "Language-Team: Italian \n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/connecteddevice.py:22 +#: src/connecteddevice.py:23 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." @@ -25,34 +25,40 @@ msgstr "" "Passa i tuoi occhiali in modalità side-by-side e raddoppia la larghezza del " "display." -#: src/connecteddevice.py:23 +#: src/connecteddevice.py:24 msgid "This feature is not currently supported for your device." msgstr "Questa funzione non è attualmente supportata sul tuo dispositivo." -#: src/connecteddevice.py:126 +#: src/connecteddevice.py:128 #, fuzzy msgid "Set Focused Display Distance" msgstr "Distanza del display" -#: src/connecteddevice.py:127 +#: src/connecteddevice.py:129 msgid "Use a closer value so the display zooms in when you look at it." msgstr "" -#: src/connecteddevice.py:134 +#: src/connecteddevice.py:136 #, fuzzy msgid "Set All Displays Distance" msgstr "Distanza del display" -#: src/connecteddevice.py:135 +#: src/connecteddevice.py:137 msgid "Use a farther value so the displays are zoomed out when you look away." msgstr "" -#: src/connecteddevice.py:264 +#: src/connecteddevice.py:237 +msgid "" +"Unable to add virtual displays on this machine. xdg-desktop-portal is " +"required." +msgstr "" + +#: src/connecteddevice.py:272 #, fuzzy msgid "Focused display" msgstr "Distanza del display" -#: src/connecteddevice.py:270 +#: src/connecteddevice.py:278 #, fuzzy msgid "All displays" msgstr "Display curvo" diff --git a/ui/po/ja.po b/ui/po/ja.po index c60252e..8df884c 100644 --- a/ui/po/ja.po +++ b/ui/po/ja.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-23 16:29-0800\n" +"POT-Creation-Date: 2025-02-27 18:29-0800\n" "PO-Revision-Date: 2024-08-02 20:55-0700\n" "Last-Translator: \n" "Language-Team: Japanese \n" @@ -21,40 +21,46 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/connecteddevice.py:22 +#: src/connecteddevice.py:23 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "メガネを3Dモードに切り替え、表示の幅を2倍にします。" -#: src/connecteddevice.py:23 +#: src/connecteddevice.py:24 msgid "This feature is not currently supported for your device." msgstr "現在接続されているデバイスはこの機能に対応していません。" -#: src/connecteddevice.py:126 +#: src/connecteddevice.py:128 #, fuzzy msgid "Set Focused Display Distance" msgstr "ディスプレイ距離" -#: src/connecteddevice.py:127 +#: src/connecteddevice.py:129 msgid "Use a closer value so the display zooms in when you look at it." msgstr "" -#: src/connecteddevice.py:134 +#: src/connecteddevice.py:136 #, fuzzy msgid "Set All Displays Distance" msgstr "ディスプレイ距離" -#: src/connecteddevice.py:135 +#: src/connecteddevice.py:137 msgid "Use a farther value so the displays are zoomed out when you look away." msgstr "" -#: src/connecteddevice.py:264 +#: src/connecteddevice.py:237 +msgid "" +"Unable to add virtual displays on this machine. xdg-desktop-portal is " +"required." +msgstr "" + +#: src/connecteddevice.py:272 #, fuzzy msgid "Focused display" msgstr "ディスプレイ距離" -#: src/connecteddevice.py:270 +#: src/connecteddevice.py:278 #, fuzzy msgid "All displays" msgstr "曲面ディスプレイ" diff --git a/ui/po/pl.po b/ui/po/pl.po index 9d38555..0aa484c 100644 --- a/ui/po/pl.po +++ b/ui/po/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-23 16:29-0800\n" +"POT-Creation-Date: 2025-02-27 18:29-0800\n" "PO-Revision-Date: 2024-08-16 10:26-0700\n" "Last-Translator: \n" "Language-Team: Polish \n" @@ -18,37 +18,43 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" -#: src/connecteddevice.py:22 +#: src/connecteddevice.py:23 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "" -#: src/connecteddevice.py:23 +#: src/connecteddevice.py:24 msgid "This feature is not currently supported for your device." msgstr "" -#: src/connecteddevice.py:126 +#: src/connecteddevice.py:128 msgid "Set Focused Display Distance" msgstr "" -#: src/connecteddevice.py:127 +#: src/connecteddevice.py:129 msgid "Use a closer value so the display zooms in when you look at it." msgstr "" -#: src/connecteddevice.py:134 +#: src/connecteddevice.py:136 msgid "Set All Displays Distance" msgstr "" -#: src/connecteddevice.py:135 +#: src/connecteddevice.py:137 msgid "Use a farther value so the displays are zoomed out when you look away." msgstr "" -#: src/connecteddevice.py:264 +#: src/connecteddevice.py:237 +msgid "" +"Unable to add virtual displays on this machine. xdg-desktop-portal is " +"required." +msgstr "" + +#: src/connecteddevice.py:272 msgid "Focused display" msgstr "" -#: src/connecteddevice.py:270 +#: src/connecteddevice.py:278 msgid "All displays" msgstr "" diff --git a/ui/po/pt_BR.po b/ui/po/pt_BR.po index dc2a8bd..576db53 100644 --- a/ui/po/pt_BR.po +++ b/ui/po/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-23 16:29-0800\n" +"POT-Creation-Date: 2025-02-27 18:29-0800\n" "PO-Revision-Date: 2024-08-19 09:39-0700\n" "Last-Translator: \n" "Language-Team: Brazilian Portuguese 1);\n" -#: src/connecteddevice.py:22 +#: src/connecteddevice.py:23 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." @@ -26,34 +26,40 @@ msgstr "" "Altera o modo dos óculos para lado a lado (SBS) e dobra a largura da tela " "(ultrawide)." -#: src/connecteddevice.py:23 +#: src/connecteddevice.py:24 msgid "This feature is not currently supported for your device." msgstr "Este recurso não é atualmente suportado para o seu dispositivo." -#: src/connecteddevice.py:126 +#: src/connecteddevice.py:128 #, fuzzy msgid "Set Focused Display Distance" msgstr "Distância da tela" -#: src/connecteddevice.py:127 +#: src/connecteddevice.py:129 msgid "Use a closer value so the display zooms in when you look at it." msgstr "" -#: src/connecteddevice.py:134 +#: src/connecteddevice.py:136 #, fuzzy msgid "Set All Displays Distance" msgstr "Distância da tela" -#: src/connecteddevice.py:135 +#: src/connecteddevice.py:137 msgid "Use a farther value so the displays are zoomed out when you look away." msgstr "" -#: src/connecteddevice.py:264 +#: src/connecteddevice.py:237 +msgid "" +"Unable to add virtual displays on this machine. xdg-desktop-portal is " +"required." +msgstr "" + +#: src/connecteddevice.py:272 #, fuzzy msgid "Focused display" msgstr "Distância da tela" -#: src/connecteddevice.py:270 +#: src/connecteddevice.py:278 #, fuzzy msgid "All displays" msgstr "Tela curva" diff --git a/ui/po/ru.po b/ui/po/ru.po index 9bb4dbf..9e3e731 100644 --- a/ui/po/ru.po +++ b/ui/po/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-23 16:29-0800\n" +"POT-Creation-Date: 2025-02-27 18:29-0800\n" "PO-Revision-Date: 2024-08-17 09:39-0700\n" "Last-Translator: \n" "Language-Team: Russian \n" @@ -18,41 +18,47 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: src/connecteddevice.py:22 +#: src/connecteddevice.py:23 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "" "Переключает очки в режим «сторона к стороне» и удваивает ширину дисплея." -#: src/connecteddevice.py:23 +#: src/connecteddevice.py:24 msgid "This feature is not currently supported for your device." msgstr "Эта функция в настоящее время не поддерживается для вашего устройства." -#: src/connecteddevice.py:126 +#: src/connecteddevice.py:128 #, fuzzy msgid "Set Focused Display Distance" msgstr "Расстояние дисплея" -#: src/connecteddevice.py:127 +#: src/connecteddevice.py:129 msgid "Use a closer value so the display zooms in when you look at it." msgstr "" -#: src/connecteddevice.py:134 +#: src/connecteddevice.py:136 #, fuzzy msgid "Set All Displays Distance" msgstr "Расстояние дисплея" -#: src/connecteddevice.py:135 +#: src/connecteddevice.py:137 msgid "Use a farther value so the displays are zoomed out when you look away." msgstr "" -#: src/connecteddevice.py:264 +#: src/connecteddevice.py:237 +msgid "" +"Unable to add virtual displays on this machine. xdg-desktop-portal is " +"required." +msgstr "" + +#: src/connecteddevice.py:272 #, fuzzy msgid "Focused display" msgstr "Расстояние дисплея" -#: src/connecteddevice.py:270 +#: src/connecteddevice.py:278 #, fuzzy msgid "All displays" msgstr "Изогнутый дисплей" diff --git a/ui/po/sv.po b/ui/po/sv.po index 006abca..dd335f2 100644 --- a/ui/po/sv.po +++ b/ui/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-23 16:29-0800\n" +"POT-Creation-Date: 2025-02-27 18:29-0800\n" "PO-Revision-Date: 2024-08-16 10:31-0700\n" "Last-Translator: \n" "Language-Team: Swedish \n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/connecteddevice.py:22 +#: src/connecteddevice.py:23 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." @@ -25,34 +25,40 @@ msgstr "" "Växlar dina glasögon till side-by-side-läget och dubblerar bredden på " "visningen." -#: src/connecteddevice.py:23 +#: src/connecteddevice.py:24 msgid "This feature is not currently supported for your device." msgstr "Din enhet stöder inte den här funktionen för tillfället." -#: src/connecteddevice.py:126 +#: src/connecteddevice.py:128 #, fuzzy msgid "Set Focused Display Distance" msgstr "Avstånd till skärmen" -#: src/connecteddevice.py:127 +#: src/connecteddevice.py:129 msgid "Use a closer value so the display zooms in when you look at it." msgstr "" -#: src/connecteddevice.py:134 +#: src/connecteddevice.py:136 #, fuzzy msgid "Set All Displays Distance" msgstr "Avstånd till skärmen" -#: src/connecteddevice.py:135 +#: src/connecteddevice.py:137 msgid "Use a farther value so the displays are zoomed out when you look away." msgstr "" -#: src/connecteddevice.py:264 +#: src/connecteddevice.py:237 +msgid "" +"Unable to add virtual displays on this machine. xdg-desktop-portal is " +"required." +msgstr "" + +#: src/connecteddevice.py:272 #, fuzzy msgid "Focused display" msgstr "Avstånd till skärmen" -#: src/connecteddevice.py:270 +#: src/connecteddevice.py:278 #, fuzzy msgid "All displays" msgstr "Böjd skärm" diff --git a/ui/po/uk_UA.po b/ui/po/uk_UA.po index 0cb6618..6a6668b 100644 --- a/ui/po/uk_UA.po +++ b/ui/po/uk_UA.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-23 16:29-0800\n" +"POT-Creation-Date: 2025-02-27 18:29-0800\n" "PO-Revision-Date: 2024-08-17 10:08-0700\n" "Last-Translator: \n" "Language-Team: Ukrainian \n" @@ -18,40 +18,46 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: src/connecteddevice.py:22 +#: src/connecteddevice.py:23 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "Переключає окуляри в режим «бок о бок» і подвоює ширину дисплея." -#: src/connecteddevice.py:23 +#: src/connecteddevice.py:24 msgid "This feature is not currently supported for your device." msgstr "Ця функція наразі не підтримується на вашому пристрої." -#: src/connecteddevice.py:126 +#: src/connecteddevice.py:128 #, fuzzy msgid "Set Focused Display Distance" msgstr "Відстань дисплея" -#: src/connecteddevice.py:127 +#: src/connecteddevice.py:129 msgid "Use a closer value so the display zooms in when you look at it." msgstr "" -#: src/connecteddevice.py:134 +#: src/connecteddevice.py:136 #, fuzzy msgid "Set All Displays Distance" msgstr "Відстань дисплея" -#: src/connecteddevice.py:135 +#: src/connecteddevice.py:137 msgid "Use a farther value so the displays are zoomed out when you look away." msgstr "" -#: src/connecteddevice.py:264 +#: src/connecteddevice.py:237 +msgid "" +"Unable to add virtual displays on this machine. xdg-desktop-portal is " +"required." +msgstr "" + +#: src/connecteddevice.py:272 #, fuzzy msgid "Focused display" msgstr "Відстань дисплея" -#: src/connecteddevice.py:270 +#: src/connecteddevice.py:278 #, fuzzy msgid "All displays" msgstr "Викривлений дисплей" diff --git a/ui/po/zh_CN.po b/ui/po/zh_CN.po index a58870f..937a0ab 100644 --- a/ui/po/zh_CN.po +++ b/ui/po/zh_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-23 16:29-0800\n" +"POT-Creation-Date: 2025-02-27 18:29-0800\n" "PO-Revision-Date: 2024-08-02 20:55-0700\n" "Last-Translator: \n" "Language-Team: Chinese (simplified) \n" @@ -16,40 +16,46 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/connecteddevice.py:22 +#: src/connecteddevice.py:23 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "切换到并排模式,并将显示宽度翻倍。" -#: src/connecteddevice.py:23 +#: src/connecteddevice.py:24 msgid "This feature is not currently supported for your device." msgstr "您的设备目前不支援此功能。" -#: src/connecteddevice.py:126 +#: src/connecteddevice.py:128 #, fuzzy msgid "Set Focused Display Distance" msgstr "显示距离" -#: src/connecteddevice.py:127 +#: src/connecteddevice.py:129 msgid "Use a closer value so the display zooms in when you look at it." msgstr "" -#: src/connecteddevice.py:134 +#: src/connecteddevice.py:136 #, fuzzy msgid "Set All Displays Distance" msgstr "显示距离" -#: src/connecteddevice.py:135 +#: src/connecteddevice.py:137 msgid "Use a farther value so the displays are zoomed out when you look away." msgstr "" -#: src/connecteddevice.py:264 +#: src/connecteddevice.py:237 +msgid "" +"Unable to add virtual displays on this machine. xdg-desktop-portal is " +"required." +msgstr "" + +#: src/connecteddevice.py:272 #, fuzzy msgid "Focused display" msgstr "显示距离" -#: src/connecteddevice.py:270 +#: src/connecteddevice.py:278 #, fuzzy msgid "All displays" msgstr "曲面显示" diff --git a/ui/src/connecteddevice.py b/ui/src/connecteddevice.py index e50191d..cf28c85 100644 --- a/ui/src/connecteddevice.py +++ b/ui/src/connecteddevice.py @@ -7,6 +7,7 @@ from .settingsmanager import SettingsManager from .shortcutdialog import bind_shortcut_settings from .statemanager import StateManager from .virtualdisplaymanager import VirtualDisplayManager +from .virtualdisplay import is_screencast_available from .virtualdisplayrow import VirtualDisplayRow from .xrdriveripc import XRDriverIPC import gettext @@ -34,6 +35,7 @@ class ConnectedDevice(Gtk.Box): # widescreen_mode_row = Gtk.Template.Child() # curved_display_switch = Gtk.Template.Child() top_features_group = Gtk.Template.Child() + virtual_displays_row = Gtk.Template.Child() add_virtual_display_menu = Gtk.Template.Child() add_virtual_display_button = Gtk.Template.Child() launch_display_settings_button = Gtk.Template.Child() @@ -229,6 +231,12 @@ class ConnectedDevice(Gtk.Box): for widget in self.all_enabled_state_inputs: widget.set_sensitive(requesting_enabled) + + if not is_screencast_available(): + self.virtual_displays_row.set_subtitle( + _("Unable to add virtual displays on this machine. xdg-desktop-portal is required.")) + self.add_virtual_display_button.set_sensitive(False) + self.add_virtual_display_menu.set_sensitive(False) # if requesting_enabled: # self._refresh_follow_mode(self.follow_mode_switch, None) diff --git a/ui/src/gtk/connected-device.ui b/ui/src/gtk/connected-device.ui index 52d46be..5873bb2 100644 --- a/ui/src/gtk/connected-device.ui +++ b/ui/src/gtk/connected-device.ui @@ -65,7 +65,7 @@ - + Virtual displays 2 diff --git a/ui/src/virtualdisplay.py b/ui/src/virtualdisplay.py index 8d7ad95..64eb478 100644 --- a/ui/src/virtualdisplay.py +++ b/ui/src/virtualdisplay.py @@ -86,5 +86,15 @@ class VirtualDisplay: self.pipeline.get_bus().connect('message', self._on_message) self.pipeline.set_state(Gst.State.PAUSED) +def is_screencast_available(): + try: + bus = pydbus.SessionBus() + # Try to get the ScreenCast interface + screen_cast = bus.get(screen_cast_iface, '/org/gnome/Mutter/ScreenCast') + return True + except Exception as e: + logger.warning(f"ScreenCast portal not available: {e}") + return False +