After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 614910 - set_background_image does not accept None in Python bindings
set_background_image does not accept None in Python bindings
Status: RESOLVED OBSOLETE
Product: vte
Classification: Core
Component: general
0.24.x
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
[obsolete-next]
Depends on:
Blocks:
 
 
Reported: 2010-04-05 22:11 UTC by Chris Jones
Modified: 2014-03-24 21:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Chris Jones 2010-04-05 22:11:21 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.
Comment 1 Wen-Yen Chuang 2010-04-11 04:49:22 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=615232#c6

I believe the patch listed in above link will fix this bug.
Comment 2 Tony Baker 2011-02-08 04:07:35 UTC
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."