Re: GTK+3 gtk_text_buffer_deserialize
- From: Giuseppe Torelli <giutorcom gmail com>
- To: gtk-list gnome org
- Subject: Re: GTK+3 gtk_text_buffer_deserialize
- Date: Wed, 9 Jan 2019 18:28:43 +0000
Ok, solved. The lenght of the whole buffer is stored after the header GTKTEXTBUFFERCONTENTS-0001 minus 30 that is the length of header itself.
KInd regards
Hello list,
I need to save the rtf content of a gtk text buffer into an ASCII file
with some other info. So to avoid the \0 string terminator weirdly
inserted into the gtk text buffer content (why this, developers) and
have only the string 'GTKTEXTBUFFERCONTENTS-0001' saved I replace the
content with spaces and then when loading it BEFORE putting it back
into the gtk text buffer with the function in the subject I replace
the bytes with the original ones after GTKTEXTBUFFERCONTENTS-0001 so,
0,0,2,122 I also add 10 at the of the content. When I use the above
function I get the error:
Serialised data is malformed
I went into the sources of gtk_text_buffer_serialize to try to
understand what originates this error but with no luck as I couldn't
find that string into the sources.
Can anyone help please?
Thanks
Giuseppe
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]