Skip to content

fix(gtk): send results reach the desktop on GNOME - #354

Merged
zackb merged 1 commit into
zackb:mainfrom
fernando2393:pr/send-result-notifications
Nov 25, 2026
Merged

zackb merged 1 commit into
zackb:mainfrom
fernando2393:pr/send-result-notifications

Conversation

@fernando2393

Copy link
Copy Markdown
Contributor

Problem

Send results in the GTK app ("No device is connected.", "Folders can't be sent", the final sent/failed message) are posted as a GNotification. GNOME only shows those for an app id that has a matching desktop file, and native installs ship tether-gtk.desktop, not io.github.zackb.tether.desktop, so GNOME drops every one of them: org.gtk.Notifications.AddNotification answers InvalidApp: The app by ID "io.github.zackb.tether" could not be found. Only the Flatpak, which renames the desktop file, shows them. A send started from a file manager with no phone connected therefore did nothing visible.

They were also only shown while the window was hidden, so with the window open behind a file manager the result was a status-bar line nobody sees.

Change

  • The helper calls org.freedesktop.Notifications.Notify directly, with the tether-gtk desktop entry, the way the daemon's popups already do. Repeated results replace the previous one, as the fixed GNotification id did.
  • It is skipped only while the window is visible and focused.
  • A failed send is titled "File not sent", with the reason as the body. One new string, translated in all 15 catalogs.

Renaming the desktop file to the app id would also fix it, but it would break existing users' dock pins and the metainfo launchable, so I left that alone.

Testing

On Ubuntu 26.04 / GNOME 50, native build: with the iPhone app closed, tether-gtk --send <file> now shows "File not sent / No device is connected."; before, nothing. update-pot.sh --check and check-catalogs.sh pass.

🤖 Generated with Claude Code

Send results ("No device is connected.", folders skipped, sent or
failed) were posted as a GNotification. GNOME only shows those for an
app id with a matching desktop file, and native installs ship
tether-gtk.desktop, not io.github.zackb.tether.desktop, so GNOME dropped
them all (org.gtk.Notifications answers InvalidApp). Only the Flatpak,
which renames the desktop file, showed them.

They now go to the notification server directly, with the
tether-gtk desktop entry, as the daemon's popups do. They are also shown
when the window is open but not focused, since a send started from a
file manager leaves the window behind it. A send that fails is titled
"File not sent".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zackb
zackb merged commit 9475ed0 into zackb:main Nov 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants