From 976f53a988a233affed1cbc816ce19f67c145658 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Tue, 1 Feb 2005 13:16:22 +0000 Subject: [PATCH] Fixed warnings. Maximum initial values are 100 (One should always print values in decimal, not hex). Implemented GetSupportedSuites(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11180 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/ChannelControl.cpp | 20 +++++++++++++++++--- src/kits/interface/ChannelSlider.cpp | 1 + 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/kits/interface/ChannelControl.cpp b/src/kits/interface/ChannelControl.cpp index b4b4278103..3b5796d192 100644 --- a/src/kits/interface/ChannelControl.cpp +++ b/src/kits/interface/ChannelControl.cpp @@ -5,7 +5,13 @@ #include -#include +#include + + +static property_info // TODO: Finish this +sPropertyInfo[] = { + {0} +}; BChannelControl::BChannelControl(BRect frame, const char *name, const char *label, @@ -23,7 +29,7 @@ BChannelControl::BChannelControl(BRect frame, const char *name, const char *labe memset(_m_channel_min, 0, sizeof(int32) * channel_count); _m_channel_max = new int32[channel_count]; - memset(_m_channel_max, 64, sizeof(int32) * channel_count); + memset(_m_channel_max, 100, sizeof(int32) * channel_count); _m_channel_val = new int32[channel_count]; memset(_m_channel_val, 0, sizeof(int32) * channel_count); @@ -106,7 +112,15 @@ BChannelControl::ResolveSpecifier(BMessage *msg, int32 index, BMessage *specifie status_t BChannelControl::GetSupportedSuites(BMessage *data) { - return B_ERROR; + if (data == NULL) + return B_BAD_VALUE; + + data->AddString("suites", "suite/vnd.Be-channel-control"); + + BPropertyInfo propertyInfo(sPropertyInfo); + data->AddFlat("messages", &propertyInfo); + + return BControl::GetSupportedSuites(data); } diff --git a/src/kits/interface/ChannelSlider.cpp b/src/kits/interface/ChannelSlider.cpp index 7b3c47d403..dad859b2a4 100644 --- a/src/kits/interface/ChannelSlider.cpp +++ b/src/kits/interface/ChannelSlider.cpp @@ -317,6 +317,7 @@ const BBitmap * BChannelSlider::ThumbFor(int32 channel, bool pressed) { // TODO: Implement + return NULL; }