feat(identity): rename user-visible identity to voculinux with one-time legacy import
The fork takes its own name everywhere a user can see it: binaries (voculinux, voculinux-gui), desktop entry, autostart, tray, D-Bus namespace (com.voculinux.Voculinux, no alias for the old name), config/data/cache dirs, single-instance lock, IBus engine identity, tray icons, resource prefixes, VOCULINUX_* environment names, and the update-checker user agent. The internal Python module stays vocalinux and the distribution metadata keeps the upstream URLs as provenance. On first run a previous Vocalinux install's config.json, custom dictionary, and portal restore token are copied once into the new locations (new config always wins, no merge, no write-back); models re-resolve through the pinned-checksum download path. An offline naming-sweep test proves no old-name strings remain on user-visible surfaces outside the allowlist. Refs #18
This commit is contained in:
@@ -120,10 +120,10 @@ class TestTrayIndicator(unittest.TestCase):
|
||||
self.patcher_listdir = patch(
|
||||
"os.listdir",
|
||||
return_value=[
|
||||
"vocalinux.svg",
|
||||
"vocalinux-microphone-off.svg",
|
||||
"vocalinux-microphone.svg",
|
||||
"vocalinux-microphone-process.svg",
|
||||
"voculinux.svg",
|
||||
"voculinux-microphone-off.svg",
|
||||
"voculinux-microphone.svg",
|
||||
"voculinux-microphone-process.svg",
|
||||
],
|
||||
)
|
||||
self.mock_listdir = self.patcher_listdir.start()
|
||||
@@ -350,7 +350,7 @@ class TestTrayIndicator(unittest.TestCase):
|
||||
|
||||
self.tray_indicator._cancel_menu_item.set_sensitive.assert_called_with(False)
|
||||
self.tray_indicator._cancel_menu_item.set_visible.assert_called_with(False)
|
||||
self.tray_indicator.indicator.set_title.assert_called_with("Vocalinux")
|
||||
self.tray_indicator.indicator.set_title.assert_called_with("Voculinux")
|
||||
|
||||
def test_cancel_tooltip_uses_fallback_without_shortcut_name(self) -> None:
|
||||
self.tray_indicator.indicator = MagicMock()
|
||||
@@ -728,7 +728,7 @@ class TestTrayIndicator(unittest.TestCase):
|
||||
with patch.object(_resource_manager, "validate_resources") as mock_validate:
|
||||
mock_validate.return_value = {
|
||||
"resources_dir_exists": True,
|
||||
"missing_icons": ["vocalinux.svg"],
|
||||
"missing_icons": ["voculinux.svg"],
|
||||
"missing_sounds": [],
|
||||
}
|
||||
self.tray_indicator._validate_resources()
|
||||
@@ -1220,7 +1220,7 @@ class TestTrayIndicator(unittest.TestCase):
|
||||
)
|
||||
|
||||
def test_overlay_close_request_quits_app(self):
|
||||
"""A dock/taskbar close of the overlay window quits Vocalinux (#1028)."""
|
||||
"""A dock/taskbar close of the overlay window quits Voculinux (#1028)."""
|
||||
self.assertEqual(self.tray_indicator.overlay._on_close_request, self.tray_indicator._quit)
|
||||
|
||||
def test_quit_destroys_overlay(self):
|
||||
@@ -1355,7 +1355,7 @@ class TestTrayIndicatorFlatpakIcons(unittest.TestCase):
|
||||
|
||||
Inside a Flatpak the StatusNotifier host runs outside the sandbox and resolves
|
||||
icons from the exported ``<app-id>-*`` theme, so the indicator must reference
|
||||
those names rather than the bundled ``vocalinux-*`` names.
|
||||
those names rather than the bundled ``voculinux-*`` names.
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
@@ -1369,18 +1369,18 @@ class TestTrayIndicatorFlatpakIcons(unittest.TestCase):
|
||||
|
||||
with patch.object(tray, "FLATPAK_ID", None):
|
||||
names = tray._themed_icon_names()
|
||||
self.assertEqual(names["default"], "vocalinux-microphone-off")
|
||||
self.assertEqual(names["active"], "vocalinux-microphone")
|
||||
self.assertEqual(names["processing"], "vocalinux-microphone-process")
|
||||
self.assertEqual(names["default"], "voculinux-microphone-off")
|
||||
self.assertEqual(names["active"], "voculinux-microphone")
|
||||
self.assertEqual(names["processing"], "voculinux-microphone-process")
|
||||
|
||||
def test_themed_icon_names_inside_flatpak(self):
|
||||
import vocalinux.ui.tray_indicator as tray
|
||||
|
||||
with patch.object(tray, "FLATPAK_ID", "com.vocalinux.Vocalinux"):
|
||||
with patch.object(tray, "FLATPAK_ID", "com.voculinux.Voculinux"):
|
||||
names = tray._themed_icon_names()
|
||||
self.assertEqual(names["default"], "com.vocalinux.Vocalinux-microphone-off")
|
||||
self.assertEqual(names["active"], "com.vocalinux.Vocalinux-microphone")
|
||||
self.assertEqual(names["processing"], "com.vocalinux.Vocalinux-microphone-process")
|
||||
self.assertEqual(names["default"], "com.voculinux.Voculinux-microphone-off")
|
||||
self.assertEqual(names["active"], "com.voculinux.Voculinux-microphone")
|
||||
self.assertEqual(names["processing"], "com.voculinux.Voculinux-microphone-process")
|
||||
|
||||
|
||||
class TestAppIndicatorImportFallback(unittest.TestCase):
|
||||
@@ -1447,7 +1447,7 @@ class TestAppIndicatorImportFallback(unittest.TestCase):
|
||||
AyatanaAppIndicator3=sentinel,
|
||||
)
|
||||
|
||||
with patch.dict(os.environ, {"APPDIR": "/tmp/.mount_vocalinux"}):
|
||||
with patch.dict(os.environ, {"APPDIR": "/tmp/.mount_voculinux"}):
|
||||
import vocalinux.ui.tray_indicator as tray
|
||||
|
||||
self.assertIs(tray.AppIndicator, sentinel)
|
||||
@@ -1519,7 +1519,7 @@ class TestIndicatorBackendWiring(TestTrayIndicator):
|
||||
patch(
|
||||
"vocalinux.ui.tray_indicator.AppIndicator.Indicator.new", return_value=raw
|
||||
) as new,
|
||||
patch("vocalinux.ui.tray_indicator.FLATPAK_ID", "com.vocalinux.Vocalinux"),
|
||||
patch("vocalinux.ui.tray_indicator.FLATPAK_ID", "com.voculinux.Voculinux"),
|
||||
):
|
||||
self.tray_indicator._init_indicator()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user