On Mar 17, 2017, at 4:38 AM, Humdinger (Redacted sender "humdingerb" forDo you have older QuickLaunch binaries hanging around? Perhaps deskbar is
DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:
Hello there,
I have a problem getting a replicant added to the Deskbar, that stays there
after a reboot.
The replicant is super simple, no functionality but launching the app itself.
I get my inspirations from "desklink" and PowerStatus, NetworkStatus etc.
This is the code (hope the formatting sticks):
The output I get is:
info_name:
/HiQ-Data/projects/humdinger_projects/quicklaunch/objects.x86-cc2-debug/QuickLaunch,
ref_name: QuickLaunch, id: 0
err: -2147483641
So, the get_ref_for_path seems to be right, the ref_name, too. But the
returned id is 0.
deskbar.AddItem(&ref, &id) fails apparently, the error returned is "Name not
found".
After that failure, the deskbar.AddItem(new DeskButton...) - which ISo looks like the replicant view is archiving and instantiating correctly,
appropriated from "desklink" - does actually work. The icon is added and
starts QuickLaunch on a click. But the replicant is never added to
/boot/home/config/settings/deskbar/replicants and doesn't survive a reboot.
Here is what I did for Notification server:
So... why does the deskbar.AddItem(&ref, &id) fail? And how is a replicant
added to the Deskbar that will survive reboots?
NetworkStatus appears to do the same AddItem(&ref) as my code (I tried
without the id,too), but succeeds:
http://xref.plausible.coop/source/xref/haiku/src/apps/networkstatus/NetworkStatus.cpp#189
<http://xref.plausible.coop/source/xref/haiku/src/apps/networkstatus/NetworkStatus.cpp#189>