diff --git a/distro-packages/Arch-Linux/PKGBUILD b/distro-packages/Arch-Linux/PKGBUILD index 2f40a3f..b4ee574 100644 --- a/distro-packages/Arch-Linux/PKGBUILD +++ b/distro-packages/Arch-Linux/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Storm Dragon pkgname=cthulhu -pkgver=2026.01.10 +pkgver=2026.01.12 pkgrel=1 pkgdesc="Desktop-agnostic screen reader with plugin system, forked from Orca" url="https://git.stormux.org/storm/cthulhu" diff --git a/meson.build b/meson.build index 3be58d2..ac9ee02 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('cthulhu', - version: '2026.01.10-master', + version: '2026.01.12-testing', meson_version: '>= 1.0.0', ) diff --git a/src/cthulhu/cthulhuVersion.py b/src/cthulhu/cthulhuVersion.py index d2c567a..60f7abd 100644 --- a/src/cthulhu/cthulhuVersion.py +++ b/src/cthulhu/cthulhuVersion.py @@ -23,5 +23,5 @@ # Forked from Orca screen reader. # Cthulhu project: https://git.stormux.org/storm/cthulhu -version = "2026.01.10" -codeName = "master" +version = "2026.01.12" +codeName = "testing" diff --git a/src/cthulhu/cthulhu_gtkbuilder.py b/src/cthulhu/cthulhu_gtkbuilder.py index d676bb7..747bd11 100644 --- a/src/cthulhu/cthulhu_gtkbuilder.py +++ b/src/cthulhu/cthulhu_gtkbuilder.py @@ -32,6 +32,8 @@ __copyright__ = "Copyright (c) 2005-2009 Sun Microsystems Inc." __license__ = "LGPL" import gettext +import importlib.resources as resources +import os from gi.repository import Gtk from .cthulhu_i18n import _ @@ -52,7 +54,7 @@ class GtkBuilderWrapper: # Load GtkBuilder file. self.builder = Gtk.Builder() self.builder.set_translation_domain(gettext.textdomain()) - self.builder.add_from_file(fileName) + self._add_builder_from_file(fileName) self.gtkWindow = self.builder.get_object(windowName) # Force the localization of widgets to work around a GtkBuilder @@ -69,6 +71,24 @@ class GtkBuilderWrapper: instance_attributes[attribute] = getattr(self, attribute) self.builder.connect_signals(instance_attributes) + def _add_builder_from_file(self, fileName): + if os.path.exists(fileName): + self.builder.add_from_file(fileName) + return + + resourceName = os.path.basename(fileName) + try: + uiPath = resources.files(__package__).joinpath(resourceName) + except Exception: + uiPath = None + + if uiPath and uiPath.is_file(): + with resources.as_file(uiPath) as resolvedPath: + self.builder.add_from_file(str(resolvedPath)) + return + + self.builder.add_from_file(fileName) + def set_cthulhu_icon(self): """Get the icon in all sizes from the current theme and set them as default for all application windows.