hrev44751 adds 2 changesets to branch 'master' old head: ba4dad8b4946485e7bf90fc400032abd16c08a62 new head: 8a4cdf3e60da41bfd7fbdf7a754c6f69a6e817a1 ---------------------------------------------------------------------------- 862696d: Ensure that text input is focused when window is shown. Minor cleanups. 8a4cdf3: Fix handling of notifications. Basic typecasting now works. Still needs a bit of work to properly grok pointer/reference types. [ Rene Gollent <anevilyak@xxxxxxxxx> ] ---------------------------------------------------------------------------- 2 files changed, 17 insertions(+), 12 deletions(-) .../gui/team_window/VariablesView.cpp | 21 ++++++++++---------- src/kits/shared/PromptWindow.cpp | 8 ++++++-- ############################################################################ Commit: 862696d9bb4bec6a362a10406a5d2611961132b5 URL: http://cgit.haiku-os.org/haiku/commit/?id=862696d Author: Rene Gollent <anevilyak@xxxxxxxxx> Date: Sun Nov 4 15:22:31 2012 UTC Ensure that text input is focused when window is shown. Minor cleanups. ---------------------------------------------------------------------------- diff --git a/src/kits/shared/PromptWindow.cpp b/src/kits/shared/PromptWindow.cpp index 71bb0e9..33a36c7 100644 --- a/src/kits/shared/PromptWindow.cpp +++ b/src/kits/shared/PromptWindow.cpp @@ -38,6 +38,7 @@ PromptWindow::PromptWindow(const char* title, const char* label, fTextControl->SetTarget(this); acceptButton->SetTarget(this); cancelButton->SetTarget(this); + fTextControl->MakeFocus(true); } @@ -70,12 +71,15 @@ PromptWindow::MessageReceived(BMessage* message) status_t PromptWindow::SetTarget(BMessenger messenger) { - return fTextControl->SetTarget(messenger); + fTarget = messenger; + return B_OK; } status_t PromptWindow::SetMessage(BMessage* message) { - return fTextControl->SetMessage(message); + delete fMessage; + fMessage = message; + return B_OK; } ############################################################################ Revision: hrev44751 Commit: 8a4cdf3e60da41bfd7fbdf7a754c6f69a6e817a1 URL: http://cgit.haiku-os.org/haiku/commit/?id=8a4cdf3 Author: Rene Gollent <anevilyak@xxxxxxxxx> Date: Sun Nov 4 15:22:59 2012 UTC Fix handling of notifications. Basic typecasting now works. Still needs a bit of work to properly grok pointer/reference types. ---------------------------------------------------------------------------- diff --git a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp index 19e53b7..9cbbadc 100644 --- a/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/VariablesView.cpp @@ -961,8 +961,8 @@ VariablesView::VariableTableModel::ValueNodeChanged(ValueNodeChild* nodeChild, if (oldNode != NULL) { ValueNodeChildrenDeleted(oldNode); - ValueNodeChildrenCreated(newNode); - fContainerListener->ModelNodeValueRequested(modelNode); + newNode->CreateChildren(); + NotifyNodeChanged(modelNode); } } @@ -1026,6 +1026,11 @@ VariablesView::VariableTableModel::ValueNodeChildrenDeleted(ValueNode* node) for (int32 i = 0; i < modelNode->CountChildren(); i++) { BReference<ModelNode> childNode = modelNode->ChildAt(i); + TreeTablePath treePath; + if (GetTreePath(childNode, treePath)) { + int32 index = treePath.RemoveLastComponent(); + NotifyNodesRemoved(treePath, index, 1); + } modelNode->RemoveChild(childNode); fNodeTable.Remove(childNode); } @@ -1641,29 +1646,25 @@ VariablesView::MessageReceived(BMessage* message) { ModelNode* node = NULL; if (message->FindPointer("node", reinterpret_cast<void **>(&node)) != B_OK) - return; + break; TeamDebugInfo* info = fThread->GetTeam()->DebugInfo(); if (info == NULL) - return; + break; Type* type = NULL; if (info->LookupTypeByName(message->FindString("text"), TypeLookupConstraints(), type) != B_OK) { // TODO: notify user - return; + break; } ValueNode* valueNode = NULL; if (TypeHandlerRoster::Default()->CreateValueNode( node->NodeChild(), type, valueNode) != B_OK) { - return; + break; } - ValueNode* previousNode = node->NodeChild()->Node(); - BReference<ValueNode> nodeRef(previousNode); node->NodeChild()->SetNode(valueNode); - fVariableTableModel->ValueNodeChanged(node->NodeChild(), - previousNode, valueNode ); break; } case MSG_VALUE_NODE_CHANGED: