[haiku-3rdparty-dev] Re: Adding a (persistant) Replicant to the Deskbar

  • From: Brian Hill <brianh@xxxxxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Fri, 17 Mar 2017 07:22:00 -0400


On Mar 17, 2017, at 7:09 AM, Rene Gollent <anevilyak@xxxxxxxxx> wrote:

From the attached sample code, I would hazard a guess that your app is
missing the instantiation function. A persistent deskbar add-on must
export a C function called instantiate_deskbar_item() which returns a
BView that Deskbar can call in order to rebuild the view from the
binary in question, otherwise Deskbar would have no idea how to
reconstruct it on restart. For an example, see
http://cgit.haiku-os.org/haiku/tree/src/apps/processcontroller/ProcessController.cpp#n140

Ah ha!
https://github.com/haiku/haiku/blob/master/src/apps/networkstatus/NetworkStatusView.cpp#L575
 
<https://github.com/haiku/haiku/blob/master/src/apps/networkstatus/NetworkStatusView.cpp#L575>

-Brian

Other related posts: