How To Save Content of GTKTextBuffer to a File
问题 I'm writing on Ubuntu 12.04 in Anjuta with C and GTK a program. It's a graphical interface for the nbc (Lego NXT Compiler). I have a GTKTextView. Now I want to save the content of the textview to a file, which could be chosen by a GTKFileChooser. Now I don't know how to get the text from the TextView and write it to the file. How do i do this? 回答1: First, get the GtkTextBuffer from the GtkTextView using gtk_text_view_get_buffer() . Then get the start and end GtkTextIters from the buffer to