コード例 #1
0
Bool XP_IsContextBusy(MWContext * context)
{
	int i = 1;
	MWContext * child;
	
	if (context == NULL)
		return FALSE;

	if (NET_AreThereActiveConnectionsForWindow(context))
		return TRUE;
	
	while ((child = (MWContext*)XP_ListGetObjectNum (context->grid_children,
													 i++)))
		if (XP_IsContextBusy(child))
			return TRUE;
	
	return FALSE;
}
コード例 #2
0
Boolean
XFE_SubscribeView::isCommandEnabled(CommandType command, void *calldata, XFE_CommandInfo*)
{
	MWContext *c = MSG_GetContext(m_pane);
	XP_Bool busy = XP_IsContextBusy(c);
	XP_Bool stoppable = fe_IsContextStoppable(c);

	if (command == xfeCmdDialogOk
		|| command == xfeCmdDialogCancel)
		{
			return True;
		}
	else if (command == xfeCmdStopLoading)
		{
			return ((busy && stoppable) != 0);
		}
	else
		{
			return m_activeView->isCommandEnabled(command, calldata);
		}
}