[haiku-commits] Re: r40373 - haiku/trunk/src/preferences/filetypes

Hi,

Von: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
> superstippi@xxxxxx wrote:
> > +           rightWeight = 1.0 - leftWeight;
> > +   }
> > +   fMainSplitView->SetItemWeight(0, leftWeight, false);
> > +   fMainSplitView->SetItemWeight(1, rightWeight, true);
> 
> Since they will always add to 1, why do you have to remember and set 
> them both?

That's what I did at first, but in fact I don't know how those weights work and 
if they always add up to 1 after setting weights with the mouse. It's somewhat 
transparent to BSplitView. The way I do it now is robust against any surprises.

> > @@ -1055,8 +1068,9 @@
> >  
> >                             if (which == B_MIME_TYPE_DELETED
> >                                     || which == B_SUPPORTED_TYPES_CHANGED
> > -                                   || which == B_PREFERRED_APP_CHANGED)
> > +                                   || which == B_PREFERRED_APP_CHANGED) {
> >                                     _UpdatePreferredApps(&fCurrentType);
> > +                           }
> 
> BTW we still never decided to do that, and I would prefer us to do so 
> officially before changes like this are made.

What's needed for officially deciding this? I guess I've presented my arguments 
already. And to be perfectly honest, I thought I saw you point out a coding 
style violation to someone very recently about some if-clause becomming a 
multi-line statement and needing braces. It was proabably a slightly different 
situation, but that's just my point, the rules are simpler with less exceptions.

Best regards,
-Stephan

Other related posts: