Adding menu item Restart Tracker, to be shown when Tracker isn't running.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35805 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jonas Sundström 2010-03-10 22:25:01 +00:00
parent 7bd66e4347
commit f2a68969a4
3 changed files with 18 additions and 1 deletions

View File

@ -507,6 +507,13 @@ TBarApp::MessageReceived(BMessage* message)
run_be_about();
break;
case kRestartTracker:
{
BRoster roster;
roster.Launch(kTrackerSignature);
break;
}
default:
BApplication::MessageReceived(message);
break;

View File

@ -79,6 +79,7 @@ const uint32 kSortRunningApps = 'SAps';
const uint32 kSuperExpando = 'SprE';
const uint32 kExpandNewTeams = 'ExTm';
const uint32 kAutoRaise = 'AtRs';
const uint32 kRestartTracker = 'TRAK';
// from roster_private.h
const uint32 kShutdownSystem = 301;

View File

@ -48,6 +48,7 @@ All rights reserved.
#include "PublicCommands.h"
#include "RecentItems.h"
#include "StatusView.h"
#include "tracker_private.h"
#define ROSTER_SIG "application/x-vnd.Be-ROST"
@ -222,7 +223,15 @@ TBeMenu::AddStandardBeMenuItems()
if (fBarView)
dragging = fBarView->Dragging();
BMenuItem* item = new BMenuItem(
BMenuItem* item;
BRoster roster;
if (!roster.IsRunning(kTrackerSignature)) {
item = new BMenuItem("Restart Tracker", new BMessage(kRestartTracker));
AddItem(item);
AddSeparatorItem();
}
item = new BMenuItem(
#ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL
"About Haiku"
#else