Overriding gtk_paned_compute_position
is not possible, since that function is not virtual in GTK itself. Also, gtk_paned_compute_position
is marked as internal and deprecated and is not called anywhere from GTK+-2.24.x sources. I suspect it was only exported so that you could find out the position of the separator, not to affect it through overriding.
Instead of attempting to override HPaned.compute_position
, you should place into the paned a single-child container (e.g. a child of gtk.Bin
) that implements the desired resizing policy by hooking into the size-allocate
signal and calling set_size_request
with the desired size. This will be automatically respected by HPaned.