diff --git a/VERSION b/VERSION index 9084fa2..781dcb0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.0 +1.1.3 diff --git a/ui/po/breezydesktop.pot b/ui/po/breezydesktop.pot index 36933f0..7f853e4 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: 2024-10-18 11:45-0700\n" +"POT-Creation-Date: 2024-10-21 13:39-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,13 +17,13 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/connecteddevice.py:17 +#: src/connecteddevice.py:20 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "" -#: src/connecteddevice.py:18 +#: src/connecteddevice.py:21 msgid "This feature is not currently supported for your device." msgstr "" diff --git a/ui/po/de.po b/ui/po/de.po index e6409d3..b82a330 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: 2024-10-18 11:45-0700\n" +"POT-Creation-Date: 2024-10-21 12:23-0700\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:17 +#: src/connecteddevice.py:20 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." @@ -25,7 +25,7 @@ msgstr "" "Schaltet Ihre Brille in den Side-by-Side-Modus und verdoppelt die Breite des " "Displays." -#: src/connecteddevice.py:18 +#: src/connecteddevice.py:21 msgid "This feature is not currently supported for your device." msgstr "Diese Funktion wird von Ihrem Gerät derzeit nicht unterstützt." diff --git a/ui/po/es.po b/ui/po/es.po index 5e104ce..3fcbba8 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: 2024-10-18 11:45-0700\n" +"POT-Creation-Date: 2024-10-21 12:23-0700\n" "PO-Revision-Date: 2024-08-02 20:55-0700\n" "Last-Translator: \n" "Language-Team: Spanish \n" @@ -17,14 +17,14 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/connecteddevice.py:17 +#: src/connecteddevice.py:20 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:18 +#: src/connecteddevice.py:21 msgid "This feature is not currently supported for your device." msgstr "Esta función no es compatible con tu dispositivo en este momento." diff --git a/ui/po/fr.po b/ui/po/fr.po index 9bd381a..59e4ec4 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: 2024-10-18 11:45-0700\n" +"POT-Creation-Date: 2024-10-21 12:23-0700\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:17 +#: src/connecteddevice.py:20 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." @@ -25,7 +25,7 @@ msgstr "" "Basculez vos lunettes en mode Side-By-Side (Côte-à-Côte) et doublez la " "largeur de l'écran." -#: src/connecteddevice.py:18 +#: src/connecteddevice.py:21 msgid "This feature is not currently supported for your device." msgstr "" "Cette fonctionnalité n'est actuellement pas prise en charge par votre " diff --git a/ui/po/it.po b/ui/po/it.po index 1ec6e0d..f913be5 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: 2024-10-18 11:45-0700\n" +"POT-Creation-Date: 2024-10-21 12:23-0700\n" "PO-Revision-Date: 2024-08-02 21:14-0700\n" "Last-Translator: \n" "Language-Team: Italian \n" @@ -17,13 +17,13 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/connecteddevice.py:17 +#: src/connecteddevice.py:20 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "" -#: src/connecteddevice.py:18 +#: src/connecteddevice.py:21 msgid "This feature is not currently supported for your device." msgstr "" diff --git a/ui/po/ja.po b/ui/po/ja.po index cce7390..21fac02 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: 2024-10-18 11:45-0700\n" +"POT-Creation-Date: 2024-10-21 12:23-0700\n" "PO-Revision-Date: 2024-08-02 20:55-0700\n" "Last-Translator: \n" "Language-Team: Japanese \n" @@ -21,13 +21,13 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/connecteddevice.py:17 +#: src/connecteddevice.py:20 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "メガネを3Dモードに切り替え、表示の幅を2倍にします。" -#: src/connecteddevice.py:18 +#: src/connecteddevice.py:21 msgid "This feature is not currently supported for your device." msgstr "この機能は現在接続されているデバイスではサポートされていません。" @@ -248,8 +248,8 @@ msgid "" "Quickly enable or disable the XR Effect. You may need to enable the effect " "manually once in order to enable the shortcut." msgstr "" -"XRエフェクトの有効・無効を切り替えます。" -"このショートカットを有効にするために手動で1回XRエフェクトを有効にする必要があります。" +"XRエフェクトの有効・無効を切り替えます。このショートカットを有効にするために" +"手動で1回XRエフェクトを有効にする必要があります。" #: src/gtk/connected-device.ui:238 src/gtk/connected-device.ui:267 #: src/gtk/connected-device.ui:296 src/gtk/connected-device.ui:325 diff --git a/ui/po/mo/ja/LC_MESSAGES/breezydesktop.mo b/ui/po/mo/ja/LC_MESSAGES/breezydesktop.mo index 69a3de7..2565915 100644 Binary files a/ui/po/mo/ja/LC_MESSAGES/breezydesktop.mo and b/ui/po/mo/ja/LC_MESSAGES/breezydesktop.mo differ diff --git a/ui/po/pl.po b/ui/po/pl.po index 4d3d8d0..c314dba 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: 2024-10-18 11:45-0700\n" +"POT-Creation-Date: 2024-10-21 12:23-0700\n" "PO-Revision-Date: 2024-08-16 10:26-0700\n" "Last-Translator: \n" "Language-Team: Polish \n" @@ -18,13 +18,13 @@ 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:17 +#: src/connecteddevice.py:20 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "" -#: src/connecteddevice.py:18 +#: src/connecteddevice.py:21 msgid "This feature is not currently supported for your device." msgstr "" diff --git a/ui/po/pt_BR.po b/ui/po/pt_BR.po index d508026..7127362 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: 2024-10-18 11:45-0700\n" +"POT-Creation-Date: 2024-10-21 12:23-0700\n" "PO-Revision-Date: 2024-08-19 09:39-0700\n" "Last-Translator: \n" "Language-Team: Brazilian Portuguese 1);\n" -#: src/connecteddevice.py:17 +#: src/connecteddevice.py:20 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." @@ -26,7 +26,7 @@ msgstr "" "Altera o modo dos óculos para lado a lado (SBS) e dobra a largura da tela " "(ultrawide)." -#: src/connecteddevice.py:18 +#: src/connecteddevice.py:21 msgid "This feature is not currently supported for your device." msgstr "Este recurso não é atualmente suportado para o seu dispositivo." diff --git a/ui/po/ru.po b/ui/po/ru.po index d1649f4..4880c92 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: 2024-10-18 11:45-0700\n" +"POT-Creation-Date: 2024-10-21 12:23-0700\n" "PO-Revision-Date: 2024-08-17 09:39-0700\n" "Last-Translator: \n" "Language-Team: Russian \n" @@ -18,14 +18,14 @@ 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:17 +#: src/connecteddevice.py:20 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "" "Переключает очки в режим «сторона к стороне» и удваивает ширину дисплея." -#: src/connecteddevice.py:18 +#: src/connecteddevice.py:21 msgid "This feature is not currently supported for your device." msgstr "Эта функция в настоящее время не поддерживается для вашего устройства." diff --git a/ui/po/sv.po b/ui/po/sv.po index ba37c96..9067a68 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: 2024-10-18 11:45-0700\n" +"POT-Creation-Date: 2024-10-21 12:23-0700\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:17 +#: src/connecteddevice.py:20 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." @@ -25,7 +25,7 @@ msgstr "" "Växlar dina glasögon till side-by-side-läget och dubblerar bredden på " "visningen." -#: src/connecteddevice.py:18 +#: src/connecteddevice.py:21 msgid "This feature is not currently supported for your device." msgstr "Din enhet stöder inte den här funktionen för tillfället." diff --git a/ui/po/uk_UA.po b/ui/po/uk_UA.po index f03b93c..e883c11 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: 2024-10-18 11:45-0700\n" +"POT-Creation-Date: 2024-10-21 12:23-0700\n" "PO-Revision-Date: 2024-08-17 10:08-0700\n" "Last-Translator: \n" "Language-Team: Ukrainian \n" @@ -18,13 +18,13 @@ 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:17 +#: src/connecteddevice.py:20 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "Переключає окуляри в режим «бок о бок» і подвоює ширину дисплея." -#: src/connecteddevice.py:18 +#: src/connecteddevice.py:21 msgid "This feature is not currently supported for your device." msgstr "Ця функція наразі не підтримується на вашому пристрої." diff --git a/ui/po/zh_CN.po b/ui/po/zh_CN.po index f40dc97..ad5855f 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: 2024-10-18 11:45-0700\n" +"POT-Creation-Date: 2024-10-21 12:23-0700\n" "PO-Revision-Date: 2024-08-02 20:55-0700\n" "Last-Translator: \n" "Language-Team: Chinese (simplified) \n" @@ -16,13 +16,13 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/connecteddevice.py:17 +#: src/connecteddevice.py:20 msgid "" "Switches your glasses into side-by-side mode and doubles the width of the " "display." msgstr "" -#: src/connecteddevice.py:18 +#: src/connecteddevice.py:21 msgid "This feature is not currently supported for your device." msgstr "" diff --git a/ui/src/connecteddevice.py b/ui/src/connecteddevice.py index 9554dcd..9671b77 100644 --- a/ui/src/connecteddevice.py +++ b/ui/src/connecteddevice.py @@ -6,10 +6,13 @@ from .shortcutdialog import bind_shortcut_settings from .statemanager import StateManager from .xrdriveripc import XRDriverIPC import gettext +import logging import threading _ = gettext.gettext +logger = logging.getLogger('breezy_ui') + @Gtk.Template(resource_path='/com/xronlinux/BreezyDesktop/gtk/connected-device.ui') class ConnectedDevice(Gtk.Box): __gtype_name__ = "ConnectedDevice" @@ -101,6 +104,7 @@ class ConnectedDevice(Gtk.Box): self.follow_mode_switch.set_active(self.state_manager.get_property('follow-mode')) self.follow_mode_switch.connect('notify::active', self._refresh_follow_mode) + self._refresh_enabled_state_thread = None self._refresh_enabled_state(); self.effect_enable_switch.connect('notify::active', self._handle_enabled_state) @@ -128,11 +132,14 @@ class ConnectedDevice(Gtk.Box): self.widescreen_mode_row.set_subtitle(subtitle) def _refresh_enabled_state(self): - enabled = self._is_config_enabled(self.ipc.retrieve_config()) and self.extensions_manager.is_enabled() - if enabled != self.effect_enable_switch.get_active(): - self.effect_enable_switch.set_active(enabled) + try: + enabled = self._is_config_enabled(self.ipc.retrieve_config()) and self.extensions_manager.is_enabled() + if enabled != self.effect_enable_switch.get_active(): + self.effect_enable_switch.set_active(enabled) - if self.active: threading.Timer(1.0, self._refresh_enabled_state).start() + self._refresh_enabled_state_thread = threading.Timer(1.0, self._refresh_enabled_state).start() + except Exception as e: + logger.error(f"_refresh_enabled_state {e}") def _is_config_enabled(self, config): return config.get('disabled') == False and 'breezy_desktop' in config.get('external_mode', []) @@ -182,7 +189,9 @@ class ConnectedDevice(Gtk.Box): reload_display_distance_toggle_button(widget) def _on_widget_destroy(self, widget): - self.active = False + if self._refresh_enabled_state_thread: + self._refresh_enabled_state_thread.cancel() + self.state_manager.unbind_property('follow-mode', self.follow_mode_switch, 'active') self.settings.unbind('display-distance', self.display_distance_adjustment, 'value') self.settings.unbind('display-size', self.display_size_adjustment, 'value') diff --git a/ui/src/main.py b/ui/src/main.py index d6543e4..248b558 100644 --- a/ui/src/main.py +++ b/ui/src/main.py @@ -34,7 +34,7 @@ gi.require_version('Adw', '1') gi.require_version('Gio', '2.0') gi.require_version('GLib', '2.0') -from gi.repository import Adw, Gtk, Gio +from gi.repository import Adw, Gtk, Gio, GLib from .licensedialog import LicenseDialog from .statemanager import StateManager from .window import BreezydesktopWindow @@ -64,12 +64,19 @@ sys.excepthook = excepthook XRDriverIPC.set_instance(XRDriverIPC(logger, config_dir)) +if GLib.MAJOR_VERSION * 100 + GLib.MINOR_VERSION >= 274: + APPLICATION_FLAGS = Gio.ApplicationFlags.DEFAULT_FLAGS +else: + # deprecated after Gio version 2.74 + APPLICATION_FLAGS = Gio.ApplicationFlags.FLAGS_NONE + + class BreezydesktopApplication(Adw.Application): """The main application singleton class.""" def __init__(self, version, skip_verification): super().__init__(application_id='com.xronlinux.BreezyDesktop', - flags=Gio.ApplicationFlags.DEFAULT_FLAGS) + flags=APPLICATION_FLAGS) self.version = version self.create_action('quit', self.on_quit_action, ['q'])