Exemple #1
0
static void _save_note(EDITOR *e)
{
	GString *data = g_string_new("");

	editor_get_document_content(data, e);
	main_save_note(e->module, e->key, data->str);
	e->is_changed = FALSE;
	g_string_free(data, TRUE);
}
Exemple #2
0
static void _save_note(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);
	XI_message(("\n_save_note: %s\n", string->str));
	main_save_note(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);
}