Example #1
0
//---------------------------------------------------------
bool CACTIVE_History::_Set_History(void)
{
	Freeze();

	DeleteAllItems();

	CSG_Data_Object	*pObject	= _Get_Object();

	if( pObject == NULL || pObject->Get_History().Get_Children_Count() <= 0 )
	{
		AddRoot(_TL("no history"), IMG_ROOT);
	}
	else if( SG_Compare_Version(pObject->Get_History().Get_Property("saga-version"), "2.1.3") >= 0 )	// new version
	{
		_Add_History(AddRoot(pObject->Get_Name(), IMG_ROOT), pObject->Get_History());
	}
	else
	{
		_Add_History_OLD(AddRoot(pObject->Get_Name(), IMG_ROOT), pObject->Get_History());
	}

	Expand(GetRootItem());

	Thaw();

	return( true );
}
//---------------------------------------------------------
CWKSP_Data_Item::~CWKSP_Data_Item(void)
{
	for(int i=m_Views.GetCount()-1; i>=0; i--)
	{
		((CVIEW_Base *)m_Views[i])->Do_Destroy();
	}

	//-----------------------------------------------------
	if( m_pObject )
	{
		CSG_Data_Object	*pObject	= m_pObject;	m_pObject	= NULL;

		MSG_General_Add(wxString::Format(wxT("%s: %s..."), _TL("Close"), pObject->Get_Name()), true, true);

		SG_Get_Data_Manager().Delete(pObject);

		MSG_General_Add(_TL("okay"), false, false, SG_UI_MSG_STYLE_SUCCESS);
	}
}