[haiku-commits] Re: haiku: hrev48734 - src/kits/tracker data/artwork/icons

  • From: Augustin Cavalier <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 27 Jan 2015 22:53:48 -0500

On Tue, Jan 27, 2015 at 10:18 PM, John Scipione <jscipione@xxxxxxxxx> wrote:

> I found a small mistake
>
> -BTitleView::BTitleView(BRect frame, BPoseView* view)
> +BTitleView::BTitleView(BPoseView* view)
>         :
> -       BView(frame, "TitleView", B_FOLLOW_LEFT_RIGHT, B_WILL_DRAW),
> +       BView("BTitleView", B_WILL_DRAW),
>         fPoseView(view),
>
> You renamed "TitleView" to "BTitleView" which will throw off messages
> which are targeted at that view By name. Pretty minor but should be
> corrected.
>

If you read through the entire diff, you would have noticed that this was
entirely intentional. The name "TitleView" is what apps modifying the file
panel expect to find, yes. However, they no longer need to find/move it, as
the PoseView (which was also renamed) that they get by calling FindView is
really a BGroupView that contains the TitleView and the PoseView. So by
resizing what they think is the pose view, they also resize the title view.

I added a dummy TitleView with the old name to BFilePanel, so that apps
looking for it don't get NULL. The only thing that won't work is if apps
try to cast it to a BTitleView (won't work anyway as ABI of these private
classes was broken long ago), or hide it (but I couldn't find any apps that
did this, or any reasons why apps would want to do it).

-Augustin

Other related posts: