Merge branch 'master' into sam460ex
This commit is contained in:
@@ -961,8 +961,8 @@ VariablesView::VariableTableModel::ValueNodeChanged(ValueNodeChild* nodeChild,
|
|||||||
|
|
||||||
if (oldNode != NULL) {
|
if (oldNode != NULL) {
|
||||||
ValueNodeChildrenDeleted(oldNode);
|
ValueNodeChildrenDeleted(oldNode);
|
||||||
ValueNodeChildrenCreated(newNode);
|
newNode->CreateChildren();
|
||||||
fContainerListener->ModelNodeValueRequested(modelNode);
|
NotifyNodeChanged(modelNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1026,6 +1026,11 @@ VariablesView::VariableTableModel::ValueNodeChildrenDeleted(ValueNode* node)
|
|||||||
|
|
||||||
for (int32 i = 0; i < modelNode->CountChildren(); i++) {
|
for (int32 i = 0; i < modelNode->CountChildren(); i++) {
|
||||||
BReference<ModelNode> childNode = modelNode->ChildAt(i);
|
BReference<ModelNode> childNode = modelNode->ChildAt(i);
|
||||||
|
TreeTablePath treePath;
|
||||||
|
if (GetTreePath(childNode, treePath)) {
|
||||||
|
int32 index = treePath.RemoveLastComponent();
|
||||||
|
NotifyNodesRemoved(treePath, index, 1);
|
||||||
|
}
|
||||||
modelNode->RemoveChild(childNode);
|
modelNode->RemoveChild(childNode);
|
||||||
fNodeTable.Remove(childNode);
|
fNodeTable.Remove(childNode);
|
||||||
}
|
}
|
||||||
@@ -1641,29 +1646,25 @@ VariablesView::MessageReceived(BMessage* message)
|
|||||||
{
|
{
|
||||||
ModelNode* node = NULL;
|
ModelNode* node = NULL;
|
||||||
if (message->FindPointer("node", reinterpret_cast<void **>(&node)) != B_OK)
|
if (message->FindPointer("node", reinterpret_cast<void **>(&node)) != B_OK)
|
||||||
return;
|
break;
|
||||||
TeamDebugInfo* info = fThread->GetTeam()->DebugInfo();
|
TeamDebugInfo* info = fThread->GetTeam()->DebugInfo();
|
||||||
if (info == NULL)
|
if (info == NULL)
|
||||||
return;
|
break;
|
||||||
|
|
||||||
Type* type = NULL;
|
Type* type = NULL;
|
||||||
if (info->LookupTypeByName(message->FindString("text"),
|
if (info->LookupTypeByName(message->FindString("text"),
|
||||||
TypeLookupConstraints(), type) != B_OK) {
|
TypeLookupConstraints(), type) != B_OK) {
|
||||||
// TODO: notify user
|
// TODO: notify user
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ValueNode* valueNode = NULL;
|
ValueNode* valueNode = NULL;
|
||||||
if (TypeHandlerRoster::Default()->CreateValueNode(
|
if (TypeHandlerRoster::Default()->CreateValueNode(
|
||||||
node->NodeChild(), type, valueNode) != B_OK) {
|
node->NodeChild(), type, valueNode) != B_OK) {
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ValueNode* previousNode = node->NodeChild()->Node();
|
|
||||||
BReference<ValueNode> nodeRef(previousNode);
|
|
||||||
node->NodeChild()->SetNode(valueNode);
|
node->NodeChild()->SetNode(valueNode);
|
||||||
fVariableTableModel->ValueNodeChanged(node->NodeChild(),
|
|
||||||
previousNode, valueNode );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MSG_VALUE_NODE_CHANGED:
|
case MSG_VALUE_NODE_CHANGED:
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ PromptWindow::PromptWindow(const char* title, const char* label,
|
|||||||
fTextControl->SetTarget(this);
|
fTextControl->SetTarget(this);
|
||||||
acceptButton->SetTarget(this);
|
acceptButton->SetTarget(this);
|
||||||
cancelButton->SetTarget(this);
|
cancelButton->SetTarget(this);
|
||||||
|
fTextControl->MakeFocus(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -70,12 +71,15 @@ PromptWindow::MessageReceived(BMessage* message)
|
|||||||
status_t
|
status_t
|
||||||
PromptWindow::SetTarget(BMessenger messenger)
|
PromptWindow::SetTarget(BMessenger messenger)
|
||||||
{
|
{
|
||||||
return fTextControl->SetTarget(messenger);
|
fTarget = messenger;
|
||||||
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PromptWindow::SetMessage(BMessage* message)
|
PromptWindow::SetMessage(BMessage* message)
|
||||||
{
|
{
|
||||||
return fTextControl->SetMessage(message);
|
delete fMessage;
|
||||||
|
fMessage = message;
|
||||||
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user