hrev44403 adds 1 changeset to branch 'master' old head: e2c343a22a731d4ec7f6ede64adb36dbf275021e new head: 003dedca933ed3bd3afc8f9bc7f27dba679a61f3 ---------------------------------------------------------------------------- 003dedc: Fix #8768. - When invoking ProcessController's menu, we now only show the "Live in Deskbar" menu item if we're either running within Deskbar itself or from PC's standalone window. This allows replicant PC instances to be usable in the case where Deskbar is deadlocked for whatever reason (previously it would hang while trying to query for the deskbar item's presence/status). [ Rene Gollent <anevilyak@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev44403 Commit: 003dedca933ed3bd3afc8f9bc7f27dba679a61f3 URL: http://cgit.haiku-os.org/haiku/commit/?id=003dedc Author: Rene Gollent <anevilyak@xxxxxxxxx> Date: Tue Jul 24 23:09:53 2012 UTC Ticket: https://dev.haiku-os.org/ticket/8768 ---------------------------------------------------------------------------- 1 file changed, 23 insertions(+), 8 deletions(-) src/apps/processcontroller/ProcessController.cpp | 31 +++++++++++++----- ---------------------------------------------------------------------------- diff --git a/src/apps/processcontroller/ProcessController.cpp b/src/apps/processcontroller/ProcessController.cpp index 1a5d5d2..48f7797 100644 --- a/src/apps/processcontroller/ProcessController.cpp +++ b/src/apps/processcontroller/ProcessController.cpp @@ -772,16 +772,31 @@ thread_popup(void *arg) addtopbottom(new BSeparatorItem()); - 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 ()); + int32 cookie = 0; + image_info info; + while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) { + if (info.type == B_APP_IMAGE) { + // only show the Live in Deskbar item if a) we're running in + // deskbar itself, or b) we're running in PC's team. + if (strstr(info.name, "Deskbar") == NULL + && strstr(info.name, "ProcessController") == NULL) { + 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 ()); + } + } } + item = new IconMenuItem(gPCView->fProcessControllerIcon, B_TRANSLATE("About ProcessController"B_UTF8_ELLIPSIS), new BMessage(B_ABOUT_REQUESTED));