[haiku-development] Re: Issues customizing BTabView

  • From: Kacper Kasper <kacperkasper@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 16 Apr 2018 18:19:26 +0200

2018-04-16 18:09 GMT+02:00 Stephan Aßmus <superstippi@xxxxxx>:

I think what the patch does is in principle how it should work. I would even
say you don't need _BTabData_ and instead decrement BTab's _reserved[11]
member (by "sizeof(void*) / sizeof(uint32)" if you don't want to break
64-bit Haiku).

Can this be done without cluttering the header with ifdefs? I suppose
with GCC5 it's possible, I'm not so sure about GCC2.

The way in which this breaks "ABI" is perhaps more subtle. Since the view's
name used to mirror in the tab, there may be apps which set the view's name
directly, expecting it to mirror in the tab. And now with your changes it
won't anymore. To fix this, the BTab would need to register a listener on
the view's name property, and additionally it needs to track whether it
should even mirror the view's name, or if SetLabel() had been called with a
different label.

Yes, that's what the original question was about, thanks. _BTabData_
will come handy in that case I suppose. Do you think that's a blocker
or can we land the patch as is and fix when an issue crops up?

Kacper

Other related posts: