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
+7
View File
@@ -507,6 +507,13 @@ TBarApp::MessageReceived(BMessage* message)
run_be_about(); run_be_about();
break; break;
case kRestartTracker:
{
BRoster roster;
roster.Launch(kTrackerSignature);
break;
}
default: default:
BApplication::MessageReceived(message); BApplication::MessageReceived(message);
break; break;
+1
View File
@@ -79,6 +79,7 @@ const uint32 kSortRunningApps = 'SAps';
const uint32 kSuperExpando = 'SprE'; const uint32 kSuperExpando = 'SprE';
const uint32 kExpandNewTeams = 'ExTm'; const uint32 kExpandNewTeams = 'ExTm';
const uint32 kAutoRaise = 'AtRs'; const uint32 kAutoRaise = 'AtRs';
const uint32 kRestartTracker = 'TRAK';
// from roster_private.h // from roster_private.h
const uint32 kShutdownSystem = 301; const uint32 kShutdownSystem = 301;
+10 -1
View File
@@ -48,6 +48,7 @@ All rights reserved.
#include "PublicCommands.h" #include "PublicCommands.h"
#include "RecentItems.h" #include "RecentItems.h"
#include "StatusView.h" #include "StatusView.h"
#include "tracker_private.h"
#define ROSTER_SIG "application/x-vnd.Be-ROST" #define ROSTER_SIG "application/x-vnd.Be-ROST"
@@ -222,7 +223,15 @@ TBeMenu::AddStandardBeMenuItems()
if (fBarView) if (fBarView)
dragging = fBarView->Dragging(); 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 #ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL
"About Haiku" "About Haiku"
#else #else