Skip to content

fix: use ayatana_app_indicator_new to fix deprecated warning - #292

Open
sandikodev wants to merge 1 commit into
getlantern:masterfrom
sandikodev:fix/deprecated-app-indicator
Open

sandikodev wants to merge 1 commit into
getlantern:masterfrom
sandikodev:fix/deprecated-app-indicator

Conversation

@sandikodev

@sandikodev sandikodev commented Jul 20, 2026 •

Copy link
Copy Markdown

The Ayatana header marks app_indicator_new as deprecated in favor of ayatana_app_indicator_new. This causes a -Wdeprecated-declarations warning in every project that uses this module on Linux.

This PR uses the non-deprecated function when building with the Ayatana header (the default). The legacy USE_LEGACY_APPINDICATOR path still uses the old function name for backwards compatibility.

Summary by CodeRabbit

  • Bug Fixes
    • Improved Linux system tray compatibility across supported app indicator implementations.
    • Preserved existing tray initialization, menu setup, and ready-state behavior.

The Ayatana header marks app_indicator_new as deprecated in favor of
ayatana_app_indicator_new. Use the non-deprecated function when building
with the Ayatana header (the default). The legacy appindicator path
still uses the old function name for backwards compatibility.
@coderabbitai

coderabbitai Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 03515697-9d99-42a6-97b0-4c1fb9158cb5

📥 Commits

Reviewing files that changed from the base of the PR and between 22c167e and 009d2c5.

📒 Files selected for processing (1)
  • systray_linux.c

📝 Walkthrough

Walkthrough

Changes

Linux system tray initialization

Layer / File(s) Summary
Compile-time app indicator selection
systray_linux.c
registerSystray() uses app_indicator_new when USE_LEGACY_APPINDICATOR is defined and ayatana_app_indicator_new otherwise; subsequent initialization remains unchanged.

Estimated code review effort: 2 (Simple) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: switching to ayatana_app_indicator_new to address a deprecated warning, with legacy compatibility preserved.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant