static void dlg_set_font(GtkFontButton *widget, gpointer user_data) { if (!user_data) { ERROR("user_data is NULL"); return; } struct TermitTab* pTab = (struct TermitTab*)user_data; termit_tab_set_font(pTab, gtk_font_button_get_font_name(widget)); }
void termit_tab_set_font_by_index(gint tab_index, const gchar* font_name) { TRACE("%s: tab_index=%d font=%s", __FUNCTION__, tab_index, font_name); if (tab_index < 0) { tab_index = gtk_notebook_get_current_page(GTK_NOTEBOOK(termit.notebook)); } TERMIT_GET_TAB_BY_INDEX(pTab, tab_index); termit_tab_set_font(pTab, font_name); }
static void dlg_set_tab_default_values(struct TermitTab* pTab, struct TermitDlgHelper* hlp) { if (hlp->tab_title) termit_tab_set_title(pTab, hlp->tab_title); vte_terminal_set_default_colors(VTE_TERMINAL(pTab->vte)); termit_tab_set_font(pTab, hlp->style.font_name); termit_tab_set_background_image(pTab, hlp->style.image_file); termit_tab_set_color_foreground(pTab, hlp->style.foreground_color); termit_tab_set_color_background(pTab, hlp->style.background_color); termit_tab_set_transparency(pTab, hlp->style.transparency); termit_tab_set_audible_bell(pTab, hlp->au_bell); termit_tab_set_visible_bell(pTab, hlp->vi_bell); if (hlp->style.image_file) { gtk_file_chooser_select_filename(GTK_FILE_CHOOSER(hlp->btn_image_file), hlp->style.image_file); } }