void
CBCompileDocument::HandleErrorMenu
	(
	const JIndex index
	)
{
	(CBGetDocumentManager())->SetActiveListDocument(this);

	if (index == kFirstErrorCmd)
		{
		ShowFirstError();
		}

	else if (index == kPrevErrorCmd)
		{
		ShowPrevError();
		}
	else if (index == kNextErrorCmd)
		{
		ShowNextError();
		}

	else if (index == kOpenFileCmd)
		{
		GetTextEditor()->OpenSelection();
		}
}
Example #2
0
/**
 * Clean up the 'mess' of generation. That is, show windows again, reset
 * thread variables, and delete the progress window.
 */
static void CleanupGeneration()
{
	_generating_world = false;

	SetMouseCursorBusy(false);
	/* Show all vital windows again, because we have hidden them */
	if (_gw.threaded && _game_mode != GM_MENU) ShowVitalWindows();
	SetModalProgress(false);
	_gw.proc     = NULL;
	_gw.abortp   = NULL;
	_gw.threaded = false;

	DeleteWindowByClass(WC_MODAL_PROGRESS);
	ShowFirstError();
	MarkWholeScreenDirty();
}
JBoolean
CBCompileDocument::ProcessFinished
	(
	const JProcess::Finished& info
	)
{
	if (!CBExecOutputDocument::ProcessFinished(info))
		{
		return kJFalse;
		}

	if (!GetTextEditor()->HasSelection())
		{
		ShowFirstError();
		}

	return kJTrue;
}