static void set_button_images() { GtkWidget * w = get_widget_checked("google_earth_image"); gtk_image_set_from_file(GTK_IMAGE(w), imgloc("google_earth_button.gif")); w = get_widget_checked("mdv_image"); gtk_image_set_from_file(GTK_IMAGE(w), imgloc("ceos_metadata.png")); w = get_widget_checked("save_subset_image"); gtk_image_set_from_file(GTK_IMAGE(w), imgloc("save_as.png")); w = get_widget_checked("save_setup_image"); gtk_image_set_from_file(GTK_IMAGE(w), imgloc("save_as.png")); }
int main(int argc, char **argv) { gtk_init(&argc, &argv); char *glade_xml_file = find_in_share("c2v.glade"); if (!glade_xml_file) { printf("Couldn't find the glade file: c2v.glade. " "Aborting...\n"); exit(1); } glade_xml = glade_xml_new(glade_xml_file, NULL, NULL); free(glade_xml_file); set_font(); set_title(); GtkWidget *win = get_widget_checked("c2v_window"); GError *err=NULL; int ok=gtk_window_set_icon_from_file(GTK_WINDOW(win), imgloc("c2v.png"),&err); if (!ok) printf("Error loading icon: %s\n", err->message); if (argc>1) { select_defaults_by_file_type(argv[1],TRUE); add_input_file(argv[1]); int output_format = get_combo_box_item("output_format_combobox"); process(); // if we opened up an external application, we can just exit now // otherwise we will stay open if (output_format == OUTPUT_KML || output_format == OUTPUT_ALOS_CSV) exit(EXIT_SUCCESS); } else { set_combo_box_item("input_format_combobox", INPUT_AUTO); set_combo_box_item("output_format_combobox", OUTPUT_KML); } glade_xml_signal_autoconnect(glade_xml); gtk_main (); exit (EXIT_SUCCESS); }