GNOME Bugzilla – Bug 614910
set_background_image does not accept None in Python bindings
Last modified: 2014-03-24 21:20:08 UTC
The API docs for the C library suggest that set_background_image(NULL) is a valid way to clear the background image of a VTE terminal. Calling the equivalent from Python, i.e. vte.Terminal.set_background_image(None) results in an exception: TypeError: Vte.Terminal.set_background_image() argument 1 must be gtk.gdk.Pixbuf, not None I suspect this is just something to do with the way the bindings are defined? FWIW I only spotted this because the previous method I was using to clear the background - setting an image_file of an empty string, now causes libvte to segfault.
https://bugzilla.gnome.org/show_bug.cgi?id=615232#c6 I believe the patch listed in above link will fix this bug.
Similar thing when trying to do vte.set_color_cursor(None) API for C library says that "Sets the background color for text which is under the cursor. If NULL, text under the cursor will be drawn with foreground and background colors reversed."