Commit f0ae9288 authored by Kourser's avatar Kourser
Browse files

Linux: show the tray icon on Ubuntu (package 1.3.0-3)

The AppIndicator typelib was only recommended; installed without it (App
Center, dpkg -i), Envorenn fell back to Gtk.StatusIcon, which GNOME does not
show. It is now a dependency (ayatana, or the older appindicator). The tray
icon ships with Envorenn instead of coming from the icon theme, a log line
says whether a host shows it, and the settings tab explains what to do when
none does. Download links point to 1.3.0-3.

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent 688c0c1f
Loading
Loading
Loading
Loading
+4 −2
Changes for CHANGELOG.md: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -25,8 +25,10 @@ applications iPhone, iPad et Mac sont en test sur TestFlight (build 20).
  note ouverte, ou dans la note du jour, créée au besoin. Dans les réglages :
  afficher l’icône, destination par défaut, ouverture à la session. Sur Linux,
  l’icône passe par AppIndicator (sous GNOME, avec l’extension AppIndicator) et
  les captures par le portail XDG ou l’outil de capture installé ; paquets
  Debian 1.3.0-2.
  les captures par le portail XDG ou l’outil de capture installé. Paquets
  Debian 1.3.0-3 : la bibliothèque AppIndicator devient une dépendance (sans
  elle, l’icône n’apparaissait pas sous Ubuntu) et l’icône est livrée avec
  Envorenn.

## 1.2.0 — 20 novembre 2026

+1 −1
Changes for Linux/README.md: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ même format de coffre que les applications iOS et macOS.
Depuis le dossier du paquet, lancer la commande correspondant à la machine.

```sh
sudo apt install ./envorenn_1.3.0-2_amd64.deb
sudo apt install ./envorenn_1.3.0-3_amd64.deb
```

Utiliser le fichier `arm64` sur ARM 64 bits. Ouvrir **Envorenn** depuis le menu
+5 −2
Changes for Linux/build-deb.sh: 5 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -54,6 +54,9 @@ done
install -Dm755 "$linux_dir/envorenn" "$share/envorenn"
install -Dm644 "$linux_dir/style.css" "$share/style.css"
install -Dm644 "$linux_dir/translations.json" "$share/translations.json"
# L'icône de la zone de notification, cherchée dans ce dossier par capture.py.
install -Dm644 "$linux_dir/icons/hicolor/scalable/apps/envorenn-tray-symbolic.svg" \
    "$share/icons/hicolor/scalable/apps/envorenn-tray-symbolic.svg"
# Tous les modules de l'interface, sauf les tests : un module oublié ici
# empêchait l'application de démarrer.
for module in "$linux_dir"/*.py; do
@@ -85,8 +88,8 @@ Priority: optional
Architecture: $arch
Maintainer: Envorenn
Installed-Size: $(du -sk "$stage/usr" | cut -f1)
Depends: python3, python3-gi, python3-gi-cairo, gir1.2-gtk-3.0, ffmpeg, curl, ca-certificates, libsecret-tools, poppler-utils, $libraries
Recommends: gir1.2-ayatanaappindicator3-0.1, xdg-desktop-portal
Depends: python3, python3-gi, python3-gi-cairo, gir1.2-gtk-3.0, gir1.2-ayatanaappindicator3-0.1 | gir1.2-appindicator3-0.1, ffmpeg, curl, ca-certificates, libsecret-tools, poppler-utils, $libraries
Recommends: xdg-desktop-portal
Description: journal personnel et souvenirs vocaux
 Écrivez et retrouvez vos notes Markdown et vos mémos vocaux.
 Avec synchronisation Nextcloud, agenda CalDAV et transcription locale.
+29 −1
Changes for Linux/capture.py: 29 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ import os
from pathlib import Path
import shutil
import subprocess
import sys
import threading
from urllib.parse import unquote, urlparse
from uuid import uuid4
@@ -29,7 +30,12 @@ import editor
import importers

APP_ID = "eu.cythin.envorenn"
ICON = "document-edit-symbolic"
SHARE = Path(__file__).resolve().parent
# L'icône livrée avec Envorenn, pour ne pas dépendre du thème installé ; sinon
# (lancement depuis les sources), celle du thème.
ICON_THEME = SHARE / "icons"
ICON = "envorenn-tray-symbolic" if (ICON_THEME / "hicolor/scalable/apps/envorenn-tray-symbolic.svg").is_file() \
    else "document-edit-symbolic"
DESTINATIONS = [("current", _("Note en cours")), ("today", _("Note du jour")), ("newEntry", _("Nouvelle entrée"))]
MAXIMUM_PHOTOS = 10
AUTOSTART = Path(os.environ.get("XDG_CONFIG_HOME") or Path.home() / ".config") / "autostart" / f"{APP_ID}.desktop"
@@ -276,6 +282,8 @@ class Capture:
        if INDICATOR is not None:
            if self.indicator is None:
                self.indicator = INDICATOR.Indicator.new(APP_ID, ICON, INDICATOR.IndicatorCategory.APPLICATION_STATUS)
                if ICON_THEME.is_dir():
                    self.indicator.set_icon_theme_path(str(ICON_THEME))
                self.indicator.set_title(_("Capture Envorenn"))
                try:
                    self.connected = bool(self.indicator.get_property("connected"))
@@ -288,8 +296,11 @@ class Capture:
            self.indicator.set_menu(menu)
            self.indicator.set_status(INDICATOR.IndicatorStatus.ACTIVE if self.enabled()
                                      else INDICATOR.IndicatorStatus.PASSIVE)
            GLib.timeout_add_seconds(3, self.report)
            return
        if self.status_icon is None:
            if ICON_THEME.is_dir():
                Gtk.IconTheme.get_default().append_search_path(str(ICON_THEME))
            self.status_icon = Gtk.StatusIcon.new_from_icon_name(ICON)
            self.status_icon.set_title(_("Capture Envorenn"))
            self.status_icon.set_tooltip_text(_("Capture Envorenn"))
@@ -297,6 +308,19 @@ class Capture:
            self.status_icon.connect("popup-menu", lambda icon, button, time: self.popup(icon, button, time))
        self.menu = menu
        self.status_icon.set_visible(self.enabled())
        GLib.timeout_add_seconds(3, self.report)

    def backend(self):
        if INDICATOR is not None:
            return INDICATOR.__name__.rsplit(".", 1)[-1]
        return "Gtk.StatusIcon"

    def report(self):
        """Une ligne dans le journal : de quoi comprendre une icône absente."""
        if self.enabled():
            print(f"Envorenn : icône de notification via {self.backend()}, "
                  f"{'affichée' if self.keeps_running() else 'aucun hôte ne l’affiche'}", file=sys.stderr, flush=True)
        return False

    def connection_changed(self, _indicator, connected, *_rest):
        self.connected = bool(connected)
@@ -544,6 +568,10 @@ def settings_page(notebook, window):
    if INDICATOR is None:
        grid.attach(note(_("Pour afficher l’icône sous GNOME ou KDE, installez le paquet "
                           "gir1.2-ayatanaappindicator3-0.1.")), 0, 4, 2, 1)
    elif capture.enabled() and not capture.keeps_running():
        grid.attach(note(_("Aucune zone de notification n’affiche l’icône pour l’instant. Sous GNOME, activez "
                           "l’extension « AppIndicator and KStatusNotifierItem Support » (déjà installée sur "
                           "Ubuntu), puis relancez Envorenn.")), 0, 4, 2, 1)
    else:
        grid.attach(note(_("Sous GNOME, l’icône demande l’extension « AppIndicator and KStatusNotifierItem "
                           "Support ».")), 0, 4, 2, 1)
+5
Changes for Linux/icons/hicolor/scalable/apps/envorenn-tray-symbolic.svg: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
  <!-- Icône de la zone de notification : un carré et un crayon, comme sur le Mac. -->
  <path fill="#2e3436" d="M3 2.5A1.5 1.5 0 0 0 1.5 4v8.5A1.5 1.5 0 0 0 3 14h8.5a1.5 1.5 0 0 0 1.5-1.5V8h-1.5v4.5h-8.5V4H8V2.5z"/>
  <path fill="#2e3436" d="M12.6 1.4a1.4 1.4 0 0 1 2 2L9.1 8.9 6.5 9.5l.6-2.6z"/>
</svg>
Loading