Some minor fixes and cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15765 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+11
-10
@@ -97,6 +97,10 @@ TBarApp::TBarApp()
|
|||||||
InitSettings();
|
InitSettings();
|
||||||
InitIconPreloader();
|
InitIconPreloader();
|
||||||
|
|
||||||
|
#if defined(__HAIKU__) || defined(HAIKU_TARGET_PLATFORM_LIBBE_TEST)
|
||||||
|
be_roster->StartWatching(this);
|
||||||
|
#endif
|
||||||
|
|
||||||
sBarTeamInfoList.MakeEmpty();
|
sBarTeamInfoList.MakeEmpty();
|
||||||
|
|
||||||
BList teamList;
|
BList teamList;
|
||||||
@@ -106,9 +110,10 @@ TBarApp::TBarApp()
|
|||||||
for (int32 i = 0; i < numTeams; i++) {
|
for (int32 i = 0; i < numTeams; i++) {
|
||||||
app_info appInfo;
|
app_info appInfo;
|
||||||
team_id tID = (team_id)teamList.ItemAt(i);
|
team_id tID = (team_id)teamList.ItemAt(i);
|
||||||
if (be_roster->GetRunningAppInfo(tID, &appInfo) == B_OK)
|
if (be_roster->GetRunningAppInfo(tID, &appInfo) == B_OK) {
|
||||||
AddTeam(appInfo.team, appInfo.flags, appInfo.signature,
|
AddTeam(appInfo.team, appInfo.flags, appInfo.signature,
|
||||||
&appInfo.ref);
|
&appInfo.ref);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sSubscribers.MakeEmpty();
|
sSubscribers.MakeEmpty();
|
||||||
@@ -122,17 +127,13 @@ TBarApp::TBarApp()
|
|||||||
// statusview so that all additions to the tray
|
// statusview so that all additions to the tray
|
||||||
// follow the same path
|
// follow the same path
|
||||||
fStatusViewMess = BMessenger(fBarWindow->FindView("BarView"));
|
fStatusViewMess = BMessenger(fBarWindow->FindView("BarView"));
|
||||||
|
|
||||||
#ifdef __HAIKU__
|
|
||||||
be_roster->StartWatching(this);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TBarApp::~TBarApp()
|
TBarApp::~TBarApp()
|
||||||
{
|
{
|
||||||
#ifdef __HAIKU__
|
#if defined(__HAIKU__) || defined(HAIKU_TARGET_PLATFORM_LIBBE_TEST)
|
||||||
be_roster->StartWatching(this);
|
be_roster->StopWatching(this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int32 teamCount = sBarTeamInfoList.CountItems();
|
int32 teamCount = sBarTeamInfoList.CountItems();
|
||||||
@@ -552,7 +553,7 @@ TBarApp::AddTeam(team_id team, uint32 flags, const char *sig, entry_ref *ref)
|
|||||||
return;
|
return;
|
||||||
if (strcasecmp(barInfo->sig, sig) == 0)
|
if (strcasecmp(barInfo->sig, sig) == 0)
|
||||||
multiLaunchTeam = barInfo;
|
multiLaunchTeam = barInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (multiLaunchTeam != NULL) {
|
if (multiLaunchTeam != NULL) {
|
||||||
multiLaunchTeam->teams->AddItem((void *)team);
|
multiLaunchTeam->teams->AddItem((void *)team);
|
||||||
@@ -569,8 +570,8 @@ TBarApp::AddTeam(team_id team, uint32 flags, const char *sig, entry_ref *ref)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BFile theFile(ref, O_RDONLY);
|
BFile file(ref, B_READ_ONLY);
|
||||||
BAppFileInfo appMime(&theFile);
|
BAppFileInfo appMime(&file);
|
||||||
|
|
||||||
BarTeamInfo *barInfo = new BarTeamInfo(new BList(), flags, strdup(sig),
|
BarTeamInfo *barInfo = new BarTeamInfo(new BList(), flags, strdup(sig),
|
||||||
new BBitmap(kIconSize, B_COLOR_8_BIT), strdup(ref->name));
|
new BBitmap(kIconSize, B_COLOR_8_BIT), strdup(ref->name));
|
||||||
|
|||||||
Reference in New Issue
Block a user