Style update to BListView.

Mostly rename msg argument of MessageReceived to message. Also a couple
of pointer style fixes.
This commit is contained in:
John Scipione
2013-04-25 17:55:21 -04:00
parent b8bce71dcb
commit 926535abb0
+13 -13
View File
@@ -284,9 +284,9 @@ BListView::WindowActivated(bool state)
void void
BListView::MessageReceived(BMessage* msg) BListView::MessageReceived(BMessage* message)
{ {
switch (msg->what) { switch (message->what) {
case B_COUNT_PROPERTIES: case B_COUNT_PROPERTIES:
case B_EXECUTE_PROPERTY: case B_EXECUTE_PROPERTY:
case B_GET_PROPERTY: case B_GET_PROPERTY:
@@ -296,14 +296,14 @@ BListView::MessageReceived(BMessage* msg)
BMessage specifier; BMessage specifier;
const char *property; const char *property;
if (msg->GetCurrentSpecifier(NULL, &specifier) != B_OK if (message->GetCurrentSpecifier(NULL, &specifier) != B_OK
|| specifier.FindString("property", &property) != B_OK) || specifier.FindString("property", &property) != B_OK)
return; return;
switch (propInfo.FindMatch(msg, 0, &specifier, msg->what, switch (propInfo.FindMatch(message, 0, &specifier, message->what,
property)) { property)) {
case B_ERROR: case B_ERROR:
BView::MessageReceived(msg); BView::MessageReceived(message);
break; break;
case 0: case 0:
@@ -312,7 +312,7 @@ BListView::MessageReceived(BMessage* msg)
reply.AddInt32("result", CountItems()); reply.AddInt32("result", CountItems());
reply.AddInt32("error", B_OK); reply.AddInt32("error", B_OK);
msg->SendReply(&reply); message->SendReply(&reply);
break; break;
} }
@@ -332,7 +332,7 @@ BListView::MessageReceived(BMessage* msg)
reply.AddInt32("result", count); reply.AddInt32("result", count);
reply.AddInt32("error", B_OK); reply.AddInt32("error", B_OK);
msg->SendReply(&reply); message->SendReply(&reply);
break; break;
} }
@@ -350,7 +350,7 @@ BListView::MessageReceived(BMessage* msg)
reply.AddInt32("error", B_OK); reply.AddInt32("error", B_OK);
msg->SendReply(&reply); message->SendReply(&reply);
break; break;
} }
@@ -362,14 +362,14 @@ BListView::MessageReceived(BMessage* msg)
BMessage reply(B_REPLY); BMessage reply(B_REPLY);
bool select; bool select;
if (msg->FindBool("data", &select) == B_OK && select) if (message->FindBool("data", &select) == B_OK && select)
Select(0, CountItems() - 1, false); Select(0, CountItems() - 1, false);
else else
DeselectAll(); DeselectAll();
reply.AddInt32("error", B_OK); reply.AddInt32("error", B_OK);
msg->SendReply(&reply); message->SendReply(&reply);
break; break;
} }
} }
@@ -382,7 +382,7 @@ BListView::MessageReceived(BMessage* msg)
break; break;
default: default:
BView::MessageReceived(msg); BView::MessageReceived(message);
} }
} }
@@ -686,7 +686,7 @@ BListView::ScrollTo(BPoint point)
bool bool
BListView::AddItem(BListItem *item, int32 index) BListView::AddItem(BListItem* item, int32 index)
{ {
if (!fList.AddItem(item, index)) if (!fList.AddItem(item, index))
return false; return false;
@@ -909,7 +909,7 @@ BListView::ItemAt(int32 index) const
int32 int32
BListView::IndexOf(BListItem *item) const BListView::IndexOf(BListItem* item) const
{ {
if (Window()) { if (Window()) {
if (item != NULL) { if (item != NULL) {