Merge branch 'master' of ssh://git.haiku-os.org/haiku
This commit is contained in:
@@ -20,6 +20,7 @@ OptionalPackageDependencies Git : Expat Curl OpenSSL LibIconv ;
|
|||||||
OptionalPackageDependencies GitDoc : Man Git ;
|
OptionalPackageDependencies GitDoc : Man Git ;
|
||||||
OptionalPackageDependencies ICU-devel : DevelopmentBase ;
|
OptionalPackageDependencies ICU-devel : DevelopmentBase ;
|
||||||
OptionalPackageDependencies LibLayout : DevelopmentBase ;
|
OptionalPackageDependencies LibLayout : DevelopmentBase ;
|
||||||
|
OptionalPackageDependencies LibXML2 : XZ-Utils ;
|
||||||
OptionalPackageDependencies Man : Groff ;
|
OptionalPackageDependencies Man : Groff ;
|
||||||
OptionalPackageDependencies Tar : LibIconv ;
|
OptionalPackageDependencies Tar : LibIconv ;
|
||||||
OptionalPackageDependencies Python : Bzip ;
|
OptionalPackageDependencies Python : Bzip ;
|
||||||
|
|||||||
+10
-10
@@ -475,13 +475,13 @@ if [ IsOptionalHaikuImagePackageAdded CMake ] {
|
|||||||
} else {
|
} else {
|
||||||
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||||
InstallOptionalHaikuImagePackage
|
InstallOptionalHaikuImagePackage
|
||||||
cmake-2.8.4-r1a3-x86-gcc4-2011-05-23.zip
|
cmake-2.8.5-x86-gcc4-2012-07-18.zip
|
||||||
: $(baseURL)/cmake-2.8.4-r1a3-x86-gcc4-2011-05-23.zip
|
: $(baseURL)/cmake-2.8.5-x86-gcc4-2012-07-18.zip
|
||||||
: : true ;
|
: : true ;
|
||||||
} else {
|
} else {
|
||||||
InstallOptionalHaikuImagePackage
|
InstallOptionalHaikuImagePackage
|
||||||
cmake-2.8.4-r1a3-x86-gcc2-2011-05-19.zip
|
cmake-2.8.5-x86-gcc2-2012-07-16.zip
|
||||||
: $(baseURL)/cmake-2.8.4-r1a3-x86-gcc2-2011-05-19.zip
|
: $(baseURL)/cmake-2.8.5-x86-gcc2-2012-07-16.zip
|
||||||
: : true ;
|
: : true ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1206,12 +1206,12 @@ if [ IsOptionalHaikuImagePackageAdded LibXML2 ] {
|
|||||||
} else {
|
} else {
|
||||||
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||||
InstallOptionalHaikuImagePackage
|
InstallOptionalHaikuImagePackage
|
||||||
libxml2-2.8.0-x86-gcc4-2012-06-18.zip
|
libxml2-2.8.0-x86-gcc4-2012-07-18.zip
|
||||||
: $(baseURL)/libxml2-2.8.0-x86-gcc4-2012-06-18.zip ;
|
: $(baseURL)/libxml2-2.8.0-x86-gcc4-2012-07-18.zip ;
|
||||||
} else {
|
} else {
|
||||||
InstallOptionalHaikuImagePackage
|
InstallOptionalHaikuImagePackage
|
||||||
libxml2-2.8.0-x86-gcc2-2012-06-21.zip
|
libxml2-2.8.0-x86-gcc2-2012-07-17.zip
|
||||||
: $(baseURL)/libxml2-2.8.0-x86-gcc2-2012-06-21.zip ;
|
: $(baseURL)/libxml2-2.8.0-x86-gcc2-2012-07-17.zip ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1986,8 +1986,8 @@ if [ IsOptionalHaikuImagePackageAdded XZ-Utils ] {
|
|||||||
Echo "No optional package XZ-Utils available for $(TARGET_ARCH)" ;
|
Echo "No optional package XZ-Utils available for $(TARGET_ARCH)" ;
|
||||||
} else {
|
} else {
|
||||||
InstallOptionalHaikuImagePackage
|
InstallOptionalHaikuImagePackage
|
||||||
xz-utils-5.0.1-r1a3-x86-gcc4-2011-05-24.zip
|
xz-utils-5.0.1-x86-gcc4-2012-07-18.zip
|
||||||
: $(baseURL)/xz-utils-5.0.1-r1a3-x86-gcc4-2011-05-24.zip ;
|
: $(baseURL)/xz-utils-5.0.1-x86-gcc4-2012-07-18.zip ;
|
||||||
AddExpanderRuleToHaikuImage "application/x-xz" : .tar.xz
|
AddExpanderRuleToHaikuImage "application/x-xz" : .tar.xz
|
||||||
: "tar -Jtvf \\0045s"
|
: "tar -Jtvf \\0045s"
|
||||||
: "tar -Jxvf \\0045s"
|
: "tar -Jxvf \\0045s"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009, Ingo Weinhold, [email protected].
|
* Copyright 2009, Ingo Weinhold, [email protected].
|
||||||
|
* Copyright 2012, Rene Gollent, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -226,6 +227,14 @@ TreeTableModel::NotifyNodesChanged(const TreeTablePath& path, int32 childIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark - TreeTableToolTipProvider
|
||||||
|
|
||||||
|
|
||||||
|
TreeTableToolTipProvider::~TreeTableToolTipProvider()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark - TreeTableListener
|
// #pragma mark - TreeTableListener
|
||||||
|
|
||||||
|
|
||||||
@@ -650,6 +659,7 @@ TreeTable::TreeTable(const char* name, uint32 flags, border_style borderStyle,
|
|||||||
:
|
:
|
||||||
AbstractTable(name, flags, borderStyle, showHorizontalScrollbar),
|
AbstractTable(name, flags, borderStyle, showHorizontalScrollbar),
|
||||||
fModel(NULL),
|
fModel(NULL),
|
||||||
|
fToolTipProvider(NULL),
|
||||||
fRootNode(NULL),
|
fRootNode(NULL),
|
||||||
fSelectionModel(this),
|
fSelectionModel(this),
|
||||||
fIgnoreSelectionChange(0)
|
fIgnoreSelectionChange(0)
|
||||||
@@ -731,6 +741,13 @@ TreeTable::SetTreeTableModel(TreeTableModel* model)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
TreeTable::SetToolTipProvider(TreeTableToolTipProvider* toolTipProvider)
|
||||||
|
{
|
||||||
|
fToolTipProvider = toolTipProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
TreeTableSelectionModel*
|
TreeTableSelectionModel*
|
||||||
TreeTable::SelectionModel()
|
TreeTable::SelectionModel()
|
||||||
{
|
{
|
||||||
@@ -810,6 +827,31 @@ TreeTable::RemoveTreeTableListener(TreeTableListener* listener)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
TreeTable::GetToolTipAt(BPoint point, BToolTip** _tip)
|
||||||
|
{
|
||||||
|
if (fToolTipProvider == NULL)
|
||||||
|
return AbstractTable::GetToolTipAt(point, _tip);
|
||||||
|
|
||||||
|
// get the table row
|
||||||
|
BRow* row = RowAt(point);
|
||||||
|
if (row == NULL)
|
||||||
|
return AbstractTable::GetToolTipAt(point, _tip);
|
||||||
|
|
||||||
|
TreeTableRow* treeRow = dynamic_cast<TreeTableRow*>(row);
|
||||||
|
// get the table column
|
||||||
|
BColumn* column = ColumnAt(point);
|
||||||
|
|
||||||
|
int32 columnIndex = column != NULL ? column->LogicalFieldNum() : -1;
|
||||||
|
|
||||||
|
TreeTablePath path;
|
||||||
|
_GetPathForNode(treeRow->Node(), path);
|
||||||
|
|
||||||
|
return fToolTipProvider->GetToolTipForTablePath(path, columnIndex,
|
||||||
|
_tip);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TreeTable::SelectionChanged()
|
TreeTable::SelectionChanged()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009, Ingo Weinhold, [email protected].
|
* Copyright 2009, Ingo Weinhold, [email protected].
|
||||||
|
* Copyright 2012, Rene Gollent, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef TREE_TABLE_H
|
#ifndef TREE_TABLE_H
|
||||||
@@ -122,6 +123,17 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class TreeTableToolTipProvider {
|
||||||
|
public:
|
||||||
|
virtual ~TreeTableToolTipProvider();
|
||||||
|
|
||||||
|
virtual bool GetToolTipForTablePath(
|
||||||
|
const TreeTablePath& path,
|
||||||
|
int32 columnIndex, BToolTip** _tip) = 0;
|
||||||
|
// columnIndex can be -1, if not in a column
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class TreeTableListener {
|
class TreeTableListener {
|
||||||
public:
|
public:
|
||||||
virtual ~TreeTableListener();
|
virtual ~TreeTableListener();
|
||||||
@@ -157,6 +169,11 @@ public:
|
|||||||
bool SetTreeTableModel(TreeTableModel* model);
|
bool SetTreeTableModel(TreeTableModel* model);
|
||||||
TreeTableModel* GetTreeTableModel() const { return fModel; }
|
TreeTableModel* GetTreeTableModel() const { return fModel; }
|
||||||
|
|
||||||
|
void SetToolTipProvider(
|
||||||
|
TreeTableToolTipProvider* toolTipProvider);
|
||||||
|
TreeTableToolTipProvider* ToolTipProvider() const
|
||||||
|
{ return fToolTipProvider; }
|
||||||
|
|
||||||
TreeTableSelectionModel* SelectionModel();
|
TreeTableSelectionModel* SelectionModel();
|
||||||
|
|
||||||
void SelectNode(const TreeTablePath& path,
|
void SelectNode(const TreeTablePath& path,
|
||||||
@@ -177,6 +194,8 @@ public:
|
|||||||
TreeTableListener* listener);
|
TreeTableListener* listener);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual bool GetToolTipAt(BPoint point, BToolTip** _tip);
|
||||||
|
|
||||||
virtual void SelectionChanged();
|
virtual void SelectionChanged();
|
||||||
|
|
||||||
virtual AbstractColumn* CreateColumn(TableColumn* column);
|
virtual AbstractColumn* CreateColumn(TableColumn* column);
|
||||||
@@ -226,6 +245,7 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
TreeTableModel* fModel;
|
TreeTableModel* fModel;
|
||||||
|
TreeTableToolTipProvider* fToolTipProvider;
|
||||||
TreeTableNode* fRootNode;
|
TreeTableNode* fRootNode;
|
||||||
TreeTableSelectionModel fSelectionModel;
|
TreeTableSelectionModel fSelectionModel;
|
||||||
ListenerList fListeners;
|
ListenerList fListeners;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include <Looper.h>
|
#include <Looper.h>
|
||||||
#include <PopUpMenu.h>
|
#include <PopUpMenu.h>
|
||||||
|
#include <ToolTip.h>
|
||||||
|
|
||||||
#include <AutoDeleter.h>
|
#include <AutoDeleter.h>
|
||||||
#include <AutoLocker.h>
|
#include <AutoLocker.h>
|
||||||
@@ -25,6 +26,7 @@
|
|||||||
#include "FunctionInstance.h"
|
#include "FunctionInstance.h"
|
||||||
#include "GUISettingsUtils.h"
|
#include "GUISettingsUtils.h"
|
||||||
#include "MessageCodes.h"
|
#include "MessageCodes.h"
|
||||||
|
#include "Register.h"
|
||||||
#include "SettingsMenu.h"
|
#include "SettingsMenu.h"
|
||||||
#include "StackFrame.h"
|
#include "StackFrame.h"
|
||||||
#include "StackFrameValues.h"
|
#include "StackFrameValues.h"
|
||||||
@@ -312,10 +314,12 @@ protected:
|
|||||||
targetView);
|
targetView);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else if (value.Type() == B_STRING_TYPE) {
|
||||||
|
fField.SetString(value.ToString());
|
||||||
|
} else {
|
||||||
|
// fall back to drawing an empty string
|
||||||
|
fField.SetString("");
|
||||||
}
|
}
|
||||||
|
|
||||||
// fall back to drawing an empty string
|
|
||||||
fField.SetString("");
|
|
||||||
fField.SetWidth(Width());
|
fField.SetWidth(Width());
|
||||||
fColumn.DrawField(&fField, rect, targetView);
|
fColumn.DrawField(&fField, rect, targetView);
|
||||||
}
|
}
|
||||||
@@ -345,7 +349,8 @@ protected:
|
|||||||
// #pragma mark - VariableTableModel
|
// #pragma mark - VariableTableModel
|
||||||
|
|
||||||
|
|
||||||
class VariablesView::VariableTableModel : public TreeTableModel {
|
class VariablesView::VariableTableModel : public TreeTableModel,
|
||||||
|
public TreeTableToolTipProvider {
|
||||||
public:
|
public:
|
||||||
VariableTableModel();
|
VariableTableModel();
|
||||||
~VariableTableModel();
|
~VariableTableModel();
|
||||||
@@ -379,6 +384,10 @@ public:
|
|||||||
void NotifyNodeChanged(ModelNode* node);
|
void NotifyNodeChanged(ModelNode* node);
|
||||||
void NotifyNodeHidden(ModelNode* node);
|
void NotifyNodeHidden(ModelNode* node);
|
||||||
|
|
||||||
|
virtual bool GetToolTipForTablePath(
|
||||||
|
const TreeTablePath& path,
|
||||||
|
int32 columnIndex, BToolTip** _tip);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct NodeHashDefinition {
|
struct NodeHashDefinition {
|
||||||
typedef ValueNodeChild* KeyType;
|
typedef ValueNodeChild* KeyType;
|
||||||
@@ -1105,8 +1114,29 @@ VariablesView::VariableTableModel::GetValueAt(void* object, int32 columnIndex,
|
|||||||
_value.SetTo(node->Name(), B_VARIANT_DONT_COPY_DATA);
|
_value.SetTo(node->Name(), B_VARIANT_DONT_COPY_DATA);
|
||||||
return true;
|
return true;
|
||||||
case 1:
|
case 1:
|
||||||
if (node->GetValue() == NULL)
|
if (node->GetValue() == NULL) {
|
||||||
|
ValueLocation* location = node->NodeChild()->Location();
|
||||||
|
if (location == NULL)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
Type* nodeChildRawType = node->NodeChild()->Node()->GetType()
|
||||||
|
->ResolveRawType(false);
|
||||||
|
if (nodeChildRawType->Kind() == TYPE_COMPOUND)
|
||||||
|
{
|
||||||
|
if (location->CountPieces() > 1)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
BString data;
|
||||||
|
ValuePieceLocation piece = location->PieceAt(0);
|
||||||
|
if (piece.type != VALUE_PIECE_LOCATION_MEMORY)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
data.SetToFormat("[@ 0x%llx]", piece.address);
|
||||||
|
_value.SetTo(data);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
_value.SetTo(node, VALUE_NODE_TYPE);
|
_value.SetTo(node, VALUE_NODE_TYPE);
|
||||||
return true;
|
return true;
|
||||||
@@ -1159,6 +1189,55 @@ VariablesView::VariableTableModel::NotifyNodeHidden(ModelNode* node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
VariablesView::VariableTableModel::GetToolTipForTablePath(
|
||||||
|
const TreeTablePath& path, int32 columnIndex, BToolTip** _tip)
|
||||||
|
{
|
||||||
|
ModelNode* node = (ModelNode*)NodeForPath(path);
|
||||||
|
if (node == NULL)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (node->NodeChild()->LocationResolutionState() != B_OK)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
ValueLocation* location = node->NodeChild()->Location();
|
||||||
|
BString tipData;
|
||||||
|
for (int32 i = 0; i < location->CountPieces(); i++) {
|
||||||
|
ValuePieceLocation piece = location->PieceAt(i);
|
||||||
|
BString pieceData;
|
||||||
|
switch (piece.type) {
|
||||||
|
case VALUE_PIECE_LOCATION_MEMORY:
|
||||||
|
pieceData.SetToFormat("(%ld): Address: 0x%llx, Size: "
|
||||||
|
"%lld bytes", i, piece.address, piece.size);
|
||||||
|
break;
|
||||||
|
case VALUE_PIECE_LOCATION_REGISTER:
|
||||||
|
{
|
||||||
|
Architecture* architecture = fThread->GetTeam()->GetArchitecture();
|
||||||
|
pieceData.SetToFormat("(%ld): Register (%s)",
|
||||||
|
i, architecture->Registers()[piece.reg].Name());
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
tipData += pieceData;
|
||||||
|
if (i < location->CountPieces() - 1)
|
||||||
|
tipData += "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tipData.IsEmpty())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
*_tip = new(std::nothrow) BTextToolTip(tipData);
|
||||||
|
if (*_tip == NULL)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
VariablesView::VariableTableModel::_AddNode(Variable* variable,
|
VariablesView::VariableTableModel::_AddNode(Variable* variable,
|
||||||
ModelNode* parent, ValueNodeChild* nodeChild, bool isPresentationNode,
|
ModelNode* parent, ValueNodeChild* nodeChild, bool isPresentationNode,
|
||||||
@@ -1734,6 +1813,7 @@ VariablesView::_Init()
|
|||||||
if (fVariableTableModel->Init() != B_OK)
|
if (fVariableTableModel->Init() != B_OK)
|
||||||
throw std::bad_alloc();
|
throw std::bad_alloc();
|
||||||
fVariableTable->SetTreeTableModel(fVariableTableModel);
|
fVariableTable->SetTreeTableModel(fVariableTableModel);
|
||||||
|
fVariableTable->SetToolTipProvider(fVariableTableModel);
|
||||||
|
|
||||||
fContainerListener = new ContainerListener(this);
|
fContainerListener = new ContainerListener(this);
|
||||||
fVariableTableModel->SetContainerListener(fContainerListener);
|
fVariableTableModel->SetContainerListener(fContainerListener);
|
||||||
|
|||||||
@@ -3512,8 +3512,11 @@ OutlineView::MouseDown(BPoint position)
|
|||||||
fCurrentRow = new_row;
|
fCurrentRow = new_row;
|
||||||
fCurrentField = new_field;
|
fCurrentField = new_field;
|
||||||
fCurrentCode = B_INSIDE_VIEW;
|
fCurrentCode = B_INSIDE_VIEW;
|
||||||
|
BMessage* message = Window()->CurrentMessage();
|
||||||
|
int32 buttons = 1;
|
||||||
|
message->FindInt32("buttons", &buttons);
|
||||||
fCurrentColumn->MouseDown(fMasterView, fCurrentRow,
|
fCurrentColumn->MouseDown(fMasterView, fCurrentRow,
|
||||||
fCurrentField, fFieldRect, position, 1);
|
fCurrentField, fFieldRect, position, buttons);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fEditMode) {
|
if (!fEditMode) {
|
||||||
@@ -4090,6 +4093,16 @@ OutlineView::RemoveRow(BRow* row)
|
|||||||
fItemsHeight -= subTreeHeight;
|
fItemsHeight -= subTreeHeight;
|
||||||
|
|
||||||
FixScrollBar(false);
|
FixScrollBar(false);
|
||||||
|
int32 indent = 0;
|
||||||
|
float top = 0.0;
|
||||||
|
if (FindRow(fVisibleRect.top, &indent, &top) == NULL && ScrollBar(B_VERTICAL) != NULL) {
|
||||||
|
// after removing this row, no rows are actually visible any more,
|
||||||
|
// force a scroll to make them visible again
|
||||||
|
if (fItemsHeight > fVisibleRect.Height())
|
||||||
|
ScrollBy(0.0, fItemsHeight - fVisibleRect.Height() - Bounds().top);
|
||||||
|
else
|
||||||
|
ScrollBy(0.0, -Bounds().top);
|
||||||
|
}
|
||||||
if (parentRow != NULL) {
|
if (parentRow != NULL) {
|
||||||
parentRow->fChildList->RemoveItem(row);
|
parentRow->fChildList->RemoveItem(row);
|
||||||
if (parentRow->fChildList->CountItems() == 0) {
|
if (parentRow->fChildList->CountItems() == 0) {
|
||||||
@@ -4294,7 +4307,7 @@ OutlineView::FixScrollBar(bool scrollToFit)
|
|||||||
float maxScrollBarValue = fItemsHeight - fVisibleRect.Height();
|
float maxScrollBarValue = fItemsHeight - fVisibleRect.Height();
|
||||||
vScrollBar->SetProportion(fVisibleRect.Height() / fItemsHeight);
|
vScrollBar->SetProportion(fVisibleRect.Height() / fItemsHeight);
|
||||||
|
|
||||||
// If the user is scrolled down too far when makes the range smaller, the list
|
// If the user is scrolled down too far when making the range smaller, the list
|
||||||
// will jump suddenly, which is undesirable. In this case, don't fix the scroll
|
// will jump suddenly, which is undesirable. In this case, don't fix the scroll
|
||||||
// bar here. In ScrollTo, it checks to see if this has occured, and will
|
// bar here. In ScrollTo, it checks to see if this has occured, and will
|
||||||
// fix the scroll bars sneakily if the user has scrolled up far enough.
|
// fix the scroll bars sneakily if the user has scrolled up far enough.
|
||||||
|
|||||||
Reference in New Issue
Block a user