Slight cleanup of previous commit.

This commit is contained in:
Rene Gollent 2012-07-24 19:23:39 -04:00
parent 003dedca93
commit 542ee07706

View File

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