#include <origin.h>
#include <GetNBox.h>
#include <xfutils.h>
//put additional include files here

/// Iris 10/21/2010 ORG-1303 CLEANUP_XFS_ERROR_CODE

//put your own support static functions here


void pesp_gotofolder(const int& dump)
{
	
	vector<string> vsPages;
	int nPages = get_sel_page_names(vsPages, -1);
	ASSERT(nPages == 1);
	if ( nPages == 1 )
	{
		Folder fldr = Project.GetFolderWithPage(vsPages[0]);
		if ( fldr )
		{
			fldr.Activate(); //need to activate folder first, or else the window in Favorites will be activated too...
			Page pg(vsPages[0]);
			ASSERT(pg);
			pg.CheckShowActivate();
			if ( dump )
			{
				/// Iris 10/21/2010 ORG-1303 CLEANUP_XFS_ERROR_CODE
				//printf("The page %s locates at %s\n", vsPages[0], fldr.GetPath());
				string strMsg;
				ocu_load_msg_str(XF_SHOW_FOLDER_WITH_PAGE_INFO, &strMsg, vsPages[0], NULL, fldr.GetPath());
				warning_msg_box(strMsg, false, 'R');
				///End CLEANUP_XFS_ERROR_CODE
			}
		}
	}
}

//nGetNDialog = 0,1,2, corresponding to the XF GetN dropdown, 0 = dialog is not used
//you can change nRet to be one of XFEVT_PROCEED (defualt), XFEVT_ABORT, XFEVT_PROCEED_NO_DLG or XFEVT_PROCEED_WITH_DLG(when nGetNDialog = 0)
//nGetNDialog = -1 when Ok on GetN dialog to allow handler to preocess <auto> etc variables
//dwCntrl is combination of bits
//LTXF_FROM_GUI_MENU, LTXF_FROM_GUI_PROMPT, LTXF_FROM_AUTO_UPDATE, LTXF_FROM_FUNCTION, LTXF_THEME_USED, LTXF_CHANGE_PARAM
void pesp_gotofolder_before_execute(TreeNode& trGetN, int nGetNDialog, int& nRet, int dwCntrl)
{

}
