Ejemplo n.º 1
0
static void _save_book(EDITOR *e)
{
	GString *data = g_string_new("");

	editor_get_document_content(data, e);
	main_treekey_save_book_text(e->module, e->key, data->str);
	e->is_changed = FALSE;
	g_string_free(data, TRUE);
}
Ejemplo n.º 2
0
static void _save_book(EDITOR *e)
{
	GString *string;

	string = g_string_sized_new(4096);

	gtk_html_export(gtkhtml_editor_get_html(GTKHTML_EDITOR(e->window)),
			"text/html",
			(GtkHTMLSaveReceiverFn)_save_receiver, string);

	main_treekey_save_book_text(e->module, e->key, string->str);
	g_string_free(string, TRUE);
	gtkhtml_editor_drop_undo(GTKHTML_EDITOR(e->window));
	gtkhtml_editor_set_changed(GTKHTML_EDITOR(e->window), FALSE);
}