Should have been part of yesterday's Deskbar changes.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43019 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2011-10-31 07:07:43 +00:00
parent 48215ce467
commit 1ea897d0ab

View File

@ -277,21 +277,8 @@ BDeskbar::AddItem(entry_ref *addon, int32 *_id)
BMessage request(kMsgAddAddOn);
request.AddRef("addon", addon);
// Note: to make Deskbar items persistent, they need to have the attribute
// set. The Deskbar will remove the attribute automatically when needed.
// ToDo: move this functionality into the Deskbar itself!
BNode node;
status_t status = node.SetTo(addon);
if (status < B_OK)
return status;
if ((status = node.WriteAttr("be:deskbar_item_status", B_STRING_TYPE,
0, "enabled", strlen("enabled"))) < B_OK)
return status;
BMessage reply;
status = fMessenger->SendMessage(&request, &reply);
status_t status = fMessenger->SendMessage(&request, &reply);
if (status == B_OK) {
if (_id != NULL)
status = reply.FindInt32("id", _id);