예제 #1
0
파일: spell.c 프로젝트: Debian/gpdftext
void
editor_update_font(Ebook * ebook)
{
	GtkTextView * textview;
	gchar *editor_font;

	editor_font = NULL;
	editor_font = gconf_client_get_string(ebook->client, ebook->editor_font.key, NULL);
	if (!editor_font)
		return;
	textview = GTK_TEXT_VIEW(gtk_builder_get_object (ebook->builder, "textview"));
	editor_set_font( GTK_WIDGET(textview), 
			(editor_font == NULL || *editor_font=='\0') ? NULL : editor_font);
	g_free (editor_font);
}
예제 #2
0
파일: gui-prefs.c 프로젝트: aitjcize/Gummi
G_MODULE_EXPORT
void on_editor_font_set(GtkWidget* widget, void* user)
{
  const gchar* font = gtk_font_button_get_font_name(GTK_FONT_BUTTON(widget));
  PangoFontDescription* font_desc = pango_font_description_from_string(font);
  GList* tab = gummi->tabmanager->tabs;

  slog(L_INFO, "setting font to %s\n", font);
  config_set_value("font", font);
  while (tab) {
    editor_set_font(GU_TAB_CONTEXT(tab->data)->editor, font);
    tab = g_list_next(tab);
  }
  pango_font_description_free(font_desc);
}