Slight cleanup of previous commit.
This commit is contained in:
@@ -772,29 +772,31 @@ thread_popup(void *arg)
|
|||||||
|
|
||||||
addtopbottom(new BSeparatorItem());
|
addtopbottom(new BSeparatorItem());
|
||||||
|
|
||||||
|
bool showLiveInDeskbarItem = gInDeskbar;
|
||||||
|
if (!showLiveInDeskbarItem) {
|
||||||
int32 cookie = 0;
|
int32 cookie = 0;
|
||||||
image_info info;
|
image_info info;
|
||||||
while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
|
while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
|
||||||
if (info.type == B_APP_IMAGE) {
|
if (info.type == B_APP_IMAGE) {
|
||||||
// only show the Live in Deskbar item if a) we're running in
|
// only show the Live in Deskbar item if a) we're running in
|
||||||
// deskbar itself, or b) we're running in PC's team.
|
// deskbar itself, or b) we're running in PC's team.
|
||||||
if (strstr(info.name, "Deskbar") == NULL
|
if (strstr(info.name, "ProcessController") != NULL) {
|
||||||
&& strstr(info.name, "ProcessController") == NULL) {
|
showLiveInDeskbarItem = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (be_roster->IsRunning(kDeskbarSig)) {
|
if (showLiveInDeskbarItem && be_roster->IsRunning(kDeskbarSig)) {
|
||||||
item = new BMenuItem(B_TRANSLATE("Live in the Deskbar"),
|
item = new BMenuItem(B_TRANSLATE("Live in the Deskbar"),
|
||||||
new BMessage('AlDb'));
|
new BMessage('AlDb'));
|
||||||
BDeskbar deskbar;
|
BDeskbar deskbar;
|
||||||
item->SetMarked(gInDeskbar
|
item->SetMarked(gInDeskbar || deskbar.HasItem(kDeskbarItemName));
|
||||||
|| deskbar.HasItem(kDeskbarItemName));
|
|
||||||
item->SetTarget(gPCView);
|
item->SetTarget(gPCView);
|
||||||
addtopbottom(item);
|
addtopbottom(item);
|
||||||
addtopbottom(new BSeparatorItem ());
|
addtopbottom(new BSeparatorItem ());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
item = new IconMenuItem(gPCView->fProcessControllerIcon,
|
item = new IconMenuItem(gPCView->fProcessControllerIcon,
|
||||||
|
|||||||
Reference in New Issue
Block a user