Esempio n. 1
0
static void receive_output_cb(GString *string, GIOCondition condition,
	G_GNUC_UNUSED gpointer gdata)
{
	if (condition & (G_IO_IN | G_IO_PRI))
	{
		char *term = string->str + string->len - 1;
		const char *error = NULL;

		switch (*term)
		{
			case '\n' : if (string->len >= 2 && term[-1] == '\r') term--;  /* falldown */
			case '\r' : *term = '\0'; break;
			case '\0' : error = "binary zero encountered"; break;
			default : error = "line too long or incomplete";
		}

		if (leading_receive)
			debug_parse(string->str, error);

		leading_receive = !error;
	}

	if (!commands->len)
		views_update(debug_state());

	update_state(debug_state());
}
Esempio n. 2
0
void views_context_dirty(DebugState state, gboolean frame_only)
{
	ViewIndex i;

	for (i = 0; i < VIEW_COUNT; i++)
		if (views[i].context >= (frame_only ? VC_FRAME : VC_DATA))
			view_dirty(i);

	if (state != DS_BUSY)
	{
		if (option_update_all_views)
			views_update(state);
		else
			views_sidebar_update(gtk_notebook_get_current_page(geany_sidebar), state);
	}
}