* fixed some more GetSupportedSuites implementations
* fixed some local variables names * fixed the case of some message attribute names git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17734 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a60f5e9c2e
commit
f4fc3d626a
@ -911,10 +911,10 @@ BApplication::GetSupportedSuites(BMessage *data)
|
||||
if (!data)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
status_t status = data->AddString("Suites", "suite/vnd.Be-application");
|
||||
status_t status = data->AddString("suites", "suite/vnd.Be-application");
|
||||
if (status == B_OK) {
|
||||
BPropertyInfo PropertyInfo(sPropertyInfo);
|
||||
status = data->AddFlat("message", &PropertyInfo);
|
||||
BPropertyInfo propertyInfo(sPropertyInfo);
|
||||
status = data->AddFlat("messages", &propertyInfo);
|
||||
if (status == B_OK)
|
||||
status = BHandler::GetSupportedSuites(data);
|
||||
}
|
||||
|
@ -471,7 +471,7 @@ BMessage: what = (0x0, or 0)
|
||||
err = data->AddString("suites", "suite/vnd.Be-handler");
|
||||
if (!err) {
|
||||
BPropertyInfo propertyInfo(sHandlerPropInfo);
|
||||
err = data->AddFlat("message", &propertyInfo);
|
||||
err = data->AddFlat("messages", &propertyInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -664,11 +664,11 @@ BLooper::ResolveSpecifier(BMessage* msg, int32 index,
|
||||
string comparisons -- which wouldn't tell the whole story anyway,
|
||||
because of the same name being used for multiple properties.
|
||||
*/
|
||||
BPropertyInfo PropertyInfo(gLooperPropInfo);
|
||||
BPropertyInfo propertyInfo(gLooperPropInfo);
|
||||
uint32 data;
|
||||
status_t err = B_OK;
|
||||
const char* errMsg = "";
|
||||
if (PropertyInfo.FindMatch(msg, index, specifier, form, property, &data) >= 0) {
|
||||
if (propertyInfo.FindMatch(msg, index, specifier, form, property, &data) >= 0) {
|
||||
switch (data) {
|
||||
case BLOOPER_PROCESS_INTERNALLY:
|
||||
return this;
|
||||
@ -701,10 +701,10 @@ BLooper::ResolveSpecifier(BMessage* msg, int32 index,
|
||||
property);
|
||||
}
|
||||
|
||||
BMessage Reply(B_MESSAGE_NOT_UNDERSTOOD);
|
||||
Reply.AddInt32("error", err);
|
||||
Reply.AddString("message", errMsg);
|
||||
msg->SendReply(&Reply);
|
||||
BMessage reply(B_MESSAGE_NOT_UNDERSTOOD);
|
||||
reply.AddInt32("error", err);
|
||||
reply.AddString("message", errMsg);
|
||||
msg->SendReply(&reply);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -716,10 +716,10 @@ BLooper::GetSupportedSuites(BMessage* data)
|
||||
if (data == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
status_t status = data->AddString("Suites", "suite/vnd.Be-handler");
|
||||
status_t status = data->AddString("suites", "suite/vnd.Be-handler");
|
||||
if (status == B_OK) {
|
||||
BPropertyInfo PropertyInfo(gLooperPropInfo);
|
||||
status = data->AddFlat("message", &PropertyInfo);
|
||||
status = data->AddFlat("messages", &PropertyInfo);
|
||||
if (status == B_OK)
|
||||
status = BHandler::GetSupportedSuites(data);
|
||||
}
|
||||
@ -1318,10 +1318,10 @@ BLooper::_QuitRequested(BMessage *msg)
|
||||
bool shutdown;
|
||||
if (msg->IsSourceWaiting()
|
||||
|| (msg->FindBool("_shutdown_", &shutdown) == B_OK && shutdown)) {
|
||||
BMessage ReplyMsg(B_REPLY);
|
||||
ReplyMsg.AddBool("result", isQuitting);
|
||||
ReplyMsg.AddInt32("thread", fTaskID);
|
||||
msg->SendReply(&ReplyMsg);
|
||||
BMessage replyMsg(B_REPLY);
|
||||
replyMsg.AddBool("result", isQuitting);
|
||||
replyMsg.AddInt32("thread", fTaskID);
|
||||
msg->SendReply(&replyMsg);
|
||||
}
|
||||
|
||||
if (isQuitting)
|
||||
|
@ -117,14 +117,14 @@ const static rgb_color kRedInputColor = { 255, 152, 152, 255 };
|
||||
static property_info
|
||||
sPropertyList[] = {
|
||||
{
|
||||
"Selection",
|
||||
"selection",
|
||||
{ B_GET_PROPERTY, 0 },
|
||||
{ B_DIRECT_SPECIFIER, 0 },
|
||||
"Returns the current selection.", 0,
|
||||
{ B_INT32_TYPE, 0 }
|
||||
},
|
||||
{
|
||||
"Selection",
|
||||
"selection",
|
||||
{ B_SET_PROPERTY, 0 },
|
||||
{ B_DIRECT_SPECIFIER, 0 },
|
||||
"Sets the current selection.", 0,
|
||||
@ -990,16 +990,14 @@ BTextView::GetSupportedSuites(BMessage *data)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
status_t err = data->AddString("suites", "suite/vnd.Be-text-view");
|
||||
|
||||
if (err < B_OK)
|
||||
if (err != B_OK)
|
||||
return err;
|
||||
|
||||
BPropertyInfo prop_info(sPropertyList);
|
||||
err = data->AddFlat("messages", &prop_info);
|
||||
|
||||
if (err < B_OK)
|
||||
if (err != B_OK)
|
||||
return err;
|
||||
|
||||
return BView::GetSupportedSuites(data);
|
||||
}
|
||||
|
||||
|
@ -11,20 +11,24 @@
|
||||
static property_info
|
||||
sPropertyInfo[] = {
|
||||
{ "ChannelCount",
|
||||
{ B_GET_PROPERTY, B_SET_PROPERTY, 0 },
|
||||
{ B_DIRECT_SPECIFIER, 0 }, "", 0 },
|
||||
{ B_GET_PROPERTY, B_SET_PROPERTY, 0 },
|
||||
{ B_DIRECT_SPECIFIER, 0 }, NULL, 0, { B_INT32_TYPE }
|
||||
},
|
||||
|
||||
{ "CurrentChannel",
|
||||
{ B_GET_PROPERTY, B_SET_PROPERTY, 0 },
|
||||
{ B_DIRECT_SPECIFIER, 0 }, "", 0 },
|
||||
{ B_GET_PROPERTY, B_SET_PROPERTY, 0 },
|
||||
{ B_DIRECT_SPECIFIER, 0 }, NULL, 0, { B_INT32_TYPE }
|
||||
},
|
||||
|
||||
{ "MaxLimitLabel",
|
||||
{ B_GET_PROPERTY, B_SET_PROPERTY, 0 },
|
||||
{ B_DIRECT_SPECIFIER, 0 }, "", 0 },
|
||||
{ B_GET_PROPERTY, B_SET_PROPERTY, 0 },
|
||||
{ B_DIRECT_SPECIFIER, 0 }, NULL, 0, { B_STRING_TYPE }
|
||||
},
|
||||
|
||||
{ "MinLimitLabel",
|
||||
{ B_GET_PROPERTY, B_SET_PROPERTY, 0 },
|
||||
{ B_DIRECT_SPECIFIER, 0 }, "", 0 },
|
||||
{ B_GET_PROPERTY, B_SET_PROPERTY, 0 },
|
||||
{ B_DIRECT_SPECIFIER, 0 }, NULL, 0, { B_STRING_TYPE }
|
||||
},
|
||||
|
||||
{ 0 }
|
||||
};
|
||||
@ -201,12 +205,15 @@ BChannelControl::GetSupportedSuites(BMessage *data)
|
||||
if (data == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
data->AddString("suites", "suite/vnd.Be-channel-control");
|
||||
status_t err = data->AddString("suites", "suite/vnd.Be-channel-control");
|
||||
|
||||
BPropertyInfo propertyInfo(sPropertyInfo);
|
||||
data->AddFlat("messages", &propertyInfo);
|
||||
if (err == B_OK)
|
||||
err = data->AddFlat("messages", &propertyInfo);
|
||||
|
||||
return BControl::GetSupportedSuites(data);
|
||||
if (err == B_OK)
|
||||
return BControl::GetSupportedSuites(data);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
|
@ -52,8 +52,9 @@ kHorizontalKnobData[] = {
|
||||
static property_info
|
||||
sPropertyInfo[] = {
|
||||
{ "Orientation",
|
||||
{ B_GET_PROPERTY, B_SET_PROPERTY, 0 },
|
||||
{ B_DIRECT_SPECIFIER, 0 }, "" },
|
||||
{ B_GET_PROPERTY, B_SET_PROPERTY, 0 },
|
||||
{ B_DIRECT_SPECIFIER, 0 }, NULL, 0, { B_INT32_TYPE }
|
||||
},
|
||||
|
||||
{ 0 }
|
||||
};
|
||||
@ -438,12 +439,15 @@ BChannelSlider::GetSupportedSuites(BMessage *data)
|
||||
if (data == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
data->AddString("suites", "suite/vnd.Be-channel-slider");
|
||||
status_t err = data->AddString("suites", "suite/vnd.Be-channel-slider");
|
||||
|
||||
BPropertyInfo propInfo(sPropertyInfo);
|
||||
data->AddFlat("messages", &propInfo, 1);
|
||||
if (err == B_OK)
|
||||
err = data->AddFlat("messages", &propInfo);
|
||||
|
||||
return inherited::GetSupportedSuites(data);
|
||||
if (err == B_OK)
|
||||
return BChannelControl::GetSupportedSuites(data);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,23 +30,36 @@ struct track_data {
|
||||
|
||||
static property_info sProperties[] = {
|
||||
{ "Item", { B_COUNT_PROPERTIES, 0 }, { B_DIRECT_SPECIFIER, 0 },
|
||||
"Returns the number of BListItems currently in the list." },
|
||||
"Returns the number of BListItems currently in the list.", 0, { B_INT32_TYPE }
|
||||
},
|
||||
|
||||
{ "Item", { B_EXECUTE_PROPERTY, 0 }, { B_INDEX_SPECIFIER, B_REVERSE_INDEX_SPECIFIER,
|
||||
B_RANGE_SPECIFIER, B_REVERSE_RANGE_SPECIFIER, 0 },
|
||||
"Select and invoke the specified items, first removing any existing selection." },
|
||||
"Select and invoke the specified items, first removing any existing selection."
|
||||
},
|
||||
|
||||
{ "Selection", { B_COUNT_PROPERTIES, 0 }, { B_DIRECT_SPECIFIER, 0 },
|
||||
"Returns int32 count of items in the selection." },
|
||||
"Returns int32 count of items in the selection.", 0, { B_INT32_TYPE }
|
||||
},
|
||||
|
||||
{ "Selection", { B_EXECUTE_PROPERTY, 0 }, { B_DIRECT_SPECIFIER, 0 },
|
||||
"Invoke items in selection." },
|
||||
"Invoke items in selection."
|
||||
},
|
||||
|
||||
{ "Selection", { B_GET_PROPERTY, 0 }, { B_DIRECT_SPECIFIER, 0 },
|
||||
"Returns int32 indices of all items in the selection." },
|
||||
"Returns int32 indices of all items in the selection.", 0, { B_INT32_TYPE }
|
||||
},
|
||||
|
||||
{ "Selection", { B_SET_PROPERTY, 0 }, { B_INDEX_SPECIFIER, B_REVERSE_INDEX_SPECIFIER,
|
||||
B_RANGE_SPECIFIER, B_REVERSE_RANGE_SPECIFIER, 0 },
|
||||
"Extends current selection or deselects specified items. Boolean field \"data\" "
|
||||
"chooses selection or deselection." },
|
||||
"chooses selection or deselection.", 0, { B_BOOL_TYPE }
|
||||
},
|
||||
|
||||
{ "Selection", { B_SET_PROPERTY, 0 }, { B_DIRECT_SPECIFIER, 0 },
|
||||
"Select or deselect all items in the selection. Boolean field \"data\" chooses "
|
||||
"selection or deselection." },
|
||||
"selection or deselection.", 0, { B_BOOL_TYPE }
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@ -1015,12 +1028,18 @@ BListView::ResolveSpecifier(BMessage* message, int32 index,
|
||||
status_t
|
||||
BListView::GetSupportedSuites(BMessage* data)
|
||||
{
|
||||
if (data == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
status_t err = data->AddString("suites", "suite/vnd.Be-list-view");
|
||||
|
||||
BPropertyInfo propertyInfo(sProperties);
|
||||
if (err == B_OK)
|
||||
err = data->AddFlat("messages", &propertyInfo);
|
||||
|
||||
data->AddString("suites", "suite/vnd.Be-list-view");
|
||||
data->AddFlat("messages", &propertyInfo);
|
||||
|
||||
return BView::GetSupportedSuites(data);
|
||||
if (err == B_OK)
|
||||
return BView::GetSupportedSuites(data);
|
||||
return err;
|
||||
}
|
||||
|
||||
// Perform
|
||||
|
@ -3480,14 +3480,12 @@ BView::GetSupportedSuites(BMessage *data)
|
||||
if (data == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
status_t status = data->AddString("Suites", "suite/vnd.Be-view");
|
||||
if (status == B_OK) {
|
||||
BPropertyInfo propertyInfo(sViewPropInfo);
|
||||
|
||||
status = data->AddFlat("message", &propertyInfo);
|
||||
if (status == B_OK)
|
||||
status = BHandler::GetSupportedSuites(data);
|
||||
}
|
||||
status_t status = data->AddString("suites", "suite/vnd.Be-view");
|
||||
BPropertyInfo propertyInfo(sViewPropInfo);
|
||||
if (status == B_OK)
|
||||
status = data->AddFlat("messages", &propertyInfo);
|
||||
if (status == B_OK)
|
||||
return BHandler::GetSupportedSuites(data);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -2217,11 +2217,11 @@ BWindow::GetSupportedSuites(BMessage *data)
|
||||
if (data == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
status_t status = data->AddString("Suites", "suite/vnd.Be-window");
|
||||
status_t status = data->AddString("suites", "suite/vnd.Be-window");
|
||||
if (status == B_OK) {
|
||||
BPropertyInfo propertyInfo(sWindowPropInfo, sWindowValueInfo);
|
||||
|
||||
status = data->AddFlat("message", &propertyInfo);
|
||||
status = data->AddFlat("messages", &propertyInfo);
|
||||
if (status == B_OK)
|
||||
status = BLooper::GetSupportedSuites(data);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user