Exemplo n.º 1
0
/* XP_InterruptContext
 * interrupts this context, and all the grid cells it encloses
 */
void XP_InterruptContext(MWContext * context)
{
	int i = 1;
	MWContext * child;

	if (context == NULL)
		return;

	/* Interrupt the children recursively first.
	 * This avoids the scenario where the context is destroyed during
	 *  an interrupt and we end up dereferencing a freed context.
	 * This also avoids crazy hacks like caching the grid_children
	 *  context list until after the interrupt, and then doing the
	 *  below loop.  That can also crash if the grid_children context
	 *  list is freed off....
	 * Bug fix 58770
	 */
	while(child = (MWContext *)XP_ListGetObjectNum(context->grid_children, i++))
		XP_InterruptContext(child);

	NET_InterruptWindow(context);
    if (context->img_cx)
        IL_InterruptContext(context->img_cx);
	ET_InterruptContext(context);
}
Exemplo n.º 2
0
void
XFE_SubscribeView::doCommand(CommandType command, void *calldata, XFE_CommandInfo*)
{
	if (command == xfeCmdDialogCancel)
		{
			MSG_SubscribeCancel(m_pane);
		}
	else if (command == xfeCmdStopLoading)
		{
			MWContext *c = MSG_GetContext(m_pane);

			XP_InterruptContext(c);
		}
    else if (command == xfeCmdDialogOk)
		{
            MSG_SubscribeCommit(m_pane);
		}
	else
		{
			m_activeView->doCommand(command, calldata);
		}
}