* Each DataSoure now has a "primary" indicator - this is used to separate
more important DataSources from less important ones. * Made the popup less crowded based on that info. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25021 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
065e8de0d5
commit
43eda1cd8f
@ -644,6 +644,7 @@ ActivityView::MouseDown(BPoint where)
|
||||
BPopUpMenu *menu = new BPopUpMenu(B_EMPTY_STRING, false, false);
|
||||
menu->SetFont(be_plain_font);
|
||||
|
||||
BMenu* additionalMenu = new BMenu("Additional Items");
|
||||
SystemInfo info;
|
||||
BMenuItem* item;
|
||||
|
||||
@ -660,9 +661,13 @@ ActivityView::MouseDown(BPoint where)
|
||||
if (FindDataSource(source))
|
||||
item->SetMarked(true);
|
||||
|
||||
menu->AddItem(item);
|
||||
if (source->Primary())
|
||||
menu->AddItem(item);
|
||||
else
|
||||
additionalMenu->AddItem(item);
|
||||
}
|
||||
|
||||
menu->AddItem(new BMenuItem(additionalMenu));
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(new BMenuItem(fShowLegend ? "Hide Legend" : "Show Legend",
|
||||
new BMessage(kMsgToggleLegend)));
|
||||
|
@ -196,6 +196,13 @@ DataSource::MultiCPUOnly() const
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
DataSource::Primary() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*static*/ int32
|
||||
DataSource::CountSources()
|
||||
{
|
||||
@ -308,6 +315,13 @@ UsedMemoryDataSource::Label() const
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
UsedMemoryDataSource::Primary() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
@ -343,6 +357,13 @@ CachedMemoryDataSource::Label() const
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
CachedMemoryDataSource::Primary() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
@ -682,6 +703,13 @@ CPUUsageDataSource::PerCPU() const
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
CPUUsageDataSource::Primary() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CPUUsageDataSource::_SetCPU(int32 cpu)
|
||||
{
|
||||
@ -798,6 +826,13 @@ CPUCombinedUsageDataSource::MultiCPUOnly() const
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
CPUCombinedUsageDataSource::Primary() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
@ -885,6 +920,13 @@ NetworkUsageDataSource::AdaptiveScale() const
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
NetworkUsageDataSource::Primary() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
|
@ -41,6 +41,7 @@ public:
|
||||
virtual int32 CPU() const;
|
||||
virtual bool PerCPU() const;
|
||||
virtual bool MultiCPUOnly() const;
|
||||
virtual bool Primary() const;
|
||||
|
||||
static int32 CountSources();
|
||||
static const DataSource* SourceAt(int32 index);
|
||||
@ -74,6 +75,7 @@ public:
|
||||
|
||||
virtual int64 NextValue(SystemInfo& info);
|
||||
virtual const char* Label() const;
|
||||
virtual bool Primary() const;
|
||||
};
|
||||
|
||||
|
||||
@ -86,6 +88,7 @@ public:
|
||||
|
||||
virtual int64 NextValue(SystemInfo& info);
|
||||
virtual const char* Label() const;
|
||||
virtual bool Primary() const;
|
||||
};
|
||||
|
||||
|
||||
@ -171,6 +174,7 @@ public:
|
||||
|
||||
virtual int32 CPU() const;
|
||||
virtual bool PerCPU() const;
|
||||
virtual bool Primary() const;
|
||||
|
||||
private:
|
||||
void _SetCPU(int32 cpu);
|
||||
@ -198,6 +202,7 @@ public:
|
||||
virtual const char* Label() const;
|
||||
|
||||
virtual bool MultiCPUOnly() const;
|
||||
virtual bool Primary() const;
|
||||
|
||||
private:
|
||||
bigtime_t fPreviousActive;
|
||||
@ -220,6 +225,7 @@ public:
|
||||
virtual const char* Name() const;
|
||||
virtual const char* Label() const;
|
||||
virtual bool AdaptiveScale() const;
|
||||
virtual bool Primary() const;
|
||||
|
||||
private:
|
||||
bool fIn;
|
||||
|
Loading…
Reference in New Issue
Block a user