AppIndicator3 demo
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 491
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Description
I tried to make a demo application that uses AppIndicator3 library. That's what I got so far:
local lgi = require 'lgi'
local GLib, Gtk, Gdk, Gio, GObject = lgi.GLib, lgi.Gtk, lgi.Gdk, lgi.Gio, lgi.GObject
local AppIndicator = lgi.AppIndicator3
local app = Gio.Application { application_id = 'org.lgi.appindicator3' }
local menu = Gtk.Menu()
menu:append(
Gtk.MenuItem {
label = 'Exit';
on_activate = function() app:release() end;
sensitive = true;
}
)
function app:on_activate()
local ind = AppIndicator.Indicator.new(app.application_id, 'gtk-info', 'SYSTEM_SERVICES')
ind:set_menu(menu)
ind:set_status('ACTIVE')
app:hold()
end
app:run({arg[0], ...})
I expect it to show icon with single drop-down option "Exit". What I get, however, is icon with empty menu (no Exit option).
What could be a problem here? If it matters, I'm using cinnamon with indicators support turned on.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the demo's app:on_activate entry point and the AppIndicator.Indicator.new and set_menu calls. Reproduce the empty menu under Cinnamon with indicator support enabled, then trace why the appended Gtk.MenuItem is not displayed; done when the indicator shows the Exit option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100