XEmbed support for external editors
|Assignee:||Charles Lehner||% Done:|
This patch enables an external editor to be embedded into the compose window, using GtkSocket and XEmbed. If the external editor command string has a %d, it is replaced with a XID, and if it doesn't then the external editor launches in a new window as is the current behavior. The main use case I have for this is to use Vim as the embedded editor, using the command "gvim -f --socketid %d '%s', but it could also be used to open an editor in a terminal with e.g. "xterm -into %d -s $EDITOR '%s'"
The patch also adds a utility function `str_check_format` to libsylph which is like str_find_format_times but for format strings with more than one % type.
One thing I wasn't able to get working was to make the embedded external editor grab focus when it launches. However, you can press tab a few times to give it focus.