- fix BeOS build (it's getting nasty)

- add a media node count data source. Yes I do have work to do instead :P


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25022 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol
2008-04-18 14:01:48 +00:00
parent 43eda1cd8f
commit dc1ffc79ef
9 changed files with 222 additions and 6 deletions
+49 -1
View File
@@ -28,7 +28,8 @@ const DataSource* kSources[] = {
new NetworkUsageDataSource(true),
new NetworkUsageDataSource(false),
new ClipboardSizeDataSource(false),
new ClipboardSizeDataSource(true)
new ClipboardSizeDataSource(true),
new MediaNodesDataSource()
};
const size_t kSourcesCount = sizeof(kSources) / sizeof(kSources[0]);
@@ -990,3 +991,50 @@ ClipboardSizeDataSource::AdaptiveScale() const
}
// #pragma mark -
MediaNodesDataSource::MediaNodesDataSource()
{
SystemInfo info;
fMinimum = 0;
fMaximum = INT32_MAX;
fColor = (rgb_color){255, 150, 225};
}
MediaNodesDataSource::~MediaNodesDataSource()
{
}
DataSource*
MediaNodesDataSource::Copy() const
{
return new MediaNodesDataSource(*this);
}
int64
MediaNodesDataSource::NextValue(SystemInfo& info)
{
return info.MediaNodes();
}
const char*
MediaNodesDataSource::Label() const
{
return "Media Nodes";
}
bool
MediaNodesDataSource::AdaptiveScale() const
{
return true;
}