import os.path
from gi.repository import Gtk, Gdk

# Download a placeholder graphic to illustrate the background
if not os.path.exists('300.png'):
    import urllib
    urllib.urlretrieve('http://placehold.it/300.png/09f/fff', '300.png')

w = Gtk.Window(default_width=300, default_height=300)
l = Gtk.Label("a wrapper wrapped wrapping label that wraps: it's a wrap!",
    wrap=True)

# This is the fix! Uncomment it and see what happens.
# l.set_size_request(300, -1)

w.add(l)
w.show_all()
w.connect('destroy', Gtk.main_quit)

provider = Gtk.CssProvider()
provider.load_from_data('''
GtkWindow {
    background-image: url('300.png');
    background-repeat: no-repeat;
}
GtkLabel {
    font-size: 36;
}
''')
Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), provider,
    Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)

Gtk.main()
