Closed emildekeyser closed 2 years ago
Weird those failing methods are part of libdbusmenu, not xapp, though I'm not sure what's causing them to fail.
We use libdbusmenu-gtk3 - it allows us to call dbusmenu_gtkmenu_new (name, menu_obj_path)
to parse menu objects. Though it's a deprecated library, I've never had any significant issue using it, either with appindicator/ayatana clients or straight StatusNotifier implementations.
I have a QSystemTrayIcon script that I use for testing this (it uses StatusNotifier if it's available). There's an appindicator one as well.
Is that project in a state I could build it to try and reproduce this? What desktop/distro are you on? Maybe there are some 3rd party library differences I'm not seeing.
ref: https://github.com/linuxmint/xapp/blob/master/xapp-sn-watcher/sn-item.c#L583
My systray branch on gh builds properly on on Artix (Arch) and on MX Linux (Debian) and runs perfectly on KDE on MX. On Cinnamon it is alright but I just have the mentioned bugs.
On 22/03/16 07:54, Michael Webster wrote:
Weird those failing methods are part of libdbusmenu, not xapp, though I'm not sure what's causing them to fail.
We use libdbusmenu-gtk3 - it allows us to call
dbusmenu_gtkmenu_new (name, menu_obj_path)
to parse menu objects. Though it's a deprecated library, I've never had any significant issue using it, either with appindicator/ayatana clients or straight StatusNotifier implementations.I have a QSystemTrayIcon script that I use for testing this (it uses StatusNotifier if it's available). There's an appindicator one as well.
Is that project in a state I could build it to try and reproduce this? What desktop/distro are you on? Maybe there are some 3rd party library differences I'm not seeing.
ref: https://github.com/linuxmint/xapp/blob/master/xapp-sn-watcher/sn-item.c#L583
-- Reply to this email directly or view it on GitHub: https://github.com/linuxmint/xapp/issues/153#issuecomment-1069214558 You are receiving this because you authored the thread.
Message ID: @.***>
I can't get it to build in Mint 20 (Ubuntu 20.04) - I get:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/mtwebster/bin/dino-fork/libdino/src/dbus/status_notifier_item.vala:149.9-149.40: error: Argument 1: Cannot convert from `int' to `unowned string'
foreach(var entry in properties) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- but, I think the problem is libdbusmenu is expecting you to implement AboutToShowGroup
and EventGroup
- for whatever reason it seems to want to use those instead of the singulars AboutToShow
and Event
. They look approximately the same except the Group variants send an array of the their respective parameters. From what I read this is done for optimization purposes (sending and backlogged events in one call rather than numerous dbus calls).
https://github.com/AyatanaIndicators/libdbusmenu/blob/master/libdbusmenu-glib/dbus-menu.xml
Oh I see, that seems to be a pretty straitforward fix. I will look into it. Thanks alot for taking a look at it!
On 22/03/16 10:07, Michael Webster wrote:
I can't get it to build in Mint 20 (Ubuntu 20.04) - I get:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /home/mtwebster/bin/dino-fork/libdino/src/dbus/status_notifier_item.vala:149.9-149.40: error: Argument 1: Cannot convert from `int' to `unowned string' foreach(var entry in properties) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- but, I think the problem is libdbusmenu is expecting you to implement
AboutToShowGroup
andEventGroup
- for whatever reason it seems to want to use those instead of the singularsAboutToShow
andEvent
. They look approximately the same except the Group variants send an array of the their respective parameters. From what I read this is done for optimization purposes (sending and backlogged events in one call rather than numerous dbus calls).https://github.com/AyatanaIndicators/libdbusmenu/blob/master/libdbusmenu-glib/dbus-menu.xml
-- Reply to this email directly or view it on GitHub: https://github.com/linuxmint/xapp/issues/153#issuecomment-1069364092 You are receiving this because you authored the thread.
Message ID: @.***>
Okay I implmeneted EventGroup and now it works, thanks for guidance! You can mark this as resolved for me.
Cool, any time.
I am working on adding systray support to an XMPP client and one of my targets is Cinnamon. I use a StatusNotifierItem DBus api in Vala. The icon shows up, left click activate works and on right click the menu also shows. But when I click any of the menu items they do nothing. It does work on KDE.
links to the code: https://github.com/emildekeyser/dino-fork/blob/systray/libdino/src/dbus/status_notifier_item.vala https://github.com/emildekeyser/dino-fork/blob/systray/main/src/ui/application.vala#L134
dbus-monitor output on right click:
dbus-monitor output on menu item click: