示例#1
0
文件: views.c 项目: BYC/geany-plugins
void views_update(DebugState state)
{
	if (option_update_all_views)
	{
		ViewIndex i;

		if (thread_state == THREAD_QUERY_FRAME)
		{
			if (!views[VIEW_THREADS].dirty)
				thread_query_frame('4');

			thread_state = THREAD_STOPPED;
		}

		for (i = 0; i < VIEW_COUNT; i++)
		{
			if (views[i].dirty)
			{
				view_update_unconditional(i, state);

				if (i == VIEW_STACK && thread_state >= THREAD_STOPPED)
					i = VIEW_WATCHES;
			}
		}
	}
	else
	{
		if (thread_state == THREAD_QUERY_FRAME)
		{
			if (view_current != VIEW_THREADS || !views[VIEW_THREADS].dirty)
				thread_query_frame('4');

			thread_state = THREAD_STOPPED;
		}

		view_update(view_current, state);
		view_update(VIEW_TOOLTIP, state);

		if (inspects_current())
			view_update(VIEW_INSPECT, state);
	}
}
示例#2
0
void views_update(DebugState state)
{
	if (option_update_all_views)
	{
		ViewIndex i;
		gboolean skip_frame = FALSE;

		if (thread_state == THREAD_QUERY_FRAME)
		{
			if (!views[VIEW_THREADS].dirty)
				thread_query_frame('4');

			thread_state = THREAD_STOPPED;
		}

		for (i = 0; i < VIEW_COUNT; i++)
		{
			if (views[i].dirty && (!skip_frame || views[i].context != VC_FRAME))
			{
				view_update_dirty(i, state);

				if (i == VIEW_STACK && thread_state >= THREAD_STOPPED)
					skip_frame = TRUE;
			}
		}
	}
	else
	{
		if (thread_state == THREAD_QUERY_FRAME)
		{
			if (view_current != VIEW_THREADS || !views[VIEW_THREADS].dirty)
				thread_query_frame('4');

			thread_state = THREAD_STOPPED;
		}

		view_update(view_current, state);
		view_update(VIEW_TOOLTIP, state);
		views_sidebar_update(gtk_notebook_get_current_page(geany_sidebar), state);
	}
}