Esempio n. 1
0
static void engine_done_cb (OreganoEngine *engine, Simulation *s)
{
	if (s->progress_timeout_id != 0) {
		g_source_remove (s->progress_timeout_id);
		s->progress_timeout_id = 0;

		// Make sure that the progress bar is completed, just for good looks.
		gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (s->progress), 1.0);
	}

	gtk_widget_destroy (GTK_WIDGET (s->dialog));
	s->dialog = NULL;

	plot_show (s->engine);

	if (oregano_engine_has_warnings (s->engine)) {
		schematic_view_log_show (s->sv, FALSE);
		log_append (s->logstore, _ ("Simulation"),
		            _ ("Finished with warnings:")); // FIXME add actual warnings
	} else {
		log_append (s->logstore, _ ("Simulation"), _ ("Finished."));
	}
	sheet_clear_op_values (schematic_view_get_sheet (s->sv));

	// I don't need the engine anymore. The plot window owns its reference to
	// the engine
	g_object_unref (s->engine);
	s->engine = NULL;
}
Esempio n. 2
0
static void
engine_done_cb (OreganoEngine *engine, Simulation *s)
{
	if (s->progress_timeout_id != 0) {
		g_source_remove (s->progress_timeout_id);
		s->progress_timeout_id = 0;

		/* Make sure that the progress bar is completed, just for good looks. */
		gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (s->progress), 1.0);
	}

	gtk_widget_destroy (GTK_WIDGET (s->dialog));
	s->dialog = NULL;

	plot_show (s->engine);

	if (oregano_engine_has_warnings (s->engine))
		schematic_view_log_show (s->sv, FALSE);

	schematic_view_clear_op_values (s->sv);
	schematic_view_show_op_values (s->sv, s->engine);

	/* I don't need the engine anymore. The plot
	 * window own his reference to the engine */
	g_object_unref (s->engine);
	s->engine = NULL;

}