Hie
For my GSoC project, I'm experimenting with creating a Dymanic menu which
will be added to the Tracker's Root Menu be an addon.
I was able to pass the BMenu pointer in order to populate menu and I was
also able to populate menu.
But I wasn't able to do implement what happens on clicking the menu item.
(Basically on click event of the items added).
I first created a Fake Window and overrided it's MessageReceived function
to call my function. And then SetTarget of menu to this window.
This didn't work.
Then I created a class inherited from BMenu and overrided the
MessageReceived function. And SetTargetForItems as this.
This also didn't work.
In both the cases, MessageReceived is not being called. I think I'm missing
something.
The modified haiku source is at https://github.com/Hrily/haiku
The modified file is
https://github.com/Hrily/haiku/blob/1bee79120528742e33727f694d021d6b350bb181/src/kits/tracker/ContainerWindow.cpp#L182
The source for addon is at https://github.com/Hrily/haiku_addon
Thank you
Regards
Hrishikesh Hiraskar