static void set_tab_compilation_settings(GuPrefsGui* prefs) { /* Setting available typesetters and the active one */ /* TODO: iterate the available typesetter list and gtk_builder the objects * maybe.. or not.. */ if (pdflatex_detected()) { if (pdflatex_active()) gtk_toggle_button_set_active(prefs->typ_pdflatex, TRUE); gtk_widget_set_sensitive(GTK_WIDGET(prefs->typ_pdflatex), TRUE); gtk_widget_set_tooltip_text(GTK_WIDGET(prefs->typ_pdflatex), ""); } if (xelatex_detected()) { if (xelatex_active()) gtk_toggle_button_set_active(prefs->typ_xelatex, TRUE); gtk_widget_set_sensitive(GTK_WIDGET(prefs->typ_xelatex), TRUE); gtk_widget_set_tooltip_text(GTK_WIDGET(prefs->typ_xelatex), ""); } if (rubber_detected()) { if (rubber_active()) gtk_toggle_button_set_active(prefs->typ_rubber, TRUE); gtk_widget_set_sensitive(GTK_WIDGET(prefs->typ_rubber), TRUE); gtk_widget_set_tooltip_text(GTK_WIDGET(prefs->typ_rubber), ""); } if (latexmk_detected()) { if (latexmk_active()) gtk_toggle_button_set_active(prefs->typ_latexmk, TRUE); gtk_widget_set_sensitive(GTK_WIDGET(prefs->typ_latexmk), TRUE); gtk_widget_set_tooltip_text(GTK_WIDGET(prefs->typ_latexmk), ""); } if (latex_method_active("texpdf")) { gtk_toggle_button_set_active(prefs->method_texpdf, TRUE); } else if (latex_method_active("texdvipdf")) { gtk_toggle_button_set_active(prefs->method_texdvipdf, TRUE); } else if (latex_method_active("texdvipspdf")) { gtk_toggle_button_set_active(prefs->method_texdvipspdf, TRUE); } if (!latex_use_shellescaping()) gtk_toggle_button_set_active(prefs->opt_shellescape, FALSE); else { gtk_toggle_button_set_active(prefs->opt_shellescape, TRUE); } if (latex_can_synctex()) { if (config_get_value("synctex")) { gtk_toggle_button_set_active(prefs->opt_synctex, TRUE); } else { gtk_toggle_button_set_active(prefs->opt_synctex, FALSE); } } }
gboolean texlive_active (void) { if (pdflatex_active() || xelatex_active()) { return TRUE; } return FALSE; }