Update zoom-on-focus switch so it's not toggleable if the presets are equal

This commit is contained in:
wheaney 2025-02-23 13:07:01 -08:00
parent fea40cfa3b
commit b687d13637
13 changed files with 133 additions and 14 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-23 11:02-0800\n"
"POT-Creation-Date: 2025-02-23 13:06-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -43,6 +43,14 @@ msgstr ""
msgid "Use a farther value so the displays are zoomed out when you look away."
msgstr ""
#: src/connecteddevice.py:261
msgid "Focused display"
msgstr ""
#: src/connecteddevice.py:267
msgid "All displays"
msgstr ""
#: src/displaydistancedialogcontent.py:41
msgid "closer"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-23 11:02-0800\n"
"POT-Creation-Date: 2025-02-23 13:06-0800\n"
"PO-Revision-Date: 2024-08-02 20:54-0700\n"
"Last-Translator: <wayne@xronlinux.com>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
@ -47,6 +47,16 @@ msgstr "Display-Entfernung"
msgid "Use a farther value so the displays are zoomed out when you look away."
msgstr ""
#: src/connecteddevice.py:261
#, fuzzy
msgid "Focused display"
msgstr "Display-Entfernung"
#: src/connecteddevice.py:267
#, fuzzy
msgid "All displays"
msgstr "Gebogenes Display"
#: src/displaydistancedialogcontent.py:41
msgid "closer"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-23 11:02-0800\n"
"POT-Creation-Date: 2025-02-23 13:06-0800\n"
"PO-Revision-Date: 2024-08-02 20:55-0700\n"
"Last-Translator: <wayne@xronlinux.com>\n"
"Language-Team: Spanish <es@tp.org.es>\n"
@ -46,6 +46,16 @@ msgstr "Distancia de la pantalla"
msgid "Use a farther value so the displays are zoomed out when you look away."
msgstr ""
#: src/connecteddevice.py:261
#, fuzzy
msgid "Focused display"
msgstr "Distancia de la pantalla"
#: src/connecteddevice.py:267
#, fuzzy
msgid "All displays"
msgstr "Pantalla curvada"
#: src/displaydistancedialogcontent.py:41
msgid "closer"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-23 11:02-0800\n"
"POT-Creation-Date: 2025-02-23 13:06-0800\n"
"PO-Revision-Date: 2024-08-02 20:54-0700\n"
"Last-Translator: <wayne@xronlinux.com>\n"
"Language-Team: French <traduc@traduc.org>\n"
@ -49,6 +49,16 @@ msgstr "Distance d'affichage"
msgid "Use a farther value so the displays are zoomed out when you look away."
msgstr ""
#: src/connecteddevice.py:261
#, fuzzy
msgid "Focused display"
msgstr "Distance d'affichage"
#: src/connecteddevice.py:267
#, fuzzy
msgid "All displays"
msgstr "Affichage incurvé"
#: src/displaydistancedialogcontent.py:41
msgid "closer"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-23 11:02-0800\n"
"POT-Creation-Date: 2025-02-23 13:06-0800\n"
"PO-Revision-Date: 2024-08-02 21:14-0700\n"
"Last-Translator: <wayne@xronlinux.com>\n"
"Language-Team: Italian <tp@lists.linux.it>\n"
@ -47,6 +47,16 @@ msgstr "Distanza del display"
msgid "Use a farther value so the displays are zoomed out when you look away."
msgstr ""
#: src/connecteddevice.py:261
#, fuzzy
msgid "Focused display"
msgstr "Distanza del display"
#: src/connecteddevice.py:267
#, fuzzy
msgid "All displays"
msgstr "Display curvo"
#: src/displaydistancedialogcontent.py:41
msgid "closer"
msgstr ""

View File

@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-23 11:02-0800\n"
"POT-Creation-Date: 2025-02-23 13:06-0800\n"
"PO-Revision-Date: 2024-08-02 20:55-0700\n"
"Last-Translator: <wayne@xronlinux.com>\n"
"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
@ -49,6 +49,16 @@ msgstr "ディスプレイ距離"
msgid "Use a farther value so the displays are zoomed out when you look away."
msgstr ""
#: src/connecteddevice.py:261
#, fuzzy
msgid "Focused display"
msgstr "ディスプレイ距離"
#: src/connecteddevice.py:267
#, fuzzy
msgid "All displays"
msgstr "曲面ディスプレイ"
#: src/displaydistancedialogcontent.py:41
msgid "closer"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-23 11:02-0800\n"
"POT-Creation-Date: 2025-02-23 13:06-0800\n"
"PO-Revision-Date: 2024-08-16 10:26-0700\n"
"Last-Translator: <wayne@xronlinux.com>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
@ -44,6 +44,14 @@ msgstr ""
msgid "Use a farther value so the displays are zoomed out when you look away."
msgstr ""
#: src/connecteddevice.py:261
msgid "Focused display"
msgstr ""
#: src/connecteddevice.py:267
msgid "All displays"
msgstr ""
#: src/displaydistancedialogcontent.py:41
msgid "closer"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-23 11:02-0800\n"
"POT-Creation-Date: 2025-02-23 13:06-0800\n"
"PO-Revision-Date: 2024-08-19 09:39-0700\n"
"Last-Translator: <wayne@xronlinux.com>\n"
"Language-Team: Brazilian Portuguese <ldpbr-"
@ -48,6 +48,16 @@ msgstr "Distância da tela"
msgid "Use a farther value so the displays are zoomed out when you look away."
msgstr ""
#: src/connecteddevice.py:261
#, fuzzy
msgid "Focused display"
msgstr "Distância da tela"
#: src/connecteddevice.py:267
#, fuzzy
msgid "All displays"
msgstr "Tela curva"
#: src/displaydistancedialogcontent.py:41
msgid "closer"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-23 11:02-0800\n"
"POT-Creation-Date: 2025-02-23 13:06-0800\n"
"PO-Revision-Date: 2024-08-17 09:39-0700\n"
"Last-Translator: <wayne@xronlinux.com>\n"
"Language-Team: Russian <gnu@d07.ru>\n"
@ -47,6 +47,16 @@ msgstr "Расстояние дисплея"
msgid "Use a farther value so the displays are zoomed out when you look away."
msgstr ""
#: src/connecteddevice.py:261
#, fuzzy
msgid "Focused display"
msgstr "Расстояние дисплея"
#: src/connecteddevice.py:267
#, fuzzy
msgid "All displays"
msgstr "Изогнутый дисплей"
#: src/displaydistancedialogcontent.py:41
msgid "closer"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-23 11:02-0800\n"
"POT-Creation-Date: 2025-02-23 13:06-0800\n"
"PO-Revision-Date: 2024-08-16 10:31-0700\n"
"Last-Translator: <wayne@xronlinux.com>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
@ -47,6 +47,16 @@ msgstr "Avstånd till skärmen"
msgid "Use a farther value so the displays are zoomed out when you look away."
msgstr ""
#: src/connecteddevice.py:261
#, fuzzy
msgid "Focused display"
msgstr "Avstånd till skärmen"
#: src/connecteddevice.py:267
#, fuzzy
msgid "All displays"
msgstr "Böjd skärm"
#: src/displaydistancedialogcontent.py:41
msgid "closer"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-23 11:02-0800\n"
"POT-Creation-Date: 2025-02-23 13:06-0800\n"
"PO-Revision-Date: 2024-08-17 10:08-0700\n"
"Last-Translator: <wayne@xronlinux.com>\n"
"Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n"
@ -46,6 +46,16 @@ msgstr "Відстань дисплея"
msgid "Use a farther value so the displays are zoomed out when you look away."
msgstr ""
#: src/connecteddevice.py:261
#, fuzzy
msgid "Focused display"
msgstr "Відстань дисплея"
#: src/connecteddevice.py:267
#, fuzzy
msgid "All displays"
msgstr "Викривлений дисплей"
#: src/displaydistancedialogcontent.py:41
msgid "closer"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-23 11:02-0800\n"
"POT-Creation-Date: 2025-02-23 13:06-0800\n"
"PO-Revision-Date: 2024-08-02 20:55-0700\n"
"Last-Translator: <wayne@xronlinux.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
@ -44,6 +44,16 @@ msgstr "显示距离"
msgid "Use a farther value so the displays are zoomed out when you look away."
msgstr ""
#: src/connecteddevice.py:261
#, fuzzy
msgid "Focused display"
msgstr "显示距离"
#: src/connecteddevice.py:267
#, fuzzy
msgid "All displays"
msgstr "曲面显示"
#: src/displaydistancedialogcontent.py:41
msgid "closer"
msgstr ""

View File

@ -258,13 +258,16 @@ class ConnectedDevice(Gtk.Box):
self.display_zoom_on_focus_switch.set_active(should_zoom_on_focus_be_enabled)
def _set_focused_display_distance(self, distance):
self.focused_display_distance_label.set_markup(f"Focused display: <b>{distance}</b>")
self.focused_display_distance_label.set_markup(f"{_("Focused display")}: <b>{distance}</b>")
self.settings.set_double('toggle-display-distance-start', distance)
self.display_zoom_on_focus_switch.set_sensitive(distance != self.settings.get_double('toggle-display-distance-end'))
def _set_all_displays_distance(self, distance):
self.all_displays_distance_label.set_markup(f"All displays: <b>{distance}</b>")
self.all_displays_distance_label.set_markup(f"{_("All displays")}: <b>{distance}</b>")
self.settings.set_double('toggle-display-distance-end', distance)
self.display_zoom_on_focus_switch.set_active(False)
self.display_zoom_on_focus_switch.set_sensitive(distance != self.settings.get_double('toggle-display-distance-start'))
def _on_display_distance_preset_change_button_clicked(self, widget, settings_key, on_save_callback, title, subtitle, lower_limit, upper_limit):
dialog = DisplayDistanceDialog(settings_key, on_save_callback, title, subtitle, lower_limit, upper_limit)