[gedit-list] [PATCH] Add gedit_document_set_encoding()



https://bugzilla.gnome.org/attachment.cgi?id=228727&action=diff

This is a fix of Bug 342918 in API level. Expose a encoding menu by
default may not be necessary and the UI can be arguable. So I think
have the API first and leave visible UI to plugins would be the best
solution.

For the interface of gedit_document_set_encoding(), I still have the
following questions:
1. Is gboolean return value an sufficient error reporting mechanism?
2. Do we need to expose set_by_user?

For the implementation of gedit_document_set_encoding(), I still have
the following questions:
1. Do we need to do stream conversion instead to reduce memory usage?
2. Are there memory leaks left in my code, in particular, after
gtk_text_buffer_set_text (), can I g_free passed text?

Any other comments are welcomed.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]