void refresh_data (void) { if (data_status) { populate_varlist(); set_sample_label(dataset); } }
static void update_console (ExecState *state, GtkWidget *cview) { GtkTextBuffer *buf; GtkTextIter iter; console_record_sample(dataset); if (state == console_state) { real_console_exec(state); if (state->cmd->ci == QUIT) { return; } } buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(cview)); gtk_text_buffer_get_end_iter(buf, &iter); gtk_text_buffer_insert(buf, &iter, "\n", 1); if (!printing_is_redirected(state->prn)) { print_result_to_console(buf, &iter, state); } /* set up prompt for next command and scroll to it */ console_insert_prompt(buf, &iter, console_prompt(state)); console_scroll_to_end(cview, buf, &iter); /* update variable listing in main window if needed */ if (check_dataset_is_changed()) { mark_dataset_as_modified(); populate_varlist(); } /* update sample info if needed */ if (console_sample_changed(dataset)) { set_sample_label(dataset); } #ifdef G_OS_WIN32 gtk_window_present(GTK_WINDOW(gtk_widget_get_toplevel(cview))); gtk_widget_grab_focus(cview); #endif }