[interfacekit] Re: to Adi: about BWindow

> Sorry to be picky with you all lately... (I guess that's because I haven't
been on holiday yet :)))

    N.P.!

> I just noticed this:
>
> uint32 BWindow::WindowLookToInteger(window_look wl)
> {
> switch(wl)
> {
> case B_BORDERED_WINDOW_LOOK:
> return 20;
> case B_TITLED_WINDOW_LOOK:
> return 1;
> case B_DOCUMENT_WINDOW_LOOK:
> return 11;
> case B_MODAL_WINDOW_LOOK:
> return 3;
> case B_FLOATING_WINDOW_LOOK:
> return 7;
> case B_NO_BORDER_WINDOW_LOOK:
> return 19;
> default:
> return 0;
> }
> }
>
> I don't think it's much clean, since if in the future we add some new
window look, we have to change here too.
> Just cast the window_look (or feel) to an uint32, and you're done, since
it's just an enum, or am I missing something?

That's quite strange... because this is what I have found in BWindow.cpp:

uint32 BWindow::WindowLookToInteger(window_look wl)
{
 switch(wl)
 {
  case B_BORDERED_WINDOW_LOOK:
   return 1;
  case B_TITLED_WINDOW_LOOK:
   return 2;
  case B_DOCUMENT_WINDOW_LOOK:
   return 3;
  case B_MODAL_WINDOW_LOOK:
   return 4;
  case B_FLOATING_WINDOW_LOOK:
   return 5;
  case B_NO_BORDER_WINDOW_LOOK:
  default:
   return 0;
 }
}

?????

> P.S: I would've contacted you offlist, but I don't have your e-mail
address... :)

    Today I have sent some messages to the list... You'll find my email in
one of those messages! :-)))



Other related posts: