2 Commits

Author SHA1 Message Date
Storm Dragon
c510f5a45c Forgot to add pyproject.toml. 2026-01-12 23:53:47 -05:00
Storm Dragon
935ba33081 Version bump for testing. 2026-01-12 23:52:57 -05:00
5 changed files with 26 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
# Maintainer: Storm Dragon <storm_dragon@stormux.org>
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"

View File

@@ -1,5 +1,5 @@
project('cthulhu',
version: '2026.01.10-master',
version: '2026.01.12-testing',
meson_version: '>= 1.0.0',
)

View File

@@ -25,3 +25,4 @@ path = "src/cthulhu/__init__.py"
[tool.hatch.build.targets.wheel]
packages = ["src/cthulhu"]
include = ["src/cthulhu/*.ui"]

View File

@@ -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"

View File

@@ -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.